sercantutar / infint

Arbitrary-Precision Integer Arithmetic
http://sercantutar.github.io/infint/
198 stars 48 forks source link

Non-member operators were added. #18

Open JC-labs opened 6 years ago

JC-labs commented 6 years ago

Non-member versions of operators +, -, , /, %, ==, !=, <, <=, >, >= were added. It resolves #11

ofekih commented 5 years ago

Was this tested? The following would not work correctly: -, /, %, and I'm not sure the comparison operators are in the correct order as well.

Those operations are order-dependent, so saying:

6 / InfInt(2) is not the same as InfInt(2) / 6 (which is what would be calculated in your imlpementation.