ASKSAGE: Sage Q&A Forum - Latest question feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Tue, 28 Nov 2017 01:24:06 -0600Why is sagemath real numbers arithmetic gives incorrect result?https://ask.sagemath.org/question/39824/why-is-sagemath-real-numbers-arithmetic-gives-incorrect-result/ I was using Sagemath for computation.
There I was input "152.8-152.43" and gets something like "0.370000000000005". I tried to use RLF and RR too but I could not eliminate the extra number "5" at the end of the result. This raises no problem, since I do not that level of precision, but the number "5" at the end of the result just drives me upset. Why is it so? Is there anyway I can do to eliminate this problem? Matlab gave me the right answer. Is this some kind of weakness of Sagemath? I love Sagemath and intend to stick to it lifelong. But did I go wrong somewhere?michaeldnguyen10Tue, 28 Nov 2017 01:24:06 -0600https://ask.sagemath.org/question/39824/