FAQ: Difference between revisions

308 bytes removed ,  24 June 2015
→‎How do I make Octave use more precision?: remove note about symbolic being useless. It's currently working fine via sympy
(→‎How do I make Octave use more precision?: remove note about symbolic being useless. It's currently working fine via sympy)
Line 596: Line 596:
would produce value 9999999999999990000, which is close to the maximum possible value for the uint64 type, but can't be at the moment input directly, doing uint64(9999999999999990000), due to the mentioned error of rounding.
would produce value 9999999999999990000, which is close to the maximum possible value for the uint64 type, but can't be at the moment input directly, doing uint64(9999999999999990000), due to the mentioned error of rounding.


Alternatively, one may use arbitrary precision arithmetic, which has as much precision as is practical to hold in your computer's memory. The ''symbolic'' package, when it works, has a vpa() function for arbitrary precision arithmetic. Note that arbitrary precision arithmetic must be implemented '''in software''' which makes it much slower than hardware floats.
Alternatively, one may use arbitrary precision arithmetic, which has as much precision as is practical to hold in your computer's memory. The ''symbolic'' package has a vpa() function for arbitrary precision arithmetic. Note that arbitrary precision arithmetic must be implemented '''in software''' which makes it much slower than hardware floats.
 
At present, however, the symbolic package is almost useless, since even when you get it to compile and not crash, it cannot handle any array type, which hardly helps for an array-oriented language like Octave. If this limitation is not important to you, attempt to use the symbolic package.


Consider carefully if your problem really needs more precision. Often if you're running out of precision the problem lies fundamentally in your methods being [http://en.wikipedia.org/wiki/Numerical_stability numerically unstable], so more precision will not help you here. If you absolutely must use arbitrary-precision arithmetic, you're at present better off using a CAS instead of Octave. An example of such a CAS is [http://sagemath.org Sage].
Consider carefully if your problem really needs more precision. Often if you're running out of precision the problem lies fundamentally in your methods being [http://en.wikipedia.org/wiki/Numerical_stability numerically unstable], so more precision will not help you here. If you absolutely must use arbitrary-precision arithmetic, you're at present better off using a CAS instead of Octave. An example of such a CAS is [http://sagemath.org Sage].