ignored phobos request

Lars T. Kyllingstad public at kyllingen.NOSPAMnet
Wed Aug 12 01:02:41 PDT 2009


Saaa wrote:
> Some time ago I requested something on .D, but it was ignored.
> I'm interested in why this is so.
> It was only a small request, maybe not fitting for .D but dsourse/phobos 
> said that was the place for such things.
> (Maybe it was unintelligible again?)

The place (.D) was right, but I think your timing was bad. :) You posted 
it in the middle of the (very heated) properties debate, and people were 
way too preoccupied with that to care about other things.

You could try the newsgroup again if you feel it is something that needs 
discussion, or you could simply post an enhancement request in Bugzilla:

   http://d.puremagic.com/issues/


> ---
> Could an option be added to the formatting to elide trailing zero's for %f ?
> That way it is possible to create an more optimal formatting for which the
> following holds:
> 
> float f;
> s = format(f);
> float f2 = to!(float)(s);
> assert(f==f2);
> 
> The formatting I'm trying to get can be seen here (decimal):
> http://www.h-schmidt.net/FloatApplet/IEEE754.html
> try 0.1, 0.0001, 10 & 10000000
> 
> %g fails to format like this because it uses %f for as small as 10^-5,
> thus loosing precision for floats with leading zero's, like 0.0001234567
> 
> It would be even nicer to have this kind of formatting added to std.format!
> ---
> 
> With little effort the default float format even could be lossless, wouldn't 
> that be nice?

I think it's a good idea. :)

-Lars



More information about the Digitalmars-d-learn mailing list