Numbers may be integer or floating-point. Arithmetic operations with integer numbers that yield an integer result will produce an integer number. Arithmetic operations which involve floating-point numbers will return a floating-point number. In this way, integer numbers may be considered precise.
Yewslip>
print 1 - 5 * 3-14
Yewslip>
print 17 / 28.5
Yewslip>
print .2 * 30.6
If an integer number overflows, that is, if it is too large for the integer type, it is converted into a floating-point number. If a floating-point number overflows, it is converted into infinity.
Internally, integer numbers are represented with at least 64 bits, and thus can hold any value up to about 9.22e+18
.