wduquette / molt

Embeddable TCL Interpreter for Rust applications
BSD 3-Clause "New" or "Revised" License
103 stars 12 forks source link

Fix expr floating point handling #25

Closed wduquette closed 5 years ago

wduquette commented 5 years ago

Molt handling of floating point numbers is lacking. The expr command doesn't understand NaN, Inf, or -Inf, so floating point errors are mishandled. Also, floating point output of whole numbers loses the ".0", and so floats are magically transferred into integers. This area needs to be looked at, and fixed. Probably this issue should result in a number of more specific issues.

wduquette commented 5 years ago

On hold until I'm sure how to address it.

wduquette commented 5 years ago

As of commit c3e9fda7cf5a3d8f54039cfa79ef7b239b561edb, expr understands and outputs Inf, -Inf, and NaN. Issue #29 covers the numeric formatting problem.