Michael Somos on Sun, 29 Sep 2002 13:44:20 -0400 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: Precision lost in truncation |
? \p realprecision = 28 significant digits ? for(n=26,29,print(n" "10.^n" "floor(10.^n))) 26 100000000000000000000000000.0 100000000000000000000000000 27 1000000000000000000000000000. 1000000000000000000000000000 28 10000000000000000000000000000. 10000000000000000000000000000 *** precision too low in mptrunc (precision loss in truncation). The error message is telling you that the number you have is too big to distinguish between x and floor(x). Increase the accuracy of your computation in order to avoid this. Shalom, Michael > very often I want to use floor(x) in my functions. > Somtimes, it's ok; sometimes, I have an error: > "tuncation lost etc.". How can I avoid it ? Shalom, Michael