On Fri, Mar 21, 2014 at 7:18 PM, Aaron Meurer <[email protected]> wrote: > Is this an issue with any subtraction of similar magnitude, or only if > it changes the exponent of the number (i.e., it gets closer to 0)? In > other words, when you say "magnitude", do you mean "value", or "order > of magnitude (log2(x))"?
Roughly speaking, if you have two numbers x*10^a and y*10^b, where 1 <= x, y <= 10, then when you subtract them, you roughly get only |a-b| correct significant digits. So if a=b, you get around 1 significant digit. If a = 1, b = -16, then you retain all 16 significant digits. I hope I wrote it up correctly. http://en.wikipedia.org/wiki/Loss_of_significance Ondrej -- You received this message because you are subscribed to the Google Groups "sympy" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/sympy. To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/CADDwiVD2xp-JEPCBZGG-OL1hbzmu_nGJ%2BS9t4tvQpqdySffP7Q%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
