Community Tip - Want the oppurtunity to discuss enhancements to PTC products? Join a working group! X
Hello All,
I am using Mathcad Prime 4.0. As seen in the photo below, I am just trying to use a simple if statement. I am wondering what I am doing wrong? The answer I should be receiving in my check is "OK" . Any suggestions?
Solved! Go to Solution.
Your running into an accuracy issue. Bear in mind that:
- all united values are ALWAYS internally converted into SI units.
- there is ALWAYS a finite accuracy when dealing with numerics.
Here goes:
So the difference between x-y and z is just above 0.
When comparing numerical data, allow for some tolerance.
Success!
Luc
Your running into an accuracy issue. Bear in mind that:
- all united values are ALWAYS internally converted into SI units.
- there is ALWAYS a finite accuracy when dealing with numerics.
Here goes:
So the difference between x-y and z is just above 0.
When comparing numerical data, allow for some tolerance.
Success!
Luc
Makes sense, thank you for your help!
When comparing numerical data, allow for some tolerance.
One method to acheive this is to use Mathcad's "approximate equality" option:
That will work great in my situation. Thanks!