Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 3 Feb 2002 12:11:22 +0100
From:      Jeroen Ruigrok/asmodai <asmodai@wxs.nl>
To:        standards@FreeBSD.ORG
Subject:   Possible math problems
Message-ID:  <20020203111121.GF52378@daemon.ninth-circle.org>

next in thread | raw e-mail | index | archive | help
While adding support for unix98 and ansi99 to TenDRA I passed the
complex.h definitions in the spec and started hunting for the IEEE specs
on mathematical support.

I came to this page:

http://win-www.uia.ac.be/u/cant/ieeecc754.html

Which is a math testsuite, and linked to from the IEEE 754 page.

In the basic operations I noticed the following:

Testrun: ./IeeeCC754 -c -s BasicOp/testsets/divide 

Error Line 655: exponent different
Error Line 655: mantissa different
Operation: div
Round to nearest
Operand 1: 00bfffff
Operand 2: 3fc00000
Flags expected: x u 
Flags returned: x u 
Correct result:  007fffff
Returned result: 00800000

Error Line 658: exponent different
Error Line 658: mantissa different
Operation: div
Round to nearest
Operand 1: 80bfffff
Operand 2: 3fc00000
Flags expected: x u 
Flags returned: x u 
Correct result:  807fffff
Returned result: 80800000

Summary:  
--------  
Warning: no special 'w' underflow cases in the testset
Errors:   2/2153
Warnings: 0/2153
Skipped:  0/2153

Testrun: ./IeeeCC754 -c -s BasicOp/testsets/multiply 

Error Line 709: mantissa different
Operation: mul
Round to nearest
Operand 1: 33000001
Operand 2: 00ffffff
Flags expected: x u 
Flags returned: x u 
Correct result:  00000001
Returned result: 00000000

Error Line 709: mantissa different
Operation: mul
Round to nearest
Operand 1: 00ffffff
Operand 2: 33000001
Flags expected: x u 
Flags returned: x u 
Correct result:  00000001
Returned result: 00000000

[14 others]

Summary:  
--------  
Implementation signals underflow in case the result
(1) is tiny after rounding and
(2) suffers denormalization loss
('u' -  underflow)
Errors:   16/5408
Warnings: 0/5408
Skipped:  0/5408

Only problems happened with the multiply/division operations.  But it
becomes more interesting when doing long precision.  The error rate
increases a lot:

Testrun: ./IeeeCC754 -c -d BasicOp/testsets/add 
Errors:   0/3152

Testrun: ./IeeeCC754 -c -l BasicOp/testsets/add 
Errors:   1788/3152

This was on 4.5-PRERELEASE with an AMD Athlon.  Anyone else like
testing this?  The Conversions do not work, since it seems to require
glibc's bits/mathinline.h header.

-- 
Jeroen Ruigrok van der Werven / asmodai / Kita no Mono / xMach coreteam
asmodai@[wxs.nl|xmach.org], finger asmodai@ninth-circle.org
http://www.softweyr.com/asmodai/
Laat ons drinken op ons grote ongelijk...

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-standards" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020203111121.GF52378>