Skip to content

ArithmeticConversion

Felix S. Klock II edited this page Jul 28, 2013 · 2 revisions

With respect to arithmetic, the most important change (by far) was the redefinition of real? to be true only of complex numbers whose imaginary part is an exact zero. Hardly anything else in the R6RS depended on this change, so we let it wait a while. For native Larceny and Petit Larceny, the conversion was implemented by changeset:5735 and changeset:5736. The conversion has been implemented (at least in part) for Common Larceny, but Common Larceny's arithmetic has not yet been thoroughly tested.

The (rnrs arithmetic fixnums), (rnrs arithmetic flonums), and (rnrs arithmetic bitwise) libraries were easy for us, but the specialized fixnum and flonum operations may at times be slower than Scheme's traditional generic operations (because the R6RS requires them to test the representation type of their arguments and, in some cases, the representation type of their results). Fixnum- and flonum-specific performance will be improved in v0.97, and may be improved further during our wholesale cleanup of primops.

Improving the performance of Larceny's bignum and ratnum arithmetic would be a moderately big deal, but has nothing to do with R6RS conformance.

Clone this wiki locally