Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

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.

share|improve this question

1 Answer 1

up vote 1 down vote accepted

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.

share|improve this answer
    
Mathematica does this, Matlab does not. Matlab stores numbers as ordinary floating point values, and will suffer from the same problems Actionscript does. –  Samuel Jan 21 '12 at 6:14
    

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.