effectfully / tiny-lang

BSD 3-Clause "New" or "Revised" License
6 stars 2 forks source link

[Field] Converting 'negative' finite field elements to negative integers #68

Closed effectfully closed 4 years ago

effectfully commented 4 years ago

Now asInteger (toInteger (-1) :: AField Jubjub.F) gives Just (-1) instead of 52435875175126190479447740508185965837690552500527637822603658699938581184512.

effectfully commented 4 years ago

Ready for another review. Now we have a test that shows how overflows are handled and the old test now uses Large Int instead of Integer as that has no chance of overflowing.