misc/84920: math programs reporting incorrect values

Colin King ring_06 at m202.net
Sun Aug 14 18:30:20 GMT 2005

>Number:         84920
>Category:       misc
>Synopsis:       math programs reporting incorrect values
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Aug 14 18:30:17 GMT 2005
>Originator:     Colin King
>Release:        FreeBSD 5.4-RELEASE-p1 i386
System: FreeBSD mercury 5.4-RELEASE-p1 FreeBSD 5.4-RELEASE-p1 #4: Wed Jun 1 22:07:36 PDT 2005 root at mercury:/usr/src/sys/i386/compile/MERCURY i386


	Both of these program are giving me incorrect results when subtracting
	floating-point numbers, so I'm assuming that it is either something
	wrong with libm, libc, or gcc.
	Go to either one of these programs and type an expression that uses
	at least one floating point number and a subtraction. For example, I
	used 30.00-29.05 as my expression. In e, the result is 0.949999.... In
	KDE's kcalc, the result is 0.9500000000000001776356839400250464677811,
	or 0.9500000000000002 after rounding.
	Not known. xcalc, perl, and openoffice.org do not seem to have this

More information about the freebsd-bugs mailing list