Consider the evaluation of the following expression

In[20]:= Reduce[ 1000 * 1.0609^t == 1500, t]
During evaluation of In[20]:= Reduce::ratnz: Reduce was unable to
solve the system with inexact coefficients. The answer was obtained by
solving a corresponding exact system and numericizing the result. >>
Out[20]= C[1] ∈ Integers && 
  t == -16.9154 (-0.405465 + (0. + 6.28319 I) C[1])

I was expecting just 6.858618708478822 as the solution.

  • $\begingroup$ Try Reduce[1000*1.0609^t == 1500, t, Reals]. You still get an error - which you get with NSolve as well, but you get the right result. FindRoot is better with numerical results if you kinda know where to search (the case here). $\endgroup$
    – gpap
    Feb 7, 2013 at 14:30
  • $\begingroup$ Yes, you get the result but the error looks scary. I don't understand why 'Reduce was unable to solve the system with inexact coefficients' Does anyone have any insight $\endgroup$ Feb 7, 2013 at 14:33
  • $\begingroup$ I think Reduce is close to giving you the correct answer because -16.9154*-0.405465=6.85862, but for some reason it can't get rid of the complex value (0+2PiI). I would report this to Wolfram as a bug. $\endgroup$
    – Cassini
    Feb 7, 2013 at 14:33
  • 2
    $\begingroup$ Difficult to say exactly what the difficulty was, but in Mathematica's numerical model, machine-precision numbers are considered not to be exact quantities. This makes it difficult to decide if two values are equal, or whether something is exactly zero or not if machine numbers are involved. The solution it finds for this problem is to convert the machine-precision values into rationals, which are treated as exact. Strictly speaking, machine precision numbers are rationals, so you can do this yourself if you wish using SetPrecision[..., Infinity], which will avoid the message. $\endgroup$ Feb 7, 2013 at 14:49
  • 3
    $\begingroup$ @DavidSkulsky the rounding is not perfect but Reduce is giving an answer that is very close to t == -(((2*I)*Pi*C[1] - Log[3/2])/(-52*Log[2] + Log[4777868844677359])), which seems to produce exactly 1500 when substituted into the original equation for C[1] any integer. Can we remove the [bugs] tag? $\endgroup$ Feb 7, 2013 at 15:19

4 Answers 4


If you re-express your problem in terms of reals:

Reduce[1000. 1.0609^t == 1500., t, Reals]

you will get

Reduce::ratnz: Reduce was unable to solve the system with inexact coefficients. The answer was obtained by solving a corresponding exact system and numericizing the result.

t == 6.85862

Mathematica is not "struggling" with your equation. The message is simply FYI -- to tell you that, for this equation, it prefers to work with exact quantities rather than inexact quantities (reals). If you find the message annoying, you can turn it off:

Quiet@Reduce[1000. 1.0609^t == 1500., t, Reals]

t == 6.85862

  • 1
    $\begingroup$ I would be wary of dismissing the message so easily. It is not produced with, for example, Reduce[{9.2 x + 3.1 y == 4.7, 2.8 x - 7.1 y == 6.0}, {x, y}]. As I mentioned in my comment above, I believe it indicates that difficulties were encountered in deciding conclusively whether two quantities were equal given the presence of inexact numbers. The fact that Reduce had to resort to solving a related problem, rather than the one actually posed to it, is presumably not something that one would usually wish to disregard. $\endgroup$ Feb 7, 2013 at 22:51
  • $\begingroup$ @OleksandrR. I did intend to suggest the message should be ignored, but I thought that the OP ought to be made aware that it could be suppressed. $\endgroup$
    – m_goldberg
    Feb 8, 2013 at 2:46
  • $\begingroup$ I know that you can suppress messages. The message does not say Reduce prefers to work with exact quantities, it says unable. This implies, to me at least, that there is an issue or, put another way, that Mathematica has struggled. $\endgroup$ Feb 8, 2013 at 10:30
  • $\begingroup$ I was sufficiently interested to blog about this. walkingrandomly.com/?p=4813 if anyone is interested. $\endgroup$ Feb 8, 2013 at 16:43
  • 1
    $\begingroup$ @LauraK. Not weird. It is most likely transforming the Reduce expression into Reduce[1000 Rationalize[1.0609]^t == 1500, t, Reals] // N or something very like that. $\endgroup$
    – m_goldberg
    Mar 1, 2018 at 23:47

As a workaround, you could always solve the equation symbolically, then replace the symbols with your constants:

Reduce[a*b^t == c, t] /. {a -> 1000, b -> 1.0609, c -> 1500}


C[1] ∈ Integers && t == 16.9154 (2 I π C[1] + Log[3/2])

And Simplify[%] returns:

C[1] ∈ Integers && t == 6.85862 + (0. + 106.283 I) C[1]
  • $\begingroup$ This seems to be what the message is telling you MMA is doing. If the problem was the message, Quiet seems a simpler way to achieve the same $\endgroup$
    – Rojo
    Feb 7, 2013 at 21:24
  • 1
    $\begingroup$ @Rojo this is not really the same thing. I personally prefer nikie's approach: consider for instance arbitrary precision numbers for which you also care about their uncertainty. The answers you get by letting Reduce handle things by itself are rather different to those obtained by substituting into the exact solution. $\endgroup$ Feb 7, 2013 at 23:05
N@Reduce[Rationalize[1000 1.0609^t == 1500, 0], t, Reals]

Result (with no errors/warnings thrown):

t == 6.85862

Rationalize[#, 0] will generate a rational version of all numbers in an expression within machine precision. Note that if you remove the N@ you can see the analytical solution:

t == (Log[2] - Log[3])/(2 (2 Log[2] + 2 Log[5] - Log[103]))

For fun, I added a bunch of random numbers to the expression, and Mathematica handles it like a champ:

Reduce[Rationalize[1000 1.0609916516846514894109^t == 1500, 0], t, Reals]

t == (Log[2] - Log[3])/
      (4 Log[2] + 2 Log[3] + Log[11] + Log[127] +
       Log[173] + Log[1861] - Log[68716865519])

Using Solve I get the exact same result as you noted in the last sentence.

Solve[1000*(1.0609^t) == 1500, t]
  • 1
    $\begingroup$ Yes but when you do that, Mathematica says "Solve::ifun: Inverse functions are being used by Solve, so some solutions may not be found; use Reduce for complete solution information. >>" $\endgroup$ Feb 7, 2013 at 14:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.