[Prev][Next][Index][Thread]

Re: Naive Number Question



In article <200012101830.NAA02527@life.ai.mit.edu>, Rob Myers 
<robm@onetel.net.uk> wrote:

> Hi.
> 
> How can I round a number (a <float>) to the nearest  n  decimal places in 
> (Gwydion) Dylan?

On a binary machine there is no more efficient way to do that than to 
multiply it by 10^n, round it, and then multiply by 10^-n.

-- Bruce