News for hackers. Stuff that matters.
Re:How does your programming language handle “minus zero” (-... by sltkr on Friday March 05, 2021 @10:25AM (#26357823)
Doesn't ML work fine with fixed point numbers? I don't think there is a particular use case for very large or very small numbers.
Re:How does your programming language handle “minus zero” (-... by PeterisP on Friday March 05, 2021 @10:54AM (#26358203)
ML optimization algorithms generally do require proper handling of very,very small numbers for e.g. calculation of gradients.

There's a bunch of work on discretization of models after you've done optimizing them - that works, you can get high-performance inference with low-bit fixed point numbers; but that's after the learning has been done using proper floating point (however, you don't necessarily need high accuracy floating point, e.g. single precision may work betted than double precision simply because it's twice less bytes to copy over).

Re:How does your programming language handle “minus zero” (-... by sharpneli on Friday March 05, 2021 @11:48AM (#26358935)
It's the exact opposite. It really loves large and small numbers, the precision of a number doesn't matter that much

That's the reason why they introduced https://en.wikipedia.org/wiki/Bfloat16_floating-point_format

It's similar to normal half precision float but the exponent is the same as with 32bit float and mantissa has been sacrificed to get room for it.

Re:How does your programming language handle “minus zero” (-... by oivey on Friday March 05, 2021 @10:36AM (#26357979)
Referring to ML is so vague that it’s not particularly meaningful. The answer in general is no. There’s been some work showing neural networks can function with low precision floating point, but that’s still pretty different than fixed point.