|
|
|
Why do programming languages suck at math?
|
|
1 points
by laynetrain
3284 days ago
|
|
What's the whole reason behind distinguishing between integers and float/doubles? units = 2 price = 3.17 2 * 3.17 = ERROR It blows my mind that so much effort has put into things like functions taking functions as arguments, and the characteristics of classes - yet a computer can't handle basic calculator math out of the box. PHP, Ruby, Swift, OCaml.. what gives? What is the complexity behind this? |
|
Computer numbers is not math numbers, and its better to always remember this fact.
[1] https://en.wikipedia.org/wiki/Multiplicative_group_of_intege...
[2] https://gmplib.org/