-
Notifications
You must be signed in to change notification settings - Fork 194
Open
Description
I am trying to use Truffle Ruby with a project that uses the Jose gem. It gets an error when loading. I have isolated the problem with the mod operator with a negative number and a large number:
Given the following expression:
a = -390081 % ((2**448)-(2**224)-1)
In MRI Ruby and JRuby 10:
a will be:
726838724295606890549323807888004534353641360687318060281490199180612328166730772686396383698676545930088884461843637361053498017975358
In Truffle Ruby:
a will be one less:
726838724295606890549323807888004534353641360687318060281490199180612328166730772686396383698676545930088884461843637361053498017975357
Test code:
a = -390081 % ((2**448)-(2**224)-1)
puts "a #{a}"
puts "MRI Ruby value match #{a==726838724295606890549323807888004534353641360687318060281490199180612328166730772686396383698676545930088884461843637361053498017975358}"
joshheil and Ryanrm
Metadata
Metadata
Assignees
Labels
No labels