Add FRAC_1_SQRT_2PI constant to f16/f32/f64/f128 · model-checking/verify-rust-std@0444ab8 (original) (raw)
4 files changed
lines changed
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -68,6 +68,12 @@ pub mod consts { | ||
| 68 | 68 | pub const FRAC_1_SQRT_PI: f128 = |
| 69 | 69 | 0.564189583547756286948079451560772585844050629328998856844086_f128; |
| 70 | 70 | |
| 71 | +/// 1/sqrt(2π) | |
| 72 | + #[unstable(feature = "f128", issue = "116909")] | |
| 73 | +// Also, #[unstable(feature = "more_float_constants", issue = "103883")] | |
| 74 | +pub const FRAC_1_SQRT_2PI: f128 = | |
| 75 | +0.398942280401432677939946059934381868475858631164934657665926_f128; | |
| 76 | + | |
| 71 | 77 | /// 2/π |
| 72 | 78 | #[unstable(feature = "f128", issue = "116909")] |
| 73 | 79 | pub const FRAC_2_PI: f128 = 0.636619772367581343075535053490057448137838582961825794990669_f128; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -67,6 +67,11 @@ pub mod consts { | ||
| 67 | 67 | // Also, #[unstable(feature = "more_float_constants", issue = "103883")] |
| 68 | 68 | pub const FRAC_1_SQRT_PI: f16 = 0.564189583547756286948079451560772586_f16; |
| 69 | 69 | |
| 70 | +/// 1/sqrt(2π) | |
| 71 | + #[unstable(feature = "f16", issue = "116909")] | |
| 72 | +// Also, #[unstable(feature = "more_float_constants", issue = "103883")] | |
| 73 | +pub const FRAC_1_SQRT_2PI: f16 = 0.398942280401432677939946059934381868_f16; | |
| 74 | + | |
| 70 | 75 | /// 2/π |
| 71 | 76 | #[unstable(feature = "f16", issue = "116909")] |
| 72 | 77 | pub const FRAC_2_PI: f16 = 0.636619772367581343075535053490057448_f16; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -327,6 +327,10 @@ pub mod consts { | ||
| 327 | 327 | #[unstable(feature = "more_float_constants", issue = "103883")] |
| 328 | 328 | pub const FRAC_1_SQRT_PI: f32 = 0.564189583547756286948079451560772586_f32; |
| 329 | 329 | |
| 330 | +/// 1/sqrt(2π) | |
| 331 | + #[unstable(feature = "more_float_constants", issue = "103883")] | |
| 332 | +pub const FRAC_1_SQRT_2PI: f32 = 0.398942280401432677939946059934381868_f32; | |
| 333 | + | |
| 330 | 334 | /// 2/π |
| 331 | 335 | #[stable(feature = "rust1", since = "1.0.0")] |
| 332 | 336 | pub const FRAC_2_PI: f32 = 0.636619772367581343075535053490057448_f32; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -327,6 +327,10 @@ pub mod consts { | ||
| 327 | 327 | #[unstable(feature = "more_float_constants", issue = "103883")] |
| 328 | 328 | pub const FRAC_1_SQRT_PI: f64 = 0.564189583547756286948079451560772586_f64; |
| 329 | 329 | |
| 330 | +/// 1/sqrt(2π) | |
| 331 | + #[unstable(feature = "more_float_constants", issue = "103883")] | |
| 332 | +pub const FRAC_1_SQRT_2PI: f64 = 0.398942280401432677939946059934381868_f64; | |
| 333 | + | |
| 330 | 334 | /// 2/π |
| 331 | 335 | #[stable(feature = "rust1", since = "1.0.0")] |
| 332 | 336 | pub const FRAC_2_PI: f64 = 0.636619772367581343075535053490057448_f64; |