diff --git a/bin/ikarus b/bin/ikarus index 6f3d8bb..1b38533 100755 Binary files a/bin/ikarus and b/bin/ikarus differ diff --git a/bin/ikarus-fasl.c b/bin/ikarus-fasl.c index cfc47f1..4ac63dc 100644 --- a/bin/ikarus-fasl.c +++ b/bin/ikarus-fasl.c @@ -514,8 +514,15 @@ static ikp do_read(ikpcb* pcb, fasl_port* p){ ref(pt, off_cdr) = do_read(pcb, p); return pair; } - - + else if(c == 'f'){ + ikp x = ik_alloc(pcb, flonum_size) + vector_tag; + ref(x, -vector_tag) = flonum_tag; + fasl_read_buf(p, x+disp_flonum_data-vector_tag, 8); + if(put_mark_index){ + p->marks[put_mark_index] = x; + } + return x; + } else { fprintf(stderr, "invalid type '%c' (0x%02x) found in fasl file\n", c, c); exit(-1); diff --git a/src/ikarus.boot b/src/ikarus.boot index 0efd8b7..20c80a4 100644 Binary files a/src/ikarus.boot and b/src/ikarus.boot differ diff --git a/src/ikarus.fasl.write.ss b/src/ikarus.fasl.write.ss index b89c942..a4704cc 100644 --- a/src/ikarus.fasl.write.ss +++ b/src/ikarus.fasl.write.ss @@ -170,14 +170,14 @@ m] [(flonum? x) (write-char #\f p) - (write-byte ($flonum-u8-ref x 0) p) - (write-byte ($flonum-u8-ref x 1) p) - (write-byte ($flonum-u8-ref x 2) p) - (write-byte ($flonum-u8-ref x 3) p) - (write-byte ($flonum-u8-ref x 4) p) - (write-byte ($flonum-u8-ref x 5) p) - (write-byte ($flonum-u8-ref x 6) p) (write-byte ($flonum-u8-ref x 7) p) + (write-byte ($flonum-u8-ref x 6) p) + (write-byte ($flonum-u8-ref x 5) p) + (write-byte ($flonum-u8-ref x 4) p) + (write-byte ($flonum-u8-ref x 3) p) + (write-byte ($flonum-u8-ref x 2) p) + (write-byte ($flonum-u8-ref x 1) p) + (write-byte ($flonum-u8-ref x 0) p) m] [(ratnum? x) (write-char #\r p) diff --git a/src/ikarus.numerics.ss b/src/ikarus.numerics.ss index 42da3b2..39e9548 100644 --- a/src/ikarus.numerics.ss +++ b/src/ikarus.numerics.ss @@ -880,7 +880,7 @@ (if ($bignum-positive? x) x (- x))] [(flonum? x) (if ($flnegative? x) - ($fl* x (exact->inexact -1)) + ($fl* x -1.0) x)] [(ratnum? x) (let ([n ($ratnum-n x)])