> How can I do floating point arithmetic in PicoLisp? Is there an
> example of fixed-point division?
As your question seems to correctly presume, there is no real floating
point arithmetic in PicoLisp.
Fixed point numbers are actually scaled integer numbers. So a division
always requires a multiplication with the scale _before_ actually
dividing the numbers, and a multiplication needs a division by the scale
_after_ multiplying the arguments.
In both cases, the '*/' function (muldiv) is normally used. In addition
to being faster than separate calls to '*' and '/', '*/' also rounds the
: (scl 6) # Use a scale of 1000000
: (*/ 17.0 1.0 3.0) # Divide 17 by 3
: (format @ *Scl) # See it as fixpoint
: (*/ 12.345 0.99 1.0) # Multiply 12.345 with 0.99
: (format @ *Scl)
As you see, the scale (1000000) can be specified conveniently as 1.0.
Does this help?