https://bugs.winehq.org/show_bug.cgi?id=48160
--- Comment #7 from Erich E. Hoover erich.e.hoover@gmail.com --- Created attachment 65961 --> https://bugs.winehq.org/attachment.cgi?id=65961 implement strtod without using 'long double'
I've attached a patch that implements strtod without requiring "long double". I did have to add a bit of a hack to get a couple tests to work though, but the reason is a little odd so I would appreciate your thoughts. Without the hack this test: === strcpy(num, "1e-309"); ret = p__atodbl_l(&d, num, NULL); ok(ret == _UNDERFLOW, "_atodbl_l(&d, "1e-309", NULL) returned %d, expected _UNDERFLOW\n", ret); ok(d.x!=0 && almost_equal(d.x, 0), "d.x = %le, expected 0\n", d.x); ==== throws an underflow error (passes) and returns _exactly_ zero (fails). Since this test is looking for zero I am wondering what the best thing to do here is: 1) return an almost zero value (the hack I currently have) 2) change the test to allow a return of exactly zero 3) look for another way to implement this operation that doesn't return exactly zero when the underflow occurs