From: SourceForge.net <no...@so...> - 2006-09-07 09:32:03
|
Patches item #1553106, was opened at 2006-09-06 13:48 Message generated for change (Comment added) made by dannysmith You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=302435&aid=1553106&group_id=2435 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: runtime Group: None >Status: Closed >Resolution: Wont Fix Priority: 5 Submitted By: esanfo (esanfo) Assigned to: Nobody/Anonymous (nobody) Summary: __eiszero patch for _IO_ldtostr Initial Comment: MinGW's builtin __LDBL_EPSILON__ is 1.08420217248550443401e-19L. _IO_ldtostr returns 6.00000000000000000000e-4952 to a string. The problem appears to be in __eiszero in mingwex/math/cephes_emath.h, where the expression (*((long double*) a) == 0) appears to return an incorrect result. This patch avoids the cast from const short unsigned int * to long double by converting the external representation of long double to the corresponding cephes internal representatation and calling __eiiszero, which appears to return the correct result. The patch includes a few minor related cleanup changes. This patch has only been tested on WinXP version 2002, SP2 with: gcc version 3.4.2 ld version 2.16.91 20050827 native WinXP win32 build environment MinGW runtime version 3.10 w32api version 3.7 GNU make 3.80 The uploaded zip file includes a dif file, cpp test case demonstrating the bug and a makefile. ---------------------------------------------------------------------- >Comment By: Danny Smith (dannysmith) Date: 2006-09-07 21:32 Message: Logged In: YES user_id=11494 Thanks for the patch. The cephes-based implementation of ldtoa has been removed from CVS repository, and replaced with the more widely used gdtoa package (David Gay's generalization of his dtoa routines), so the patch is no longer necesssary. The long double gdtoa routines are exported from libmingwex.a Danny Danny ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=302435&aid=1553106&group_id=2435 |