The int and long in java are getting converted to number in javascript. The number is using 64 bit floating point format resulting in loss of precision. And the only the lower 32 bit number is considered for operations like & (AND) or << LEFTSHIFT in case of number datatype. The java code I am dealing with has a complex validation logic and am trying to port to javascript using jsweet. I had to manuallly modify the & and << operations using BigInt.
This is not a urgent requirement. Thanks to jsweet that eased my porting work.
The int and long in java are getting converted to number in javascript. The number is using 64 bit floating point format resulting in loss of precision. And the only the lower 32 bit number is considered for operations like & (AND) or << LEFTSHIFT in case of number datatype. The java code I am dealing with has a complex validation logic and am trying to port to javascript using jsweet. I had to manuallly modify the & and << operations using BigInt.
This is not a urgent requirement. Thanks to jsweet that eased my porting work.