Changeset 2563 for trunk/sources/ALGLIB/normaldistr.cs
- Timestamp:
- 12/17/09 17:05:22 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/ALGLIB/normaldistr.cs
r2445 r2563 68 68 s = Math.Sign(x); 69 69 x = Math.Abs(x); 70 if( x<0.5)70 if( (double)(x)<(double)(0.5) ) 71 71 { 72 72 xsq = x*x; … … 88 88 return result; 89 89 } 90 if( x>=10)90 if( (double)(x)>=(double)(10) ) 91 91 { 92 92 result = s; … … 131 131 double q = 0; 132 132 133 if( x<0)133 if( (double)(x)<(double)(0) ) 134 134 { 135 135 result = 2-erfc(-x); 136 136 return result; 137 137 } 138 if( x<0.5)138 if( (double)(x)<(double)(0.5) ) 139 139 { 140 140 result = 1.0-erf(x); 141 141 return result; 142 142 } 143 if( x>=10)143 if( (double)(x)>=(double)(10) ) 144 144 { 145 145 result = 0; … … 269 269 expm2 = 0.13533528323661269189; 270 270 s2pi = 2.50662827463100050242; 271 if( y0<=0)271 if( (double)(y0)<=(double)(0) ) 272 272 { 273 273 result = -AP.Math.MaxRealNumber; 274 274 return result; 275 275 } 276 if( y0>=1)276 if( (double)(y0)>=(double)(1) ) 277 277 { 278 278 result = AP.Math.MaxRealNumber; … … 281 281 code = 1; 282 282 y = y0; 283 if( y>1.0-expm2)283 if( (double)(y)>(double)(1.0-expm2) ) 284 284 { 285 285 y = 1.0-y; 286 286 code = 0; 287 287 } 288 if( y>expm2)288 if( (double)(y)>(double)(expm2) ) 289 289 { 290 290 y = y-0.5; … … 312 312 x0 = x-Math.Log(x)/x; 313 313 z = 1.0/x; 314 if( x<8.0)314 if( (double)(x)<(double)(8.0) ) 315 315 { 316 316 p1 = 4.05544892305962419923;
Note: See TracChangeset
for help on using the changeset viewer.