Reputation: 181
I'm using Sage math to do some calculation where I found the numerical evaluation quite different from that of python's.
For example, the evalf() nolonger works, instead it uses n() and gp().
My questions are:
what are different ways of numerical evaluation in Sage and what's their difference?
what's difference between n() and gp()? why the later seemed to be much slower?
Upvotes: 1
Views: 1196
Reputation: 4402
I assume you are referring to Sympy when you say evalf
. Anyway, n()
or numerical_approx()
is the equivalent. See the documentation. The default is 53 bits of accuracy.
You shouldn't be thinking of gp()
though, unless you really want to use the GP/Pari interpreter or convert something to GP.
Upvotes: 3