Re: [sage-support] An unreliable decimal approximation using N(prec=)

2019-05-23 Thread Vincent Delecroix
This is not an issue. The numerical approximation function N simply evaluates the expression at a given precision. There is no guarantee on the overall result as cancellation may occur. If you want accurate results, use interval or ball arithmetic. If you note your symbolic expression "expr" you c

[sage-support] An unreliable decimal approximation using N(prec=)

2019-05-23 Thread John Spitzer
When I run the following code on sagecell.sagemath.org, there seem to be problems in evaluating an expression I have generated in the course of my investigations: for k in range(1,101): print k,N(1/6583885550*(1212730912710731739903840*e^2 - 1209871310179356975377887)*e^(2/3) - 1/658388555

Re: [sage-support] How to define variables over integer

2019-05-23 Thread 'Justin C. Walker' via sage-support
> On May 8, 2019, at 06:14 , Santanu Sarkar > wrote: > > I know how to define variables over BooleanPolynomialRing. > This is as follows. > > n=4 > V=BooleanPolynomialRing(n+1,['z%d'%(i) for i in range(n+1)] ) > V.inject_variables() > > Can we define similar code over integers (ZZ) or ratio