Both ints and floats represent real, rational values, but every operation in no way matches math. Associative? No. Commutative? No. Partially Ordered? No. Weakly Ordered? No. Symmetric? No. Reflexive? No. Antisymmetric? No. Nothing.
The only reasonable way to compare rationals is the decimal expansion of the string.
Both ints and floats represent real, rational values, but every operation in no way matches math. Associative? No. Commutative? No. Partially Ordered? No. Weakly Ordered? No. Symmetric? No. Reflexive? No. Antisymmetric? No. Nothing.
The only reasonable way to compare rationals is the decimal expansion of the string.
Julia gets this right. casting to both double and int, it does both a floating point compare and an integer compare , then AND them and return