Ciao,

Il 2020-11-05 22:27 Niels Möller ha scritto:
I think this is the same result you get with a plain (64-bit) long. The
/ and % operators in C++ produce a quotient rounded towards 0, so (f(1)
- b) / DECKSIZE == 0, and the corresponding remainder is negative.

I'm not that familiar with perl, but I guess it uses the mathematically
more sane definition of always rounding the quotient towards -infinity,

Every language has its own definition :-)

https://en.wikipedia.org/wiki/Modulo_operation#In_programming_languages

Ĝis,
m
_______________________________________________
gmp-bugs mailing list
gmp-bugs@gmplib.org
https://gmplib.org/mailman/listinfo/gmp-bugs

Reply via email to