ow Integers Should Work

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Tue Dec 6 09:14:31 PST 2011


On 12/6/11 1:20 AM, Walter Bright wrote:
> On 12/5/2011 10:52 PM, Don wrote:
>> On 06.12.2011 05:15, Walter Bright wrote:
>>> On 12/5/2011 8:10 PM, bearophile wrote:
>>>> This is not about integers but yeah, I'd like the better str<-> float
>>>> conversions of Python in D too.
>>>
>>> Do you have any test data that they actually are better in Python (apart
>>> from just being better specified)?
>>
>> Bug 5229 is an example.
>>
>> I have five papers on this topic. Most recent is the excellent:
>> Florian Loitsch, "Printing FP numbers quickly and accurately with
>> integers" (2010)
>
> Right now, we rely on C's standard library. Often, it's deficient. We
> should roll our own, like we did with the math routines, and make sure
> the D standard reflects the modern thinking on it.
>
> (Python's implementation currently uses David Gay's dtoa.c)

Translating dtoa.c to D and making sure it works during compilation 
sounds like a great project. People who want to help D in any way, 
please take notice :o).

Andrei


More information about the Digitalmars-d mailing list