Community Tip - Visit the PTCooler (the community lounge) to get to know your fellow community members and check out some of Dale's Friday Humor posts! X
I am not able to locate any checkbox in prime as it used to be there in Mathcad 15 to compute for 0/0
How can I have this checked?
Solved! Go to Solution.
Unlike MC15 and below there is no option in Prime to set 0/0 to zero for the whole worksheet.
But even in MC15 a division by zero as shown in your pic (we don't see it but I assume the numerator is not zero) throws an error.
Whenever you have calculations where it would be possible to divide by zero or anything like that, you may wrap them into a "try ...on error ..." statement (in MC15 its "... on error ...").
Of course if you do this, you can't distinguish if a/b failed because both a and b were zero or if it just failed because only b was zero.
If they need to distinguish between these cases more precisely, then you would have to use if-statements or the if-function as shown by Luc.
But both, "on error" statement and/or "if" have to be applied for every calculation whích could fail. There is no general option to set a/0 to +∞, 0 or -∞, depending on the sign of a.
Of course you could define a function "divide" at the top of your worksheet (e.g. in a collapsed area)
and use this function throughout instead of the built-in divide/fraction operator (at the cost of comfort, readability and clearness)
Make it explicit, for example like this:
Success!
Luc
Thank you for your input. I would like to know is there any generic steps that I can follow in Prime to avoid such issue
Unlike MC15 and below there is no option in Prime to set 0/0 to zero for the whole worksheet.
But even in MC15 a division by zero as shown in your pic (we don't see it but I assume the numerator is not zero) throws an error.
Whenever you have calculations where it would be possible to divide by zero or anything like that, you may wrap them into a "try ...on error ..." statement (in MC15 its "... on error ...").
Of course if you do this, you can't distinguish if a/b failed because both a and b were zero or if it just failed because only b was zero.
If they need to distinguish between these cases more precisely, then you would have to use if-statements or the if-function as shown by Luc.
But both, "on error" statement and/or "if" have to be applied for every calculation whích could fail. There is no general option to set a/0 to +∞, 0 or -∞, depending on the sign of a.
Of course you could define a function "divide" at the top of your worksheet (e.g. in a collapsed area)
and use this function throughout instead of the built-in divide/fraction operator (at the cost of comfort, readability and clearness)