Python cryptography, Rust, and Gentoo
Python cryptography, Rust, and Gentoo
Posted Feb 13, 2021 10:09 UTC (Sat) by Wol (subscriber, #4433)In reply to: Python cryptography, Rust, and Gentoo by mkbosmans
Parent article: Python cryptography, Rust, and Gentoo
> While you can say: lim x→0 n/x = inf, it does not follow that n/0 = inf.
But isn't that what the MATHS MEANS? It doesn't follow that x will *reach* 0, but if it does, then n/x *must* equal infinity. (Quite often, x=0 is illegal in the problem domain.)
> And as for the more general point, calculus deals with real numbers for the most part. Computers operate on floating point and integer numbers. Operations that make sense in one domain don't necessarily translate 1:1 to another.
Principle of least surprise. Yes, floating point is a quantum operation, while reals aren't, but given that (I believe) the IEEE definition of floating point includes both NaN and inf, it would be nice if computers actually used them - I believe some popular computers did 40 years ago (DEC Vax), and I guess it's the ubiquity of x86 that killed it :-(
And the whole point of fp is to imitate real. Again, principle of least surprise, the fp model should not crash when fed something that is valid in the real domain. It should get as close as possible.
People are too eager to accept that "digital is better" "because it's maths", and ignore the fact that it's just a model. And people find it hard to challenge a mathematical model, even when it's blatantly wrong, "because the maths says so".
Cheers,
Wol
