Skip to main content
1-Visitor
March 16, 2018
Solved

How to evaluate cnorm(9)

  • March 16, 2018
  • 2 replies
  • 4315 views

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.

Best answer by Werner_E

Addendum:

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

2 replies

23-Emerald I
March 22, 2018

Not sure about your question.

In Prime 3.0

Capture.PNG

In Mathcad 15

CaptureA.PNG

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

Esdras1-VisitorAuthor
1-Visitor
March 24, 2018

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

23-Emerald IV
March 22, 2018

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

23-Emerald IV
March 23, 2018
Correction: should be +1 after the erf (), not -1.
Esdras1-VisitorAuthor
1-Visitor
March 24, 2018

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.