Skip to content

Commit 927d430

Browse files
committed
msrv and format
1 parent f356c0a commit 927d430

File tree

3 files changed

+13
-5
lines changed

3 files changed

+13
-5
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
// autogenerated
22

3-
mod rem_pio2;
3+
mod rem_pio2;

libm/src/math/generic/generated/rem_pio2.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
use crate::support::HalfRep;
21
use super::super::rem_pio2::RemPio2Support;
3-
use crate::support::f64_to_bits;
2+
use crate::support::{HalfRep, f64_to_bits};
43

54
impl RemPio2Support for f64 {
65
const TO_INT: Self = 1.5 / f64::EPSILON;
@@ -19,7 +18,8 @@ impl RemPio2Support for f64 {
1918
const FRAC_3PI_2_HI: HalfRep<Self> = (f64_to_bits(hf64!("0x4.b65f1fccc8748p+0")) >> 32) as u32;
2019
const TAU_HI: HalfRep<Self> = (f64_to_bits(hf64!("0x6.487ed5110b46p+0")) >> 32) as u32;
2120
const FRAC_PI_2_HI: HalfRep<Self> = 0x921fb;
22-
const FRAC_2_POW_20_PI_2: HalfRep<Self> = (f64_to_bits(hf64!("0x1.921fb54442d18p+20")) >> 32) as u32;
21+
const FRAC_2_POW_20_PI_2: HalfRep<Self> =
22+
(f64_to_bits(hf64!("0x1.921fb54442d18p+20")) >> 32) as u32;
2323

2424
const MAGIC_F: Self = hf64!("0x1p24");
2525

libm/src/math/generic/rem_pio2.rs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,11 @@ use core::f64::consts;
44

55
use crate::support::{CastFrom, CastInto, DInt, Float, HInt, HalfRep, Int, MinInt};
66

7-
pub(crate) trait RemPio2Support: Float<Int: DInt<H: Int>> {
7+
pub(crate) trait RemPio2Support: Float
8+
where
9+
Self::Int: DInt,
10+
<Self::Int as DInt>::H: Int,
11+
{
812
const TO_INT: Self;
913
/// 53 bits of 2/pi
1014
const INV_PIO2: Self;
@@ -43,6 +47,8 @@ where
4347
F: RemPio2Support,
4448
F: CastInto<i32>,
4549
HalfRep<F>: Int + MinInt<Unsigned: Int<OtherSign: Int>>,
50+
F::Int: DInt,
51+
<F::Int as DInt>::H: Int,
4652
{
4753
let ix: HalfRep<F> = x.abs().to_bits().hi();
4854
let pos = x.is_sign_positive();
@@ -173,6 +179,8 @@ where
173179
F: RemPio2Support,
174180
F: CastInto<i32>,
175181
HalfRep<F>: Int,
182+
F::Int: DInt,
183+
<F::Int as DInt>::H: Int,
176184
{
177185
/* rint(x/(pi/2)), Assume round-to-nearest. */
178186
let tmp = x * F::INV_PIO2 + F::TO_INT;

0 commit comments

Comments
 (0)