Stack : Rounding random numbers

Re: Stack : Rounding random numbers

by Christopher Sangwin -
Number of replies: 0
Picture of Particularly helpful Moodlers Picture of Plugin developers
This is almost certainly because Maxima (LISP really) holds floats in binary, and converts them to and from decimal!

Here is a minimal example, and how to fix it in STACK with the "dispdp" inert function.

cost1:3*(40/10+0.1)+2*2;
cost2:dispdp(cost1,1);

This is something of a classic: https://docs.oracle.com/cd/E19957-01/800-7895/800-7895.pdf
Average of ratings: Useful (1)