Mike Hansen schrieb:
On Sat, Apr 10, 2010 at 3:37 AM, bb <bblo...@arcor.de> wrote:
sage: n(sqrt(2.), digits=40)
1.414213562373095145474621858738828450441
sage: n(sqrt(2), digits=40)
1.414213562373095048801688724209698078570
sage:

If you wanted this to be more like Maxima, the appropriate thing to do
would some something like:

sage: RealNumber = RealField(137)
sage: sqrt(2.0)
1.414213562373095048801688724209698078570
sage: sqrt(2).n(digits=40)
1.414213562373095048801688724209698078570

Sage is missing the errror forwarding of Mathematica.

Yes, Sage does not have a numerical type that does Mathematica's
significance arithmetic.  An interesting thread about the merits and
demerits of significance arithmetic is
http://sci.tech-archive.net/Archive/sci.math.symbolic/2008-03/msg00014.html
.

One could do a little work to get Sage's interval arithmetic to do
something similar.

--Mike

Tnx for helping. I did some more experimentation. I dont want to bother you, but if you have some time and some pation I would be thankfull for one more explanation. Your tip works as expected, but if I use the method n() I still get 53 bit of significant bits??? (see last expression of the snippet.)

I argue, that the parameter of n() is set elsewhere in another Variable than RealNumber?

sage: RealNumber = RealField(137)
sage: sqrt(2.)
1.414213562373095048801688724209698078570
sage: _.prec()
137
sage: sqrt(2.0000000000000000000000000000000000000000000000000000000000000000000)
1.414213562373095048801688724209698078570
sage: _.prec()
137
sage: n(sqrt(2.0000000000000000000000000000000000000000000000000000000000000000000), digits=60)
1.41421356237309504880168872420969807856967336610324780267484
sage: _.prec()
203
sage: n(sqrt(2.0000000000000000000000000000000000000000000000000000000000000000000))
1.41421356237310
sage: _.prec()
53
sage:

Regards BB

--
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org

To unsubscribe, reply using "remove me" as the subject.

Reply via email to