axiom-developer
[Top][All Lists]
Advanced

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

## [Axiom-developer] Compiler coercion and DoubleFloat

 From: Vanuxem Grégory Subject: [Axiom-developer] Compiler coercion and DoubleFloat Date: Sun, 26 Feb 2006 17:45:22 +0100

```Hi,

Is it possible to avoid this compiler coercion ?

The code is:
R ==> DoubleFloat
two4: R := 24.0
fourty: R := 40.0::R
exp40: R := 235385266837019985.41::R

The compiler output is:
(SEQ | << |
(LET (|:| |two4| (|DoubleFloat|))
((|elt| (|Float|) |float|) 24 0 10))
| >> |
(LET (|:| |fourty| (|DoubleFloat|))
(|::| ((|elt| (|Float|) |float|) 40 0 10) (|DoubleFloat|)))
(LET (|:| |exp40| (|DoubleFloat|))
(|::| ((|elt| (|Float|) |float|) 23538526683701998541 -2 10)
(|DoubleFloat|)))

It seems that the compiler coerces all floating
point numbers to the Float domain, here (for example):

((|elt| (|Float|) |float|) 24 0 10).

It's not possible to use  two4: R := 24.0, i have to coerce
this Float to DoubleFloat (two4: R := 24.0::R)

But i want to obtain something like
((|elt| (|DoubleFloat|) |doublefloat|) 24.0)
Is it possible ?

Another question, where can i find (in src/interp) the code
responsible of this coercion ? Tim any idea ?

Cheers,

Greg

```

reply via email to

 [Prev in Thread] Current Thread [Next in Thread]