Math¶
Cf0x10 has ordinary number literals and the usual math operators:
2 + 2 # prints 4
2 * 2 # prints 4
1 / 2 # prints 0.5
Notice that it does sensible division, with floating point as necessary. There is no floor (aka “integer”) division operator, nor does Cf0x10 include confusing anti-features of other languages like “modulus” or “exponent.”
Unlike most languages that don’t do mathematically-correct division by zero, in Cf0x10, this gives the correct result:
1 / 0 # undefined