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

How to evaluate cnorm(9)

Esdras
5-Regular Member

How to evaluate cnorm(9)

Hi everyone. I'm working with reliability and for many times I'm facing the problem that mathcad can't evaluate cnorm (x), when x is equal or bigger than 9; it returns 0. I read the comments related to the subject on https://community.ptc.com/t5/PTC-Mathcad-Questions/Standard-Normal-Dist/m-p/349437, but I couldn't solve the problem. It's not a problem that can be solved by going on format > results > tolerance (zero threshold) or tools > worksheet options > Built-in variables > convergence tolerance. I understand that mathcad can handle numbers up to 10^-307, but when solving an integral or, for example, applying cnorm function, the result is 0, when the number is less than 10^-17. I would be so thankful if someone could help me to solve this problem.

1 ACCEPTED SOLUTION

Accepted Solutions
Werner_E
24-Ruby IV
(To:Werner_E)

Addendum:

For pure numeric calculation you could use this kind of "scaling":Bild2.png

View solution in original post

7 REPLIES 7
Fred_Kohlhepp
23-Emerald I
(To:Esdras)

Not sure about your question.

In Prime 3.0

Capture.PNG

In Mathcad 15

CaptureA.PNG

can you post something showing cnorm(10)=   ??

Esdras
5-Regular Member
(To:Fred_Kohlhepp)

Hi FredKohlhepp. Actually, I made a mistake; I'm facing problems evaluating cnorm(-9). I'm so sorry for the mistake.

LucMeekes
23-Emerald II
(To:Esdras)

cnorm(x) should produce values near to 1 for any value of x >4.

Are you suggesting it's results suddenly drop to 0 when x reaches 9?

Or are you mistaken, and instead mean that it produces an actual 0 when x reaches or -9 (minus 9  !) or below?

 

Note that cnorm(x) = (erf(x/sqrt(2))-1)/2. You may want to see if that helps...

 

Success!

Luc

LucMeekes
23-Emerald II
(To:LucMeekes)

Correction: should be +1 after the erf (), not -1.
Esdras
5-Regular Member
(To:LucMeekes)

Hi LucMeekes. Yes, you were right. I made a mistake. The problem happens when solving cnorm(-9). I tried your solution using erf() function. It returns the same value of cnorm, but the problem continues. I can't evaluate cnorm (x), when x<-9. This question is so important for me because I'm working with reliability applied to structures, and  problems like this happens all the time.

 

I would like to point some possible solutions, but I don't know how to apply any of them. 

 

The first one is: If the problem is related to the integral, I remember reading somewhere that they were scaling the function to be integrated before the integration, and undo the scaling after. If It's possible, I could write the function equivalent to cnorm(x) and solve the problem, but I don't know how to scale the funcion f(x)=dnorm(x,0,1) to be integrated from -∞ up to -9. The integration of the function on the limits mentioned is equivalent to the cnorm(-9).

 

The second is: I read in another place about wrinting function in C to be added to the mathcad library. I'm just thinking; if in the C programming language It's possible to define some variable that is able to handle numbers less than 10^-17, maybe It would be possible to solve the problem. Actually Idon't know if the problem is numbers less than 10^-17 or the limitation of the program related to working with numbers above 17 decimal places. But the goal is to define a variable in C language that is able to handle these numbers.

 

Thank you all for the help and the good discussion.

Werner_E
24-Ruby IV
(To:Esdras)

Would symbolic evaluation be a solution for you?

Please keep in mind that the precision (number of significant digits) you specify after "float", does not only affect the display of the result but applies for the whole calculation!

Bild.png

Werner_E
24-Ruby IV
(To:Werner_E)

Addendum:

For pure numeric calculation you could use this kind of "scaling":Bild2.png

Announcements
Check out the latest
Mathcad Tip
"PTC Mathcad 15 / Prime 1-6 Update."