Discussion

Ask HN: Inconsistent expression calculation between programming languages

This expression shows that we have several disagreements between programming languages about what is the end result:

=====

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

POSTGRESQL = 8291561284461.33301440

SQUILU = 8291561284461.3

JAVA = 8.291561284461331E12

D = 8.29156e+12

SQLITE = 8290383058308.3

PHP = 8035491468054

JAVSCRIPT = 8036090802426.098

MYSQL = 8036090802312.071

PYTHON = 1.1107636287e+13

RUBY = 11107636286950.146

LUA = 11665910614443

=====

83 points mingodad 5 years ago 62 comments

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton