[ieeefp-tests-devel] Symbolic printing of well-known values

Christophe Rhodes csr21 at cam.ac.uk
Tue Jun 8 20:05:10 UTC 2004


Raymond Toy <toy at rtp.ericsson.se> writes:

> Here is a patch that replaces some of the numbers in the tests with
> symbolic values so that it's easier to see what the tests are trying
> to do.

I've got no objections to this (and indeed would encourage people,
while we're in the exploration and development phase of this project,
to make speculative commits without worrying too much.  I will scream
if you break stuff, but hey -- don't let that stop you ;-).

In the long term, I enviseage that this mechanism would be replaced by
two things: firstly, that the tests would be preceded by an
automatically generated comment (or would contain a docstring)
describing the test: maybe something like "(atanh 0.5d0) => f00d0" as
a quick summary, with obvious Inf and NaN notation; secondly that the
tests be automatically annotated with such notes (in the
Dietz-style-RT sense) as :argument-is-nan, :result-is-inf,
:rounding-mode-nonnearest, and so on, so that implementations which
aren't fully IEEE compliant can ignore those tests with notes
corresponding to unimplemented (or unimplementable) features.

(one other thing to bear in mind: my suspicion is that the act of
wanting to test ieee features will lead to a pseudo-compatibility
library for ieee functionality, living in ieee754-fooimpl.lisp; with
luck, we'll be able to find a nonhorrible API that can be written up
and submitted to whatever standardization body still exists by the
time we get there :-)

Cheers,

Christophe
-- 
http://www-jcsu.jesus.cam.ac.uk/~csr21/       +44 1223 510 299/+44 7729 383 757
(set-pprint-dispatch 'number (lambda (s o) (declare (special b)) (format s b)))
(defvar b "~&Just another Lisp hacker~%")    (pprint #36rJesusCollegeCambridge)




More information about the Ieeefp-tests-devel mailing list