Use 'square', 'cube', 'product' and 'factorial'
The operations the square of
, the cube of
, the factorial of
and the product of
exist but are only mentioned in passing (if at all) in the documentation. They can save you bytes to define (large-ish) constants. For instance, to get the number 64,
a big big big big big big cat
is 5 bytes longer than
the cube ofa big big cat
Similarly, the shortest way of getting 49 is with \$49=7^2\$ i.e.
the square ofthe sum ofa big big big cat a pig
and you can get 24 as \$4!\$ i.e.
the factorial ofa big big cat
There can be situations where viewing a number as the product of two smaller existing constants can make the product of
useful.
Finally, note that there is also the square root of
and the quotient between
. Both round down, as the only type in SPL is integers: a short way to get 200 is as \$200 = \lfloor \sqrt{8!} \rfloor\$:
the square root ofthe factorial ofa big big big cat