Click here to Skip to main content
15,913,130 members
Home / Discussions / C#
   

C#

 
GeneralPheonix Pin
leppie7-Oct-03 7:45
leppie7-Oct-03 7:45 
GeneralRe: Pheonix Pin
Blake Coverett7-Oct-03 15:43
Blake Coverett7-Oct-03 15:43 
GeneralBEGINNER: Help with messaging Pin
BambooMoon6-Oct-03 12:52
BambooMoon6-Oct-03 12:52 
GeneralRe: BEGINNER: Help with messaging Pin
jparsons6-Oct-03 12:54
jparsons6-Oct-03 12:54 
GeneralProblem with embedded NULLs. Pin
Alvaro Mendez6-Oct-03 12:24
Alvaro Mendez6-Oct-03 12:24 
GeneralShell Refresh (Desktop) Pin
Developer @ RGG Network6-Oct-03 10:53
Developer @ RGG Network6-Oct-03 10:53 
GeneralRe: Shell Refresh (Desktop) Pin
jtmtv186-Oct-03 17:53
jtmtv186-Oct-03 17:53 
GeneralRe: Shell Refresh (Desktop) Pin
Developer @ RGG Network6-Oct-03 20:20
Developer @ RGG Network6-Oct-03 20:20 
GeneralRe: Shell Refresh (Desktop) Pin
jtmtv187-Oct-03 13:08
jtmtv187-Oct-03 13:08 
GeneralLogic help: Storing the cast of a movie Pin
tsigo6-Oct-03 10:31
tsigo6-Oct-03 10:31 
GeneralRe: Logic help: Storing the cast of a movie Pin
Daniel M. Edwards6-Oct-03 12:18
Daniel M. Edwards6-Oct-03 12:18 
GeneralRe: Logic help: Storing the cast of a movie Pin
Mike Ellison6-Oct-03 14:47
Mike Ellison6-Oct-03 14:47 
GeneralRe: Logic help: Storing the cast of a movie Pin
tsigo6-Oct-03 14:57
tsigo6-Oct-03 14:57 
GeneralXML Schema Pin
frank216-Oct-03 9:01
frank216-Oct-03 9:01 
GeneralRe: XML Schema Pin
leppie6-Oct-03 9:08
leppie6-Oct-03 9:08 
GeneralPre-Build events for specific configurations Pin
Joe Woodbury6-Oct-03 8:42
professionalJoe Woodbury6-Oct-03 8:42 
GeneralRe: Pre-Build events for specific configurations Pin
leppie6-Oct-03 9:21
leppie6-Oct-03 9:21 
GeneralRe: Pre-Build events for specific configurations Pin
Joe Woodbury6-Oct-03 9:39
professionalJoe Woodbury6-Oct-03 9:39 
GeneralStatistical Functions in C# Pin
AZBugsBunny6-Oct-03 8:00
AZBugsBunny6-Oct-03 8:00 
GeneralRe: Statistical Functions in C# Pin
leppie6-Oct-03 9:28
leppie6-Oct-03 9:28 
GeneralRe: Statistical Functions in C# Pin
Kevin McFarlane6-Oct-03 10:37
Kevin McFarlane6-Oct-03 10:37 
GeneralRe: Statistical Functions in C# Pin
leppie6-Oct-03 12:31
leppie6-Oct-03 12:31 
GeneralRe: Statistical Functions in C# Pin
Donald_a8-Oct-03 3:40
Donald_a8-Oct-03 3:40 
I'm not sure exactly what you are after, but this may help?

using System;

namespace NormInvFunc{

	public class Normal
	{         
	        private static double Density(double x)
		{
			double y=Math.Pow (2*Math.PI ,-.5)*Math.Exp(-.5*x*x);
			return y;
		}

		public static double StandardNormal(double x)
		{
			double [] a=new double[5];
			a[0]=.31938153;
			a[1]=-.356563782;
			a[2]=1.781477937;
			a[3]=-1.821255978;
			a[4]=1.330274429;
 
			double K=.2316419;
			double L=Math.Abs(x);
			double nx=Density(L);
			double q=1/(1+K*L);
			double S=0;
			for(int j=0;j<5;j++)
			{
				S+= a[j]*Math.Pow(q,j+1);
			}
			double SND=1-nx*S;
			if(x<0)
			{
				SND=1-SND;
			}
			return SND;
 
		}
                                                               
		public static double StandardNormalInv(double R)
		{
			double Delta=1;
			double X=0;
			double Y=0;
			do
			{
				Y=X-(StandardNormal(X)-R)/Density(X);
				Delta=Math.Abs (Y-X);
				X=Y;
			}
			while (Delta>.000000001);
 
			return Y;
 		}
 
	}
 
}


NB will not return quite as many decimal places as excel.
Generalabout lock Pin
yyf6-Oct-03 5:52
yyf6-Oct-03 5:52 
GeneralRe: about lock Pin
jparsons6-Oct-03 6:21
jparsons6-Oct-03 6:21 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.