Skip to content

Commit a0a5bd8

Browse files
committed
Remove most #[inline] annotations
These annotations fall into a few categories * Some simply aren't needed since functions will always be in the same CGU anyway and are already candidates for inlining. * Many are on massive functions which shouldn't be inlined across crates due to code size concerns. * Others aren't necessary since calls to this crate are rarely inlined anyway (since it's lowered through LLVM). If this crate is called directly and inlining is needed then LTO can always be turned on, otherwise this will benefit downstream consumers by avoiding re-codegen'ing so many functions.
1 parent 3a59e93 commit a0a5bd8

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

84 files changed

+2
-91
lines changed

src/math/acos.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ const QS2: f64 = 2.02094576023350569471e+00; /* 0x40002AE5, 0x9C598AC8 */
4848
const QS3: f64 = -6.88283971605453293030e-01; /* 0xBFE6066C, 0x1B8D0159 */
4949
const QS4: f64 = 7.70381505559019352791e-02; /* 0x3FB3B8C5, 0xB12E9282 */
5050

51-
#[inline]
5251
fn r(z: f64) -> f64 {
5352
let p: f64 = z * (PS0 + z * (PS1 + z * (PS2 + z * (PS3 + z * (PS4 + z * PS5)))));
5453
let q: f64 = 1.0 + z * (QS1 + z * (QS2 + z * (QS3 + z * QS4)));
@@ -60,7 +59,6 @@ fn r(z: f64) -> f64 {
6059
/// Computes the inverse cosine (arc cosine) of the input value.
6160
/// Arguments must be in the range -1 to 1.
6261
/// Returns values in radians, in the range of 0 to pi.
63-
#[inline]
6462
#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)]
6563
pub fn acos(x: f64) -> f64 {
6664
let x1p_120f = f64::from_bits(0x3870000000000000); // 0x1p-120 === 2 ^ -120

src/math/acosf.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ const P_S1: f32 = -4.2743422091e-02;
2222
const P_S2: f32 = -8.6563630030e-03;
2323
const Q_S1: f32 = -7.0662963390e-01;
2424

25-
#[inline]
2625
fn r(z: f32) -> f32 {
2726
let p = z * (P_S0 + z * (P_S1 + z * P_S2));
2827
let q = 1. + z * Q_S1;
@@ -34,7 +33,6 @@ fn r(z: f32) -> f32 {
3433
/// Computes the inverse cosine (arc cosine) of the input value.
3534
/// Arguments must be in the range -1 to 1.
3635
/// Returns values in radians, in the range of 0 to pi.
37-
#[inline]
3836
#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)]
3937
pub fn acosf(x: f32) -> f32 {
4038
let x1p_120 = f32::from_bits(0x03800000); // 0x1p-120 === 2 ^ (-120)

src/math/asin.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ const Q_S2: f64 = 2.02094576023350569471e+00; /* 0x40002AE5, 0x9C598AC8 */
5555
const Q_S3: f64 = -6.88283971605453293030e-01; /* 0xBFE6066C, 0x1B8D0159 */
5656
const Q_S4: f64 = 7.70381505559019352791e-02; /* 0x3FB3B8C5, 0xB12E9282 */
5757

58-
#[inline]
5958
fn comp_r(z: f64) -> f64 {
6059
let p = z * (P_S0 + z * (P_S1 + z * (P_S2 + z * (P_S3 + z * (P_S4 + z * P_S5)))));
6160
let q = 1.0 + z * (Q_S1 + z * (Q_S2 + z * (Q_S3 + z * Q_S4)));
@@ -67,7 +66,6 @@ fn comp_r(z: f64) -> f64 {
6766
/// Computes the inverse sine (arc sine) of the argument `x`.
6867
/// Arguments to asin must be in the range -1 to 1.
6968
/// Returns values in radians, in the range of -pi/2 to pi/2.
70-
#[inline]
7169
#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)]
7270
pub fn asin(mut x: f64) -> f64 {
7371
let z: f64;

src/math/asinf.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ const P_S1: f32 = -4.2743422091e-02;
2424
const P_S2: f32 = -8.6563630030e-03;
2525
const Q_S1: f32 = -7.0662963390e-01;
2626

27-
#[inline]
2827
fn r(z: f32) -> f32 {
2928
let p = z * (P_S0 + z * (P_S1 + z * P_S2));
3029
let q = 1. + z * Q_S1;
@@ -36,7 +35,6 @@ fn r(z: f32) -> f32 {
3635
/// Computes the inverse sine (arc sine) of the argument `x`.
3736
/// Arguments to asin must be in the range -1 to 1.
3837
/// Returns values in radians, in the range of -pi/2 to pi/2.
39-
#[inline]
4038
#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)]
4139
pub fn asinf(mut x: f32) -> f32 {
4240
let x1p_120 = f64::from_bits(0x3870000000000000); // 0x1p-120 === 2 ^ (-120)

src/math/atan.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@ const AT: [f64; 11] = [
6464
///
6565
/// Computes the inverse tangent (arc tangent) of the input value.
6666
/// Returns a value in radians, in the range of -pi/2 to pi/2.
67-
#[inline]
6867
#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)]
6968
pub fn atan(x: f64) -> f64 {
7069
let mut x = x;

src/math/atan2.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ const PI_LO: f64 = 1.2246467991473531772E-16; /* 0x3CA1A626, 0x33145C07 */
4848
/// Computes the inverse tangent (arc tangent) of `y/x`.
4949
/// Produces the correct result even for angles near pi/2 or -pi/2 (that is, when `x` is near 0).
5050
/// Returns a value in radians, in the range of -pi to pi.
51-
#[inline]
5251
#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)]
5352
pub fn atan2(y: f64, x: f64) -> f64 {
5453
if x.is_nan() || y.is_nan() {

src/math/atan2f.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ const PI_LO: f32 = -8.7422776573e-08; /* 0xb3bbbd2e */
2424
/// Computes the inverse tangent (arc tangent) of `y/x`.
2525
/// Produces the correct result even for angles near pi/2 or -pi/2 (that is, when `x` is near 0).
2626
/// Returns a value in radians, in the range of -pi to pi.
27-
#[inline]
2827
#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)]
2928
pub fn atan2f(y: f32, x: f32) -> f32 {
3029
if x.is_nan() || y.is_nan() {

src/math/atanf.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ const A_T: [f32; 5] = [
4141
///
4242
/// Computes the inverse tangent (arc tangent) of the input value.
4343
/// Returns a value in radians, in the range of -pi/2 to pi/2.
44-
#[inline]
4544
#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)]
4645
pub fn atanf(mut x: f32) -> f32 {
4746
let x1p_120 = f32::from_bits(0x03800000); // 0x1p-120 === 2 ^ (-120)

src/math/cbrt.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ const P4: f64 = 0.145996192886612446982; /* 0x3fc2b000, 0xd4e4edd7 */
3030
// Cube root (f64)
3131
///
3232
/// Computes the cube root of the argument.
33-
#[inline]
3433
#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)]
3534
pub fn cbrt(x: f64) -> f64 {
3635
let x1p54 = f64::from_bits(0x4350000000000000); // 0x1p54 === 2 ^ 54

src/math/cbrtf.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ const B2: u32 = 642849266; /* B2 = (127-127.0/3-24/3-0.03306235651)*2**23 */
2525
/// Cube root (f32)
2626
///
2727
/// Computes the cube root of the argument.
28-
#[inline]
2928
#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)]
3029
pub fn cbrtf(x: f32) -> f32 {
3130
let x1p24 = f32::from_bits(0x4b800000); // 0x1p24f === 2 ^ 24

src/math/ceil.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ const TOINT: f64 = 1. / f64::EPSILON;
55
/// Ceil (f64)
66
///
77
/// Finds the nearest integer greater than or equal to `x`.
8-
#[inline]
98
#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)]
109
pub fn ceil(x: f64) -> f64 {
1110
// On wasm32 we know that LLVM's intrinsic will compile to an optimized

src/math/ceilf.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ use core::f32;
33
/// Ceil (f32)
44
///
55
/// Finds the nearest integer greater than or equal to `x`.
6-
#[inline]
76
#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)]
87
pub fn ceilf(x: f32) -> f32 {
98
// On wasm32 we know that LLVM's intrinsic will compile to an optimized

src/math/cos.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ use super::{k_cos, k_sin, rem_pio2};
4141
// Accuracy:
4242
// TRIG(x) returns trig(x) nearly rounded
4343
//
44-
#[inline]
4544
#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)]
4645
pub fn cos(x: f64) -> f64 {
4746
let ix = (f64::to_bits(x) >> 32) as u32 & 0x7fffffff;

src/math/cosf.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ const C2_PIO2: f64 = 2. * FRAC_PI_2; /* 0x400921FB, 0x54442D18 */
2424
const C3_PIO2: f64 = 3. * FRAC_PI_2; /* 0x4012D97C, 0x7F3321D2 */
2525
const C4_PIO2: f64 = 4. * FRAC_PI_2; /* 0x401921FB, 0x54442D18 */
2626

27-
#[inline]
2827
#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)]
2928
pub fn cosf(x: f32) -> f32 {
3029
let x64 = x as f64;

src/math/cosh.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ use super::k_expo2;
77
/// Computes the hyperbolic cosine of the argument x.
88
/// Is defined as `(exp(x) + exp(-x))/2`
99
/// Angles are specified in radians.
10-
#[inline]
1110
#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)]
1211
pub fn cosh(mut x: f64) -> f64 {
1312
/* |x| */

src/math/coshf.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ use super::k_expo2f;
77
/// Computes the hyperbolic cosine of the argument x.
88
/// Is defined as `(exp(x) + exp(-x))/2`
99
/// Angles are specified in radians.
10-
#[inline]
1110
#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)]
1211
pub fn coshf(mut x: f32) -> f32 {
1312
let x1p120 = f32::from_bits(0x7b800000); // 0x1p120f === 2 ^ 120

src/math/exp.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,6 @@ const P5: f64 = 4.13813679705723846039e-08; /* 0x3E663769, 0x72BEA4D0 */
8181
///
8282
/// Calculate the exponential of `x`, that is, *e* raised to the power `x`
8383
/// (where *e* is the base of the natural system of logarithms, approximately 2.71828).
84-
#[inline]
8584
#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)]
8685
pub fn exp(mut x: f64) -> f64 {
8786
let x1p1023 = f64::from_bits(0x7fe0000000000000); // 0x1p1023 === 2 ^ 1023

src/math/exp2.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,6 @@ static TBL: [u64; TBLSIZE * 2] = [
322322
/// Exponential, base 2 (f64)
323323
///
324324
/// Calculate `2^x`, that is, 2 raised to the power `x`.
325-
#[inline]
326325
#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)]
327326
pub fn exp2(mut x: f64) -> f64 {
328327
let redux = f64::from_bits(0x4338000000000000) / TBLSIZE as f64;

src/math/exp2f.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,6 @@ static EXP2FT: [u64; TBLSIZE] = [
7373
/// Exponential, base 2 (f32)
7474
///
7575
/// Calculate `2^x`, that is, 2 raised to the power `x`.
76-
#[inline]
7776
#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)]
7877
pub fn exp2f(mut x: f32) -> f32 {
7978
let redux = f32::from_bits(0x4b400000) / TBLSIZE as f32;

src/math/expf.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ const P2: f32 = -2.7667332906e-3; /* -0xb55215.0p-32 */
3030
///
3131
/// Calculate the exponential of `x`, that is, *e* raised to the power `x`
3232
/// (where *e* is the base of the natural system of logarithms, approximately 2.71828).
33-
#[inline]
3433
#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)]
3534
pub fn expf(mut x: f32) -> f32 {
3635
let x1p127 = f32::from_bits(0x7f000000); // 0x1p127f === 2 ^ 127

src/math/expm1.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ const Q5: f64 = -2.01099218183624371326e-07; /* BE8AFDB7 6E09C32D */
3030
/// system of logarithms, approximately 2.71828).
3131
/// The result is accurate even for small values of `x`,
3232
/// where using `exp(x)-1` would lose many significant digits.
33-
#[inline]
3433
#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)]
3534
pub fn expm1(mut x: f64) -> f64 {
3635
let hi: f64;

src/math/expm1f.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ const Q2: f32 = 1.5807170421e-3; /* 0xcf3010.0p-33 */
3232
/// system of logarithms, approximately 2.71828).
3333
/// The result is accurate even for small values of `x`,
3434
/// where using `exp(x)-1` would lose many significant digits.
35-
#[inline]
3635
#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)]
3736
pub fn expm1f(mut x: f32) -> f32 {
3837
let x1p127 = f32::from_bits(0x7f000000); // 0x1p127f === 2 ^ 127

src/math/expo2.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
use super::{combine_words, exp};
22

33
/* exp(x)/2 for x >= log(DBL_MAX), slightly better than 0.5*exp(x/2)*exp(x/2) */
4-
#[inline]
54
#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)]
65
pub(crate) fn expo2(x: f64) -> f64 {
76
/* k is such that k*ln2 has minimal relative error and x - kln2 > log(DBL_MIN) */

src/math/fabs.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ use core::u64;
33
/// Absolute value (magnitude) (f64)
44
/// Calculates the absolute value (magnitude) of the argument `x`,
55
/// by direct manipulation of the bit representation of `x`.
6-
#[inline]
76
#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)]
87
pub fn fabs(x: f64) -> f64 {
98
// On wasm32 we know that LLVM's intrinsic will compile to an optimized

src/math/fabsf.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
/// Absolute value (magnitude) (f32)
22
/// Calculates the absolute value (magnitude) of the argument `x`,
33
/// by direct manipulation of the bit representation of `x`.
4-
#[inline]
54
#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)]
65
pub fn fabsf(x: f32) -> f32 {
76
// On wasm32 we know that LLVM's intrinsic will compile to an optimized

src/math/fdim.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ use core::f64;
88
/// * NAN if either argument is NAN.
99
///
1010
/// A range error may occur.
11-
#[inline]
1211
#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)]
1312
pub fn fdim(x: f64, y: f64) -> f64 {
1413
if x.is_nan() {

src/math/fdimf.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ use core::f32;
88
/// * NAN if either argument is NAN.
99
///
1010
/// A range error may occur.
11-
#[inline]
1211
#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)]
1312
pub fn fdimf(x: f32, y: f32) -> f32 {
1413
if x.is_nan() {

src/math/floor.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ const TOINT: f64 = 1. / f64::EPSILON;
55
/// Floor (f64)
66
///
77
/// Finds the nearest integer less than or equal to `x`.
8-
#[inline]
98
#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)]
109
pub fn floor(x: f64) -> f64 {
1110
// On wasm32 we know that LLVM's intrinsic will compile to an optimized

src/math/floorf.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ use core::f32;
33
/// Floor (f32)
44
///
55
/// Finds the nearest integer less than or equal to `x`.
6-
#[inline]
76
#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)]
87
pub fn floorf(x: f32) -> f32 {
98
// On wasm32 we know that LLVM's intrinsic will compile to an optimized

src/math/fma.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ struct Num {
1010
sign: i32,
1111
}
1212

13-
#[inline]
1413
fn normalize(x: f64) -> Num {
1514
let x1p63: f64 = f64::from_bits(0x43e0000000000000); // 0x1p63 === 2 ^ 63
1615

@@ -30,7 +29,6 @@ fn normalize(x: f64) -> Num {
3029
Num { m: ix, e, sign }
3130
}
3231

33-
#[inline]
3432
fn mul(x: u64, y: u64) -> (u64, u64) {
3533
let t1: u64;
3634
let t2: u64;
@@ -53,7 +51,6 @@ fn mul(x: u64, y: u64) -> (u64, u64) {
5351
/// Computes `(x*y)+z`, rounded as one ternary operation:
5452
/// Computes the value (as if) to infinite precision and rounds once to the result format,
5553
/// according to the rounding mode characterized by the value of FLT_ROUNDS.
56-
#[inline]
5754
#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)]
5855
pub fn fma(x: f64, y: f64, z: f64) -> f64 {
5956
let x1p63: f64 = f64::from_bits(0x43e0000000000000); // 0x1p63 === 2 ^ 63

src/math/fmaf.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ use super::fenv::{
4646
/// Computes `(x*y)+z`, rounded as one ternary operation:
4747
/// Computes the value (as if) to infinite precision and rounds once to the result format,
4848
/// according to the rounding mode characterized by the value of FLT_ROUNDS.
49-
#[inline]
5049
#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)]
5150
pub fn fmaf(x: f32, y: f32, mut z: f32) -> f32 {
5251
let xy: f64;

src/math/fmax.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#[inline]
21
#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)]
32
pub fn fmax(x: f64, y: f64) -> f64 {
43
// IEEE754 says: maxNum(x, y) is the canonicalized number y if x < y, x if y < x, the

src/math/fmaxf.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#[inline]
21
#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)]
32
pub fn fmaxf(x: f32, y: f32) -> f32 {
43
// IEEE754 says: maxNum(x, y) is the canonicalized number y if x < y, x if y < x, the

src/math/fmin.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#[inline]
21
#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)]
32
pub fn fmin(x: f64, y: f64) -> f64 {
43
// IEEE754 says: minNum(x, y) is the canonicalized number x if x < y, y if y < x, the

src/math/fminf.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#[inline]
21
#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)]
32
pub fn fminf(x: f32, y: f32) -> f32 {
43
// IEEE754 says: minNum(x, y) is the canonicalized number x if x < y, y if y < x, the

src/math/fmod.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
use core::u64;
22

3-
#[inline]
43
#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)]
54
pub fn fmod(x: f64, y: f64) -> f64 {
65
let mut uxi = x.to_bits();

src/math/fmodf.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
use core::f32;
22
use core::u32;
33

4-
#[inline]
54
#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)]
65
pub fn fmodf(x: f32, y: f32) -> f32 {
76
let mut uxi = x.to_bits();

src/math/hypot.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ use super::sqrt;
44

55
const SPLIT: f64 = 134217728. + 1.; // 0x1p27 + 1 === (2 ^ 27) + 1
66

7-
#[inline]
87
fn sq(x: f64) -> (f64, f64) {
98
let xh: f64;
109
let xl: f64;
@@ -18,7 +17,6 @@ fn sq(x: f64) -> (f64, f64) {
1817
(hi, lo)
1918
}
2019

21-
#[inline]
2220
#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)]
2321
pub fn hypot(mut x: f64, mut y: f64) -> f64 {
2422
let x1p700 = f64::from_bits(0x6bb0000000000000); // 0x1p700 === 2 ^ 700

src/math/hypotf.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ use core::f32;
22

33
use super::sqrtf;
44

5-
#[inline]
65
#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)]
76
pub fn hypotf(mut x: f32, mut y: f32) -> f32 {
87
let x1p90 = f32::from_bits(0x6c800000); // 0x1p90f === 2 ^ 90

src/math/k_cos.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ const C6: f64 = -1.13596475577881948265e-11; /* 0xBDA8FAE9, 0xBE8838D4 */
5151
// expression for cos(). Retention happens in all cases tested
5252
// under FreeBSD, so don't pessimize things by forcibly clipping
5353
// any extra precision in w.
54-
#[inline]
5554
#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)]
5655
pub(crate) fn k_cos(x: f64, y: f64) -> f64 {
5756
let z = x * x;

src/math/k_cosf.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ const C1: f64 = 0.0416666233237390631894; /* 0x155553e1053a42.0p-57 */
2020
const C2: f64 = -0.00138867637746099294692; /* -0x16c087e80f1e27.0p-62 */
2121
const C3: f64 = 0.0000243904487962774090654; /* 0x199342e0ee5069.0p-68 */
2222

23-
#[inline]
2423
#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)]
2524
pub(crate) fn k_cosf(x: f64) -> f32 {
2625
let z = x * x;

src/math/k_expo2.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ use super::exp;
44
const K: i32 = 2043;
55

66
/* expf(x)/2 for x >= log(FLT_MAX), slightly better than 0.5f*expf(x/2)*expf(x/2) */
7-
#[inline]
87
#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)]
98
pub(crate) fn k_expo2(x: f64) -> f64 {
109
let k_ln2 = f64::from_bits(0x40962066151add8b);

src/math/k_expo2f.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ use super::expf;
44
const K: i32 = 235;
55

66
/* expf(x)/2 for x >= log(FLT_MAX), slightly better than 0.5f*expf(x/2)*expf(x/2) */
7-
#[inline]
87
#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)]
98
pub(crate) fn k_expo2f(x: f32) -> f32 {
109
let k_ln2 = f32::from_bits(0x4322e3bc);

src/math/k_sin.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ const S6: f64 = 1.58969099521155010221e-10; /* 0x3DE5D93A, 0x5ACFD57C */
4343
// r = x *(S2+x *(S3+x *(S4+x *(S5+x *S6))))
4444
// then 3 2
4545
// sin(x) = x + (S1*x + (x *(r-y/2)+y))
46-
#[inline]
4746
#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)]
4847
pub(crate) fn k_sin(x: f64, y: f64, iy: i32) -> f64 {
4948
let z = x * x;

0 commit comments

Comments
 (0)