Click here to Skip to main content
15,896,290 members
Home / Discussions / C#
   

C#

 
Questionadd controls to TabPage Pin
rcwoods30-May-06 23:06
rcwoods30-May-06 23:06 
AnswerRe: add controls to TabPage Pin
rah_sin30-May-06 23:20
professionalrah_sin30-May-06 23:20 
AnswerRe: add controls to TabPage Pin
Mairaaj Khan31-May-06 0:04
professionalMairaaj Khan31-May-06 0:04 
QuestionService starts and stops immediately Pin
israfel30-May-06 23:06
israfel30-May-06 23:06 
QuestionHow to Hide A Process in TaskManager ?? Pin
hdv21230-May-06 23:02
hdv21230-May-06 23:02 
AnswerRe: How to Hide A Process in TaskManager ?? Pin
Guffa31-May-06 0:14
Guffa31-May-06 0:14 
QuestionNorminv Function in C# Pin
Joachim Maes30-May-06 22:53
Joachim Maes30-May-06 22:53 
AnswerRe: Norminv Function in C# Pin
FarhanShariff16-Apr-14 23:13
professionalFarhanShariff16-Apr-14 23:13 
C#
private static  double  inverse(double p)
{
    // Coefficients in rational approximations




    var a = new double[]{-3.969683028665376e+01,  2.209460984245205e+02,
                      -2.759285104469687e+02,  1.383577518672690e+02,
                      -3.066479806614716e+01,  2.506628277459239e+00};


    var b = new double[]{-5.447609879822406e+01,  1.615858368580409e+02,
                      -1.556989798598866e+02,  6.680131188771972e+01,
                      -1.328068155288572e+01 };


    var c = new double[]{-7.784894002430293e-03, -3.223964580411365e-01,
                      -2.400758277161838e+00, -2.549732539343734e+00,
                      4.374664141464968e+00,  2.938163982698783e+00};


    var d = new double[]{7.784695709041462e-03, 3.224671290700398e-01,
                       2.445134137142996e+00,  3.754408661907416e+00};


    // Define break-points.
    var plow  = 0.02425;
    var phigh = 1 - plow;


    // Rational approximation for lower region:
    if ( p < plow )
    {
             var q  = Math.Sqrt(-2*Math.Log(p));
             return (((((c[0]*q+c[1])*q+c[2])*q+c[3])*q+c[4])*q+c[5]) /
                                             ((((d[0]*q+d[1])*q+d[2])*q+d[3])*q+1);
    }


    // Rational approximation for upper region:
    if ( phigh < p )
    {
             var q  = Math.Sqrt(-2*Math.Log(1-p));
             return -(((((c[0]*q+c[1])*q+c[2])*q+c[3])*q+c[4])*q+c[5]) /
                                                    ((((d[0]*q+d[1])*q+d[2])*q+d[3])*q+1);
    }


    // Rational approximation for central region:
    var q1 = p - 0.5;
    var r = q1*q1;
    return (((((a[0]*r+a[1])*r+a[2])*r+a[3])*r+a[4])*r+a[5])*q1 /
                             (((((b[0]*r+b[1])*r+b[2])*r+b[3])*r+b[4])*r+1);
}

QuestionHow to know the parent of Form class Pin
Maddie from Dartford30-May-06 21:55
Maddie from Dartford30-May-06 21:55 
AnswerRe: How to know the parent of Form class Pin
stancrm30-May-06 22:22
stancrm30-May-06 22:22 
AnswerRe: How to know the parent of Form class Pin
subburaj.sabapathy31-May-06 2:38
subburaj.sabapathy31-May-06 2:38 
QuestionInvalid Character in XmlDocument Pin
malikjhangirahmed@hotmail.com30-May-06 21:10
malikjhangirahmed@hotmail.com30-May-06 21:10 
AnswerRe: Invalid Character in XmlDocument Pin
NaNg1524131-May-06 1:09
NaNg1524131-May-06 1:09 
QuestionListbox Item Selection Pin
Brendan Vogt30-May-06 21:01
Brendan Vogt30-May-06 21:01 
AnswerRe: Listbox Item Selection Pin
malikjhangirahmed@hotmail.com30-May-06 21:19
malikjhangirahmed@hotmail.com30-May-06 21:19 
QuestionRe: Listbox Item Selection Pin
Brendan Vogt30-May-06 21:28
Brendan Vogt30-May-06 21:28 
AnswerRe: Listbox Item Selection [modified] Pin
albCode30-May-06 22:06
albCode30-May-06 22:06 
QuestionRe: Listbox Item Selection [modified] Pin
Brendan Vogt30-May-06 22:25
Brendan Vogt30-May-06 22:25 
QuestionDatagridview - programmatic Cell updation Question Pin
Tushar Bhatt30-May-06 20:58
Tushar Bhatt30-May-06 20:58 
AnswerRe: Datagridview - programmatic Cell updation Question Pin
Mairaaj Khan30-May-06 23:26
professionalMairaaj Khan30-May-06 23:26 
GeneralRe: Datagridview - programmatic Cell updation Question Pin
Tushar Bhatt1-Jun-06 19:09
Tushar Bhatt1-Jun-06 19:09 
QuestionEncryption Decryption Problem in Web Services Pin
malikjhangirahmed@hotmail.com30-May-06 20:50
malikjhangirahmed@hotmail.com30-May-06 20:50 
QuestionChanging type Pin
thepersonof30-May-06 20:49
thepersonof30-May-06 20:49 
AnswerRe: Changing type Pin
User 665830-May-06 23:50
User 665830-May-06 23:50 
GeneralRe: Changing type Pin
thepersonof30-May-06 23:55
thepersonof30-May-06 23:55 

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.