Is there a numerical type that uses arbitrary precision ?
Mostra commenti meno recenti
I'm looking for a numerical type that doesn't loose precision at all (for operations: + - * /).
For example in Boost-C++ thete is a type cpp_ratinal, that holds the number as arbitrary long numerator, and arbitrary long denumerator.
Is there some equivalent in Matlab ?
Risposte (2)
John D'Errico
il 19 Ago 2014
0 voti
Yes. A few options.
You can use the symbolic toolbox.
You can use the fractions toolbox, which allows use of my own vpi toolbox for the numerator and denominator, thus arbitrarily long integers for each.
Or you can use my own HPF toolbox for arithmetic on floats of arbitrary length, so while it only has a user defined precision, that will be as large as you choose.
Star Strider
il 19 Ago 2014
0 voti
Categorie
Scopri di più su Calculus in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!