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

*To*: soo <tilde@xxxxxxxxxxx>*Subject*: Re: exponential number*From*: Ken Dickey <Ken.Dickey@xxxxxxxxxxxxxx>*Date*: Thu, 27 May 2004 11:38:15 -0700*Cc*: srfi-48@xxxxxxxxxxxxxxxxx*Delivered-to*: srfi-48@xxxxxxxxxxxxxxxxx*In-reply-to*: <8765aixdqo.fsf@xxxxxxxxxxx>*Organization*: BitWize Consulting*References*: <8765aixdqo.fsf@xxxxxxxxxxx>*User-agent*: KMail/1.6.2

On Thursday 27 May 2004 05:21 am, soo wrote: > The following seems to be a bug of FORMAT. > > > (round 1.23e20) > > 1.23e+20 > > > (format "~0,3F" 1.23e20) > > "1.230e+20" > > > (round 1.23e-20) > > 0.0 > > > (format "~0,3F" 1.23e-20) > > "0.000" Why do you think the above is a bug? What do you think is wrong? The numbers you specified above both show 3 digits after the decimal point, as requested. The number near zero shows its leading digits as "0.000" as expected. SRFI-48 states: =========== If d is specified, the number is processed as if added to 0.0, i.e. it is converted to an inexact value. (format "~8,2F" 1/3) => " 0.33" Digits are padded to the right with zeros (format "~8,2F" 32) => " 32.00" If the number it too large to fit in the width specified, a string longer than the width is returned (format "~1,2F" 4321) => "4321.00" For very large or very small numbers, the point where exponential notation is used is implementation defined. (format "~8F" 32e5) => " 3.2e6" or "3200000.0" =========== Cheers, -KenD

**Follow-Ups**:**Re: exponential number***From:*soo

**References**:**exponential number***From:*soo

- Prev by Date:
**exponential number** - Next by Date:
**Re: exponential number** - Previous by thread:
**exponential number** - Next by thread:
**Re: exponential number** - Index(es):