Logic functions not accurated to supposed degree

Issue #594 closed
Pol Welter created an issue
and(2^200)-2^200

The result is approx. -1, instead of zero. I am pretty sure that this has to do with the fact that and rounds its argument towards zero instead of the closest integer. However the (old) documentation specifies an accuracy of up to 256 bits.

Comments (2)

  1. Pol Welter reporter

    Well, I just noted that using shifts 1<<200 instead of exponentiation solves the issue. I'll put that in the manual...

  2. Log in to comment