3 ms·
> People like you are the reason why, even though computers have become incredibly fast, almost all software is complete shit and geting worse faster than hardw
by 6510 3y ago
> People like you are the reason why, even though computers have become incredibly fast, almost all software is complete shit and geting worse faster than hardware can keep up with.
I appreciate the sentiment but in this case I do not want to hurl around a bignum lib to add up 2 tiny numbers.
> If your software isn't manipulating Gigabytes of data or solving a hard math problem everything should be instantaneous.
I agree, NO amount of bandwidth should be spend on this, build in functionality should do the small number arithmetic.
> Just because you might not understand basic CS knowledge is no reason to deprive the world of the best approximation to real numbers we have.
Meanwhile, back on the construction site I'm hammering screws.
No, I don't want to take your nails away from you.
- constantcrying 3y ago>I appreciate the sentiment but in this case I do not want to hurl around a bignum lib to add up 2 tiny numbers. That is why integers and floats exist. >build in functionality should do the small number arithmetic. Every CPU has that. Floating point numbers CAN NOT be fixed. It is mathematically impossible. The inconsistencies always will be there.
- Groxx 3y agoHence why most should avoid floating point, yes. Many people approach them as "oh, they're decimals" when they absolutely are not... but there are no convenient alternatives in most languages. So people use the convenient one that they see 99% of other code using, rather than something that is more likely to fit their expectations. That's the problem. People are surrounded by screws and hammers and they understandably choose to hammer in the screws rather than 1) knowing a screwdriver exists, and 2) hunting down the few three-handed screwdrivers in existence and trying to use them.
- constantcrying 3y agoThere is nothing which fits their expectations. There can not be. Floats are the best in almost every circumstance. Which is why they are the right default.
- Groxx 3y agoThat depends on their expectations, and is a matter of opinion. Clearly others disagree with you.
- constantcrying 3y agoFloats are still the only sane default.