[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*: Aubrey Jaffer <agj@xxxxxxxxxxxx>*Subject*: Re: arithmetic issues*From*: Alan Watson <a.watson@xxxxxxxxxxxxxxxx>*Date*: Fri, 21 Oct 2005 19:26:19 -0500*Cc*: srfi-77@xxxxxxxxxxxxxxxxx*Delivered-to*: srfi-77@xxxxxxxxxxxxxxxxx*In-reply-to*: <20051021145326.816C11B77BB@xxxxxxxxxxxxxxxxxxxxx>*Organization*: Centro de Radioastronomía y Astrofísica UNAM*References*: <20051021145326.816C11B77BB@xxxxxxxxxxxxxxxxxxxxx>*User-agent*: Mozilla Thunderbird 1.0 (X11/20050317)

Aubrey Jaffer wrote:

I am open to mandating bignums.

Flonums often are the most difficult feature to port to new architectures. But computer science is a half-centry old already -- tiny implementations can say they implement a subset of R6RS.

Both Common-Lisp and SLIB implement MOST-POSITIVE-FIXNUM and MOST-NEGATIVE-FIXNUM, which would be good additions to R6RS.

In well-written interpreted implementations, fixnum operations would provide no speed increase. SCM's type dispatch for immediate numbers is just 3 instructions: mask, test, and conditional jump. With modern processors executing scores of instructions in the time it takes for a single cache line to be retrieved from memory, most data type dispatches use time which would otherwise be spent waiting for program or data caches.

SCM has real-only operations like $log and $sin, which I never use; even though I do substantial floating point computing. In most nontrivial computations, a couple percent speed improvement from fiddling with the minutia of low-level procedures is dwarfed by the speed improvements netted by memoizing the results of certain sub-calculations or vectorizing computations in SRFI-63 uniform arrays.

-0.0 is insufficiently specified by SRFI-77; it will be a portability killer.

It is perfectly specified by the IEEE standard.

quotient+remainder introduces a new procedure naming convention which doesn't play well with -. The mathematical term for quotient with remainder is division; the verb form being divide. How about changing QUOTIENT+REMAINDER to DIVIDE.

Mathematically, mixed exactness complex numbers makes no sense. Twisting the whole numeric tower around this artifice is wrong.

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

**Follow-Ups**:**Re: arithmetic issues***From:*Marcin 'Qrczak' Kowalczyk

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

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

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

- Prev by Date:
**Re: Exactness** - Next by Date:
**Re: Exactness** - Previous by thread:
**Re: arithmetic issues** - Next by thread:
**Re: arithmetic issues** - Index(es):