[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [Axiom-developer] Compiler coercion and DoubleFloat
From: |
Vanuxem Grégory |
Subject: |
RE: [Axiom-developer] Compiler coercion and DoubleFloat |
Date: |
Tue, 28 Feb 2006 15:41:29 +0100 |
Hi,
> If I set $useBFasDefault in the Axiom interpreter I get the
> following error:
>
> (1) -> )boot $useBFasDefault:=false
> (SPADLET |$useBFasDefault| NIL)
> Value = NIL
> (1) -> two4: DoubleFloat := 24.0
>
> >> System error:
> Caught fatal error [memory may be damaged]
>
> protected-symbol-warn called with (NIL)
The interpreter parser is different from the spad parser.
The bug is probably in the float2Sex function (parsing of real numbers
in the interpreter):
bfForm := MAKE_-FLOAT(intPart, READ_-FROM_-STRING fracPartString,
LENGTH fracPartString, expPart)
[., frac, :exp] := bfForm
^^^^^^^^^^^^^^^
and MAKE-FLOAT returns a simple double float and not the (default)
BF "property", mantissa and exponent.
Cheers,
Greg