3 ms·
After removing all modulo operations and transforming all numbers to floating point: ==== EXPR = (((((((788.0)(8.46))))+8342.01.803-1.0))4186.4(15.0))(((22.0/
by mingodad 5y ago
After removing all modulo operations and transforming all numbers to floating point:
====
EXPR = (((((((788.0)(8.46))))+8342.01.803-1.0))4186.4(15.0))(((22.0/((7530.0/((2.0)(((((25.0))-421))))))*597.0)+7283.8-9.60+167.0))+(8871.0)
SQUILU = 8259816920615.1
LUA = 8259816920615.1
JAVASCRIPT = 8259816920615.111
SQLITE = 8259816920615.11
POSTGRESQL = 8259816920615.11377654520912550160000
MYSQL = 8259816920615.113
AMPL = 8.25982e+12
PHP = 8259816920615.1
RUBY = 8259816920615.111
PYTHON = 8.25981692062e+12
====
- ayjtyjtyj 5y agoSee this interesting paper on the possible choices of definition for div and mod: RT Boute, "The Euclidean definition of the functions div and mod" (1992) https://biblio.ugent.be/publication/314490/file/452146.pdf https://biblio.ugent.be/publication/314490/file/452146.pdf
- deleted 5y ago[deleted]
- miga 5y agoYour expressions omits many necessary operators, and thus becomes ambiguous.
- comex 5y agoIt’s because Hacker News parsed the asterisks in the expression as italic markers.
- Dylan16807 5y agoWith corrected formatting, they wrote EXPR = (((((((788.0)*(8.46))))+8342.0*1.803-1.0))*4186.4*(15.0))*(((22.0/((7530.0/((2.0)*(((((25.0))-421))))))*597.0)+7283.8-9.60+167.0))+(8871.0) which is unambiguous.