Re: [Factor-talk] unexpected integer from a float sum

2018-12-19 Thread John Benediktsson
I’m surprised also. They should display the way they do in other languages examples. That seems like a bug. > On Dec 18, 2018, at 12:25 PM, Alexander Ilin wrote: > > USE: math.functions:round instead > > 18.12.2018, 15:14, "Georg Simon" : >> Below I pasted a result from my listener I do not

Re: [Factor-talk] unexpected integer from a float sum

2018-12-19 Thread Georg Simon
Thank you. I have not considered that floating point numbers are displayed rounded. Am Tue, 18 Dec 2018 16:40:21 -0800 schrieb John Benediktsson : > Your number isn't quite 13799, represented as a floating point > number, but maybe we could print it out with additional digits. See, > for

Re: [Factor-talk] unexpected integer from a float sum

2018-12-18 Thread John Benediktsson
Your number isn't quite 13799, represented as a floating point number, but maybe we could print it out with additional digits. See, for example, the same result in other languages: Here is Java: $ cat foo.java class foo { public static void main(String[] args) { double[] foo = { -13.8, -21.8,

Re: [Factor-talk] unexpected integer from a float sum

2018-12-18 Thread Alexander Ilin
USE: math.functions:round instead 18.12.2018, 15:14, "Georg Simon" : > Below I pasted a result from my listener I do not understand. > > The result of sum looks like 137.99 which is right. > But the integer I made out of it is 13798 which is wrong. > > A typed in 137.99 gives the result I expect.