axiom-mail
[Top][All Lists]
Advanced

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

Re: [Axiom-mail] Getting numerical values from a closed form integration


From: Alasdair McAndrew
Subject: Re: [Axiom-mail] Getting numerical values from a closed form integration?
Date: Fri, 13 Jul 2007 00:04:06 +1000

Thank you, Francois and Bill, both solutions work fine.  I'm still getting my head around the concept of an "_expression_" as a type.  Integer, Float, Complex, List, String... they're all very well, but I'm still very unsure about "_expression_".  (Also still very unsure about lots of other things, too).

cheers,
Alasdair

On 7/12/07, Bill Page <address@hidden> wrote:
On 12 Jul 2007 12:58:49 +0200, Francois Maltey wrote:
> > For example:
> >
> > integrate(sin(2*x),x=-%pi/3..4*%pi/7)
> >
> > The answer is in closed form, but I can't convert it to a float.  At least:
> >
> > integrate(sin(2*x),x=-%pi/3..4*%pi/7)::Float
>
> Try
>
> numeric integrate(sin(2*x),x=-%pi/3..4*%pi/7)
>
> I get 0.20048...

I think that is a good solution. But one thing to keep in mind perhaps
for later use is that often when

  integrate(sin(2*x),x=-%pi/3..4*%pi/7)::Float

fails, the following similar coercion will work

  integrate(sin(2*x),x=-%pi/3..4*%pi/7)::_expression_ Float

I think the issue is a certain weakness in Axiom's system of coercions.

> Don't you find a strong typed CAS is nice for mathematics
> even if the final user is a little bored...
>

Francois, could you expand this comment? I am not sure what point you
are making when you say "bored". :-)

Regards,
Bill Page.


reply via email to

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