[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Numbers and Pork Rinds



    Date: Mon, 28 Aug 89 12:35:45 EDT
    From: gls@Think.COM (Guy Steele)
    ... an implementation using IEEE arithmetic might find it completely
    convenient to have both exact and inexact floats; a result float would be
    exact if all inputs are exact AND the IEEE operation(s) reported no inexact
    exception....

Quite right.  With IEEE giving you this assistance you can even consider
using -only- IEEE floats in your Scheme implementation -- using them for
both exact and inexact numbers.  This should give you an adequate range of
exact integers to index vectors and measure the lengths of lists (as well
as a random collection of exact rationals of the form M/(2^N)).  This might
even be a reasonable thing to do if you're trying to do a quick and simple
Scheme implementation.  (But if your floating point hardware -doesn't- tell
you about loss of exactness, I can't imagine making such a choice.)