#10164: Few digits of precision in N().
------------------------------------------------------+---------------------
Reporter: gerbicz | Owner: jason
Type: defect | Status:
needs_review
Priority: major | Milestone:
sage-5.0
Component: misc | Resolution:
Keywords: N, digits, numerical approximation | Work issues:
Report Upstream: N/A | Reviewers:
Karl-Dieter Crisman
Authors: Robert Gerbicz, Douglas McNeil | Merged in:
Dependencies: | Stopgaps:
------------------------------------------------------+---------------------
Description changed by davidloeffler:
Old description:
> For N(1+10**-400000,digits=400001) the displayed number of digits is only
> 400000, it is printing 1. followed by 399999 zeroes. The reason is that
> in functional.py: prec = int((digits+1) * 3.32192) + 1. However
> log(10)/log(2)~3.3219280948874>3.32192, so if digits is large the used
> precision will be smaller by some digits than the requested number of
> digits.
>
> The suggestion is to use 3.32193 instead of 3.32192, see the trivial
> patch.
New description:
For {{{ N(1+10**-400000,digits=400001)}}} the displayed number of digits
is only 400000, it is printing 1. followed by 399999 zeroes. The reason is
that in functional.py: {{{ prec = int((digits+1) * 3.32192) + 1}}}.
However {{{log(10)/log(2)~3.3219280948874>3.32192}}}, so if digits is
large the used precision will be smaller by some digits than the requested
number of digits.
The suggestion is to use 3.32193 instead of 3.32192, see the trivial
patch.
--
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/10164#comment:20>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.