Re: Optimized float to string library
- From: "John Herbster" <herb-sci1_AT_sbcglobal.net>
- Date: Thu, 29 Sep 2005 06:57:00 -0500
"Dave White" wrote
> Two parameters, a double value and an integer number of
> significant figures, with the result returned as a string
> function FormatSigFigs(value : double; sf : integer) : string;
Dave, Just to confirm a few guesses:
By number of significant figures do you really mean that or the
number of decimal fraction digits?
Are the following examples correct?
FormatSigFigs(1.0 ,1) = '1'
FormatSigFigs(1.0 ,2) = '1.0'
FormatSigFigs(1.2345 ,4) = '1.234'
FormatSigFigs(12345.0 ,5) = '12345'
FormatSigFigs(-12345.0 ,5) = '-12345'
FormatSigFigs(12345.0 ,4) = '12340'
What decimal place do you want to use?
What rounding method do you want to use?
What thousands separator do you want to use?
Regards, JohnH
.
- Follow-Ups:
- Re: Optimized float to string library
- From: Dave White
- Re: Optimized float to string library
- From: John Herbster
- Re: Optimized float to string library
- References:
- Optimized float to string library
- From: Dave White
- Re: Optimized float to string library
- From: John Herbster
- Re: Optimized float to string library
- From: Dave White
- Optimized float to string library
- Prev by Date: Re: ANN: Ultimate Page Control SuiteT for Borland DelphiT
- Next by Date: Re: version Control
- Previous by thread: Re: Optimized float to string library
- Next by thread: Re: Optimized float to string library
- Index(es):