cancel
Showing results for
Did you mean:
cancel
Showing results for
Did you mean:

Community Tip - Your Friends List is a way to easily have access to the community members that you interact with the most! X

7-Bedrock

## How do I evaluate for 0/0

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?

1 ACCEPTED SOLUTION

Accepted Solutions
24-Ruby V
(To:JB_10220769)

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)

3 REPLIES 3
23-Emerald III
(To:JB_10220769)

Make it explicit, for example like this:

Success!
Luc

7-Bedrock
(To:LucMeekes)

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

24-Ruby V
(To:JB_10220769)

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)

Announcements
Top Tags