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

This page is part of the web mail archives of SRFI 77 from before July 7th, 2015. The new archives for SRFI 77 contain all messages, not just those from before July 7th, 2015.

*To*: will@xxxxxxxxxxx*Subject*: Re: numerical conditioning MAGNITUDE and /*From*: Aubrey Jaffer <agj@xxxxxxxxxxxx>*Date*: Wed, 21 Jun 2006 13:32:38 -0400 (EDT)*Cc*: srfi-77@xxxxxxxxxxxxxxxxx*Delivered-to*: srfi-77@xxxxxxxxxxxxxxxxx*In-reply-to*: <E1Ft2m8-0000YF-1n@xxxxxxxxxxxxxxxxx> (message from William D Clinger on Wed, 21 Jun 2006 09:29:44 -0400)*References*: <E1Ft2m8-0000YF-1n@xxxxxxxxxxxxxxxxx>

| From: William D Clinger <will@xxxxxxxxxxx> | Date: Wed, 21 Jun 2006 09:29:44 -0400 | | Aubrey Jaffer wrote: | ... | > Does SRFI-77 (or R5RS) mandate that floating-point procedures | > work for arguments generating the full range of possible outputs? | | No. Neither mandates that ... implementations | of the standard procedures be of high quality. R5RS Section 6.2.6 "Numerical Input and Output" places a stringent constraint on the quality of NUMBER->STRING: If Z is inexact, the radix is 10, and the above expression can be satisfied by a result that contains a decimal point, then the result contains a decimal point and IS EXPRESSED USING THE MINIMUM NUMBER OF DIGITS (exclusive of exponent and trailing zeroes) NEEDED TO MAKE THE ABOVE EXPRESSION TRUE [howtoprint], [howtoread]; otherwise the format of the result is unspecified. The operations for computing complex MAGNITUDE and / are: magnitude flonum operations sum product quotient abs < naive: 1 2 0 0 0 correct: 1 2 1 2 1 / flonum operations sum product quotient abs < naive: 3 6 2 0 0 correct: 3 3 3 2 1 Floating-point ABS involves just flipping one bit; it should be very fast. The correct versions are unlikely to be much slower than naive ones; correct-/ is perhaps faster. So the arguments for implementing these procedures incorrectly are weak.

**References**:**Re: numerical conditioning MAGNITUDE and /***From:*William D Clinger

- Prev by Date:
**Re: numerical conditioning MAGNITUDE and /** - Next by Date:
**Re: numerical conditioning MAGNITUDE and /** - Previous by thread:
**Re: numerical conditioning MAGNITUDE and /** - Next by thread:
**Re: numerical conditioning MAGNITUDE and /** - Index(es):