Float to string with more digits?

2015-02-24 Thread Almighty Bob via Digitalmars-d-learn
Is there a more accurate way to do a float and or double to string than... to!string(float); As that seems to limit itself to 6 digits.

Re: Float to string with more digits?

2015-02-24 Thread Almighty Bob via Digitalmars-d-learn
On Tuesday, 24 February 2015 at 20:08:55 UTC, Justin Whear wrote: On Tue, 24 Feb 2015 20:04:04 +, Almighty Bob wrote: Is there a more accurate way to do a float and or double to string than... to!string(float); As that seems to limit itself to 6 digits. Use std.string.format or std.for

Re: Float to string with more digits?

2015-02-24 Thread Almighty Bob via Digitalmars-d-learn
Just to clarify what i needed was... %.8g or %.7e Significant digits, or fixed width scientific form. I needed more significant digits. %.8f controls how many digits to print after the decimal point, which is not the same thing.