Floats vs. Ints - jbosh/calculator GitHub Wiki
So there are 2 internal representations of numbers in the calculator.
Floats are for numbers with decimal points. This is a 64 bit IEEE double for those of you interested.
Ints are for numbers that don't have fractional bits. This is a 64 bit integer.
The calculator will always choose to parse numbers as the integer representation if possible. This makes binary operators easy enough to work with.
Numbers will be automatically coerced to floating point when something needs to be done that isn't performed using integers.
- sin, cos, tan
- asin, acos, atan
- length
- sqrt
- division
- lerp
- deg/rad
- ln
- log
- &, |, <<, >>, ~ - these will try, undefined on floats
- floor - converted if within the range of int64
- ceiling - converted if within the range of int64
- round - converted if within the range of int64