[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [Axiom-math] Is there a cleaner way to convert an expression tofloat
From: |
Bill Page |
Subject: |
RE: [Axiom-math] Is there a cleaner way to convert an expression tofloat ? |
Date: |
Tue, 18 Apr 2006 13:49:41 -0400 |
On April 18, 2006 1:45 PM Francois Maltey wrote:
>
> How can I convert an expression as sin (%pi/5) to a float ?
>
> I can use sin (%pi/5) + 0.0, but I find it's a dirty tick !
>
> (sin (%pi/5))::Float doesn't work.
>
> I refuse to go inside the formula and type : sin (%pi/5::Float).
>
> Is there an other ability ?
>
Since the error message is:
"Cannot convert from type Expression Integer to Float"
one might guess to use:
(sin (%pi/5))::Expression Float
and that would be right although the result is 'Expression Float'.
If you really want/need float you can write:
(sin (%pi/5))::Expression Float::Float
Regards,
Bill Page.