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
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Aug 14 18:30:17 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator:     Colin King
>Release:        FreeBSD 5.4-RELEASE-p1 i386
>Organization:
N/A
>Environment:
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


	i686
	5.4-RELEASE-p1

>Description:
	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.
>How-To-Repeat:
	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.
>Fix:
	Not known. xcalc, perl, and openoffice.org do not seem to have this
	problem.
>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-bugs mailing list