News for hackers. Stuff that matters.
Re:How to compare floats in Python by bee_rider on Wednesday March 30, 2022 @03:26PM (#30859730)
They should have convenient hardware support (vector extensions for example). I'm sure you could design floating-point decimals that work nicely with vector extensions (which usually do cover integers), but it would be a significant project.

If your language is going to plug into the numerical computing stack (BLAS+LAPACK then all the fun stuff built up on that) then it'll need to talk binary floats.

All the annoying stuff that numericists understand but would like to not mess around with, like rounding directions and denormals, are handled nicely with 754 floats.

These are all sort of backward compatibility/legacy issues in the sense that they are based on decisions made in the past, but the hardware and libraries aren't going anywhere I bet!

Also, note that IEEE 754 does define a decimal interchange format. I bet they aren't handled as nicely in hardware, though.

Re:How to compare floats in Python by longemen3000 on Thursday March 31, 2022 @01:59AM (#30864251)
In Julia at least, there are packages that provide alternatives to Bigfloats:

Logarithmic numbers: more range, less precision https://github.com/cjdoris/LogarithmicNumbers.jl

Double arithmetic: stitch 2 floats together https://github.com/JuliaMath/DoubleFloats.jl

Of course, if you are calling BLAS/LAPACK, you are constrained to use floats, but the recommendation on DoubleFloats is clear: if you know you algorithms, use the increased precision only in the parts that matter