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

*To*: Aubrey Jaffer <agj@xxxxxxxxxxxx>*Subject*: Re: reading NaNs*From*: Alan Watson <a.watson@xxxxxxxxxxxxxxxx>*Date*: Sat, 29 Oct 2005 18:57:37 -0700*Cc*: tb@xxxxxxxxxx, srfi-77@xxxxxxxxxxxxxxxxx*Delivered-to*: srfi-77@xxxxxxxxxxxxxxxxx*In-reply-to*: <20051030013055.70E7D1B77BD@xxxxxxxxxxxxxxxxxxxxx>*Organization*: Centro de Radioastronomía y Astrofísica UNAM*References*: <20051021145326.816C11B77BB@xxxxxxxxxxxxxxxxxxxxx> <20051023195403.A50AF1B77BB@xxxxxxxxxxxxxxxxxxxxx> <435BEC21.60509@xxxxxxxxxxxx> <20051023205012.BFD241B77BB@xxxxxxxxxxxxxxxxxxxxx> <87zmoz27dg.fsf@xxxxxxxxxxxxx> <87hdb7kgmk.fsf@xxxxxxxxxxxxxxxxx> <87k6g3zw34.fsf@xxxxxxxxxxxxx> <871x2bkfj7.fsf@xxxxxxxxxxxxxxxxx> <8764rnu45b.fsf@xxxxxxxxxxxxx> <87br1fiv26.fsf@xxxxxxxxxxxxxxxxx> <87ll0jpu0q.fsf@xxxxxxxxxxxxx> <20051024022744.6CA581B77BB@xxxxxxxxxxxxxxxxxxxxx> <87veznbb37.fsf@xxxxxxxxxxxxx> <8764rnbaqr.fsf@xxxxxxxxxxxxxxxxx> <435C9A65.7060106@xxxxxxxxxxxxxxxx> <20051024153539.D98031B77BB@xxxxxxxxxxxxxxxxxxxxx> <435D49E3.2010001 @astrosmo.unam.mx> <20051025224529.2760C1B77BB@xxxxxxxxxxxxxxxxxxxxx> <435EBC32.801020 3@xxxxxxxxxxxxxxxx> <20051027164540.2B79C1B77BB@xxxxxxxxxxxxxxxxxxxxx> <436131C2.8070 003@xxxxxxxxxxxxxxxx> <20051029191005.043221B77BD@xxxxxxxxxxxxxxxxxxxxx> <4363E7E2.10 605@xxxxxxxxxxxxxxxx> <20051030013055.70E7D1B77BD@xxxxxxxxxxxxxxxxxxxxx>*User-agent*: Mozilla Thunderbird 1.0 (X11/20050317)

Aubrey Jaffer wrote:

Which bits do you twiddle so you don't spoof the hardware generated NaNs?This is platform dependent, even among IEEE-754 platforms.

Leaving NaN syntax unspecified does not prevent implementations from putting NaNs to any use.

Many behaviors are left unspecified by R5RS, such as when operations on exacts would produce results not representable as exacts; and division by zero; and multiplication by exact zero; and syntax for EOF.

Suppose we read data from a spectrometer, then compute the average of each pair of adjacent values and write it out. None of the values should be infinite. But if somehow a positive infinity and a negative infinity were adjacent, the average would be a NaN, which would be written out. The probability of this happening is so remote that writing checks for it borders on lunacy. But stuff does happen -- I would like my implementation to choke when reading those NaNs.

Where is the end of this? Are you proposing a series of read procedures: read-and-signal-error-on-NaN read-and-signal-error-on-negative-numbers read-and-signal-error-on-a-null-rather-than-a-pair read-and-signal-error-on-exact-integers-that-are-not-prime read-but-not-strings-containing-the-substring-frooble

Regards, Alan -- Dr Alan Watson Centro de Radioastronomía y Astrofísica Universidad Astronómico Nacional de México

**References**:**arithmetic issues***From:*Aubrey Jaffer

**Re: arithmetic issues***From:*Aubrey Jaffer

**Re: arithmetic issues***From:*Jens Axel Søgaard

**Re: arithmetic issues***From:*Aubrey Jaffer

**Re: arithmetic issues***From:*Marcin 'Qrczak' Kowalczyk

**Re: arithmetic issues***From:*Thomas Bushnell BSG

**Re: arithmetic issues***From:*Marcin 'Qrczak' Kowalczyk

**Re: arithmetic issues***From:*Thomas Bushnell BSG

**Re: arithmetic issues***From:*Marcin 'Qrczak' Kowalczyk

**Re: arithmetic issues***From:*Thomas Bushnell BSG

**Re: arithmetic issues***From:*Marcin 'Qrczak' Kowalczyk

**Re: arithmetic issues***From:*Aubrey Jaffer

**Re: arithmetic issues***From:*Marcin 'Qrczak' Kowalczyk

**Re: arithmetic issues***From:*Thomas Bushnell BSG

**Re: arithmetic issues***From:*Alan Watson

**reading NaNs***From:*Aubrey Jaffer

**Re: reading NaNs***From:*Aubrey Jaffer

**Re: reading NaNs***From:*Aubrey Jaffer

**Re: reading NaNs***From:*Aubrey Jaffer

**Re: reading NaNs***From:*Aubrey Jaffer

- Prev by Date:
**Re: reading NaNs** - Next by Date:
**Re: Error objects in general** - Previous by thread:
**Re: reading NaNs** - Next by thread:
**Re: reading NaNs** - Index(es):