|
Thank you Steven for your response,
but you are not understanding. (Probably I wasn't clear, so I'll blame myself)
Maple performs my computation symbolically, and gives me back the correct analytic result to 100% accuracy .. but the expression is so complicated that just to EVALUATE that analytic expression, will require more than 1000 digits of precision. (1000 digits of precision gave me a curve that was not physically realistic, and I dont' think more will help).
Instead, I'm using a NUMERICAL SCHEME .. which doesn't deal with the analytic expressions at all.
This is analogous to finding the eigenvalues of a 3x3 matrix. Solving the cubic characteristic polynomial using caradno's formula gives 100% accurate analytic eigenvalues, but evaluating them results in truncation errors yielding overall errors up to 10^6 units in size [if you don't believe me see "Efficient Numerical Diagonalization of Hermitian 3x3 Matrices http://arxiv.org/abs/physics/0610206]. The Jacobi rotation NUMERICAL algorithm, doesn't even CONSIDER the characteristic polynomial, it just keeps modifying the matrix with operations that preserve the eigenvalues, until the non-diagonal elements are 0 (to machine precision), and therefore gives you much more accurate results than evaluating it symbolically and then evaluating it.
In fact with double precision, the numerical scheme is more accurate than with 1000 digits of precision using the analytic scheme (yes it's unintuitive). I am quite sure that MATLAB uses the numerical scheme for eigenvalue finding (because the analytic scheme won't work for matrices bigger than 4x4) .. I want it to use the numerical scheme, but with quadruple precision.
I'm afraid that if I use matlab's symbolic tool box, it will start using the analytic scheme to derive symbolic expressions for the eigenvalues, and then it will let me evaluate them with x-digits of precision (which is what maple does)
Does that make sense ??
"Steven Lord" <slord@mathworks.com> wrote in message <h298cb$j6e$1@fred.mathworks.com>...
>
> "Juliette Salexa" <juliette.physicist@gmail.com> wrote in message
> news:h2915s$ctj$1@fred.mathworks.com...
> >I need quadruple precision in matlab,
> > and the calculations with which I am dealing are not suitable for symbolic
> > arithmetic (the expressions are so complex that merely evaluating them
> > results in truncation errors leading to my answers being less accurate
> > than my numerical algorithm .. this was tested in maple with 1000 digits
> > of precision).
>
> So if 1000 digits of precision was not sufficient for your purposes, why
> would you expect that quadruple precision (which has much less than 1000
> digits of precision) would be?
>
> From what you said about evaluating them resulting in lower precision, are
> you trying to do something like:
>
> x = sym(3^400)
>
> and being disappointed about the precision? If so, realize that this
> evaluates 3^400 in double precision and converts that double precision value
> into a symbolic object. That's not what you want -- try this instead:
>
> y = sym(3)^400
>
> 3 can be exactly represented in double precision, and so sym(3) exactly
> captures the value 3 and sym(3)^400 causes the exponentiation to be
> performed symbolically, not numerically.
>
> > If there's not a package that allows me to deal with quadruple precision
> > .. Matlab should really incorporate one in its next version.
>
> There is one -- the arbitrary-precision capability of Symbolic Math Toolbox.
>
> --
> Steve Lord
> slord@mathworks.com
>
|