Date: Tue, 13 Jul 1999 09:10:03 -0700 (PDT) From: Hidetoshi Shimokawa <simokawa@sat.t.u-tokyo.ac.jp> To: freebsd-alpha@freebsd.org Subject: Re: alpha/12623: strtod(3) FPE on alphaev56 Message-ID: <199907131610.JAA95315@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR alpha/12623; it has been noted by GNATS. From: Hidetoshi Shimokawa <simokawa@sat.t.u-tokyo.ac.jp> To: m.seaman@inpharmatica.co.uk Cc: FreeBSD-gnats-submit@FreeBSD.ORG, freebsd-alpha@freebsd.org Subject: Re: alpha/12623: strtod(3) FPE on alphaev56 Date: Wed, 14 Jul 1999 01:06:37 +0900 At Tue, 13 Jul 1999 12:27:40 +0100 (BST), m.seaman@inpharmatica.co.uk wrote: > >Description: > > Attempting to convert the string "2.49521e-297" into a double > precision value via strtod(3) results in a floating point exception on > the alphaev56 CPU. The problem doesn't occur on i586. /usr/src/lib/libc/stdlib/strtod.c seems broken on alpha in three ways. 1) IEEE_8087 should be defined instead of IEEE_MC68k. 2) It assumes long is 32bit, but long is 64bit on alpha. s/unsigned long/u_int32_t/, s/long/int32_t/. 3) It generates denormal numbers which can not be treaded by the hardware on alpha. It should be compiled with the option `-mtrap-precision=i -mfp-trap-mode=su' to enable software completion. -- /\ Hidetoshi Shimokawa \/ simokawa@sat.t.u-tokyo.ac.jp PGP public key: finger -l simokawa@sat.t.u-tokyo.ac.jp To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-alpha" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199907131610.JAA95315>