lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Hello Luiz !

Thank you for the link !

But what still bugs me is the difference between heavily used programming languages:

And after removing all modulo operations:
====

EXPR = (((((((788)*(8.46))))+8342*1.803-1))*4186.4*(15))*(((22/((7530/((2)*(((((25))-421))))))*597)+7283.8-9.60+167))+(8871)

SQUILU = 8515287402650.3

SQLITE = 8515287402650.34

POSTGRESQL = 8515287402650.347200

D = 8.51529e+12

JAVA = 8.515287402650345E12

MYSQL = 8259816920501.086

JAVASCRIPT = 8259816920615.111

PHP = 8259816920615.1

LUA = 8259816920615.1

AMPL = 8.25982e+12

GAMS = 8.25982E+12

RUBY = 7701542593121.873

PYTHON = 7.70154259312e+12

====

Cheers !

On 6/8/21 14:49, Luiz Henrique de Figueiredo wrote:
This expression shows that we have several disagreements between
programming languages about what is the end result:
Is this another instance of Rump's example?
https://www.johndcook.com/blog/2019/11/12/rump-floating-point/

BTW, the correct value seems to be 8.0349...E+12