octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Symbolica package warning: Using rat() heuristics for double-precisi


From: Doug Stewart
Subject: Re: Symbolica package warning: Using rat() heuristics for double-precision input (is this what you wanted?)
Date: Fri, 17 Feb 2017 12:18:40 -0500



On Fri, Feb 17, 2017 at 11:42 AM, Przemek Klosowski <address@hidden> wrote:
I don't understand the symbolic package's precision propagation. It seems to know e.g. pi to arbitrary precision:

vpa(pi,55)
ans = (sym) 3.141592653589793238462643383279502884197169399375105821

but calculations seem to be limited to 50 significant digits:

vpa(pi/2,55)
ans = (sym) 1.570796326794896557998981734272092580795288085937500000

Is there something magic about 50?

GNU Octave, version 4.0.3
Octave was configured for "x86_64-redhat-linux-gnu".
OctSymPy v2.4.0: this is free software without warranty, see source.
Python 2.7.13 (default, Jan 12 2017, 17:59:37)
[GCC 6.3.1 20161221 (Red Hat 6.3.1-1)] on linux2
OctSymPy: Communication established.  SymPy v1.0.




The problem is that the interpreter  sees pi/2 as normal floats.

try these

vpa(pi/2,55)

q=sym(pi)
vpa(q/2,55)

# or
qq=sym(2)
vpa(pi/qq,55)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]