Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] Re: strange results with decimal!

From: moeller_thorsten:gmx at: 10-Jan-2002 13:39

Hi Joel, thanks for your reply. If devision or multiplication is involvolved i could follow your samples. Perhaps i should be more detailed, as i am only using addition and substraction. File sheme: 15888;some text;1.000,50;1.000,50;some text 15889;some text;50,49;50,48;some text As the first line contains german values, i have to parse out the "." and the convert the field to a decimal like 1.000,50 to 1000,50. After that i add the values to a sum with a foreach loop. the result is: sum-a: 1050,99 sum-b: 1050,98 Now i want the difference to be displayed. print sum-a - sum-b The result is, even with this example, "9.99999999999091E-3" instead of 0,01. If you just type in the lines with the sums and the print statement you can follow the example. Is that the same problem as you described? Thorsten