MSVC: fix for failing tests due to strtod+hexadecimal literals

Johan Engelen via digitalmars-d-ldc digitalmars-d-ldc at puremagic.com
Wed Mar 4 00:55:06 PST 2015


On Tuesday, 3 March 2015 at 22:12:39 UTC, Dan Olson wrote:
>
> Could David Gay's strtod() be used?
> http://www.exploringbinary.com/how-strtod-works-and-sometimes-doesnt/

Thanks for that link. I had a look at David Gay's strtod() (a
complicated piece of code) and it also accepts hex floats [1].
I think it is clear that my hex parser is much simpler but also
more naive and may need quite some extra complication to make it
deal with all corner cases (I am by no measure an expert on IEEE
fp). Although a fun exercise, I guess I should accept the fact
that David Gay's function is very much superior to mine :)

Should we replace MSVC's strtod() altogether with David Gay's, or
use only the hex parser "gethex()"?


More information about the digitalmars-d-ldc mailing list