Ask Your Question

Arbitrary precision with power function

asked 2013-02-08 21:53:21 +0200

PlezzeR gravatar image

Hello! Sorry for my english. Why in Sage 5.6

numerical_approx((3**2.72), digits=200)


19.850425152727527944307439611293375492095947265625000000000000000000000\ 000000000000000000000000000000000000000000000000000000000000000000000000\ 000000000000000000000000000000000000000000000000000000000




19.850425152727527944307439611293375492095947265625000000000000000000000\ 000000000000000000000000000000000000000000000000000000000000000000000000\ 000000000000000000000000000000000000000000000000000000000000000000000000\ 000000000000000000000000000000000000000000000000000000000000000000000000\ 0000000000000

? After digit 5 zero, zero, zero. How to get more digits in Sage?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2013-02-08 23:41:50 +0200

ppurka gravatar image

updated 2013-02-09 00:01:19 +0200

You have lost precision in the exponent. Use this instead:

sage: RealField(1000)(3**RealField(1000)(2.72))

EDIT: In general, I think you need to ensure that you don't try to get higher precision after your computations. Rather, start with the higher precision from the very beginning.

edit flag offensive delete link more


I understand. Thank you! It's work. Also example for maxima: fpprec:5000; bfloat(3.0b0 ^ 2.72b0); Example for GP/PARI: \p 1000 3^2.72

PlezzeR gravatar imagePlezzeR ( 2013-02-11 10:08:48 +0200 )edit

Is there a way to choose a default precision such that one does not need to keep typing RealField(1000)?

Mafra gravatar imageMafra ( 2017-03-29 00:21:57 +0200 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2013-02-08 21:53:21 +0200

Seen: 630 times

Last updated: Feb 09 '13