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

Re: [Scheme-reports] Numerical example (real? -2.5+0.0i)



Jussi Piitulainen scripsit:

> An example in July draft 6.2.5 shows (real? -2.5+0.0i) as #t. The text
> above the examples says (real? z) if and only if (zero? (imag-part z))
> and (exact? (imag-part z)). The imag-part is clearly not exact.
> 
> Would (real? -2.5+0i) => #t work, or does the decimal point in the
> real-part make the imag-part also inexact? How about -2+0i?

Yes, both should be true.  Fixed on trunk.

> Perhaps it is best to just change the value of the test to #f, or
> strike the whole example.

Changed to #f and the same example with "0i" added as #t.

> I notice also that one of the z's in that text is in italics and two
> are in fixed width.

Fixed.

-- 
John Cowan           http://www.ccil.org/~cowan            cowan@x
One of the oil men in heaven started a rumor of a gusher down in hell.  All
the other oil men left in a hurry for hell.  As he gets to thinking about
the rumor he had started he says to himself there might be something in
it after all.  So he leaves for hell in a hurry.    --Carl Sandburg

_______________________________________________
Scheme-reports mailing list
Scheme-reports@x
http://lists.scheme-reports.org/cgi-bin/mailman/listinfo/scheme-reports