2 ms·
>> I do not see how this can possibly be the case. How do you define rational arithmetic with bounded denominators so that addition is associative? > That's ea
by enriquto 7y ago
>> I do not see how this can possibly be the case. How do you define rational arithmetic with bounded denominators so that addition is associative?
> That's easy. In the case of bounded numerator and bounded denominator, you simply define (an/ad) + (bn/bd) = (bd x an + ad x bn) / (bd x ad)
This definition is not complete. What happens when "bd x ad" is larger than the maximum allowed denominator ?
> The overwhelming majority software developers are not numerical analysts,
the overwhelming majority of young people who learn to program today do machine learning, which is based on mungling huge arrays of floating point numbers. Tell them to use rationals if you dare!
- saithound 7y ago> This definition is not complete. What happens when "bd x ad" is larger than the maximum allowed denominator ? All integer operations are twos complement operations, as I'm sure you guessed anyway. > the overwhelming majority of young people who learn to program today do machine learning, which is based on mungling huge arrays of floating point numbers. Tell them to use rationals if you dare! That's very far from factually true, but this kind of argument is not relevant to the Raku defaults in any case. A machine learning library can use whatever optimized number representation its creators wish to use. In fact, the default choice of most language implementors (double-precision floating point) is typically not the representation used in training or inference on deep learning models anyway. The 1080Ti is fast enough only with single-precision floats.