1
$\begingroup$

Few days ago,I had a problem solving elementary equations in flash action script 3. I asked here and got an anwer ,I thank him very much.

  1. How to safely solve a pair of elementary equations in a floating point computing system?

I temporary fixed the program to replace any equation representing a straight line almost parallel to y axis by a new line completely parallel to y axis. Currently it seems that the fixed program finds the meeting point of 2 straight lines correctly if they are not parallel to each other.

Then , let me ask you my new question. If I use Matlab to solve the same problems , do I also need to do similar checking relating "cancellation of digits"?

Thanks in advance.

1 Answers 1

2

I know Mathematica, and believe Matlab, distinguishes between exact values (like integers, fractions, $\pi$, etc.) and approximate values (1.1023). Calculations with exact values are exact (when possible) and will not suffer from cancellation. It will be able to do $\frac1{10^9}-\frac1{10^9+1}=\frac1{10^{18}+10^9}$ accurately, with no loss of precision. If you ask for $0.000000001-0.00000000999999999000000000999999999$ you will lose precision because they are approximate numbers.

  • 1
    http://www.cs.utah.edu/~germain/PPS/Topics/Matlab/symbolic_math.html2012-01-21