Re: Turning an "Expression Float" into a Float?

Martin Rubey <[email protected]>
Newsgroups gmane.comp.mathematics.axiom.user
Message-ID <[email protected]>
"Alasdair McAndrew" <[email protected]> writes:

> The command
> 
> integrate(exp(-x^2),x=0..1)
> 
> produces an expression involving the error function.  But how do I turn this
> into a single Float?

It seems to be a bug.  Please file it on issuetracker, I'll try to fix it as
soon as possible.   Quite likely, it's just not implemented, in which a quick
workaround is to use romberg:

(6) -> romberg(x+->exp(-x^2),0,1,0.1,0.1,10,100)

   (6)
   [value= 0.7468241328 1242702543, error= 0.4 E -19, totalpts= 2049,
    success= true]
   Type: Record(value: Float,error: Float,totalpts: Integer,success: Boolean)


Martin
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.