Skip to content
This repository was archived by the owner on Apr 28, 2025. It is now read-only.

Remove most #[inline] annotations #210

Merged
merged 1 commit into from
Jul 11, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions src/math/acos.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ const QS2: f64 = 2.02094576023350569471e+00; /* 0x40002AE5, 0x9C598AC8 */
const QS3: f64 = -6.88283971605453293030e-01; /* 0xBFE6066C, 0x1B8D0159 */
const QS4: f64 = 7.70381505559019352791e-02; /* 0x3FB3B8C5, 0xB12E9282 */

#[inline]
fn r(z: f64) -> f64 {
let p: f64 = z * (PS0 + z * (PS1 + z * (PS2 + z * (PS3 + z * (PS4 + z * PS5)))));
let q: f64 = 1.0 + z * (QS1 + z * (QS2 + z * (QS3 + z * QS4)));
Expand All @@ -60,7 +59,6 @@ fn r(z: f64) -> f64 {
/// Computes the inverse cosine (arc cosine) of the input value.
/// Arguments must be in the range -1 to 1.
/// Returns values in radians, in the range of 0 to pi.
#[inline]
#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)]
pub fn acos(x: f64) -> f64 {
let x1p_120f = f64::from_bits(0x3870000000000000); // 0x1p-120 === 2 ^ -120
Expand Down
2 changes: 0 additions & 2 deletions src/math/acosf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ const P_S1: f32 = -4.2743422091e-02;
const P_S2: f32 = -8.6563630030e-03;
const Q_S1: f32 = -7.0662963390e-01;

#[inline]
fn r(z: f32) -> f32 {
let p = z * (P_S0 + z * (P_S1 + z * P_S2));
let q = 1. + z * Q_S1;
Expand All @@ -34,7 +33,6 @@ fn r(z: f32) -> f32 {
/// Computes the inverse cosine (arc cosine) of the input value.
/// Arguments must be in the range -1 to 1.
/// Returns values in radians, in the range of 0 to pi.
#[inline]
#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)]
pub fn acosf(x: f32) -> f32 {
let x1p_120 = f32::from_bits(0x03800000); // 0x1p-120 === 2 ^ (-120)
Expand Down
2 changes: 0 additions & 2 deletions src/math/asin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ const Q_S2: f64 = 2.02094576023350569471e+00; /* 0x40002AE5, 0x9C598AC8 */
const Q_S3: f64 = -6.88283971605453293030e-01; /* 0xBFE6066C, 0x1B8D0159 */
const Q_S4: f64 = 7.70381505559019352791e-02; /* 0x3FB3B8C5, 0xB12E9282 */

#[inline]
fn comp_r(z: f64) -> f64 {
let p = z * (P_S0 + z * (P_S1 + z * (P_S2 + z * (P_S3 + z * (P_S4 + z * P_S5)))));
let q = 1.0 + z * (Q_S1 + z * (Q_S2 + z * (Q_S3 + z * Q_S4)));
Expand All @@ -67,7 +66,6 @@ fn comp_r(z: f64) -> f64 {
/// Computes the inverse sine (arc sine) of the argument `x`.
/// Arguments to asin must be in the range -1 to 1.
/// Returns values in radians, in the range of -pi/2 to pi/2.
#[inline]
#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)]
pub fn asin(mut x: f64) -> f64 {
let z: f64;
Expand Down
2 changes: 0 additions & 2 deletions src/math/asinf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ const P_S1: f32 = -4.2743422091e-02;
const P_S2: f32 = -8.6563630030e-03;
const Q_S1: f32 = -7.0662963390e-01;

#[inline]
fn r(z: f32) -> f32 {
let p = z * (P_S0 + z * (P_S1 + z * P_S2));
let q = 1. + z * Q_S1;
Expand All @@ -36,7 +35,6 @@ fn r(z: f32) -> f32 {
/// Computes the inverse sine (arc sine) of the argument `x`.
/// Arguments to asin must be in the range -1 to 1.
/// Returns values in radians, in the range of -pi/2 to pi/2.
#[inline]
#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)]
pub fn asinf(mut x: f32) -> f32 {
let x1p_120 = f64::from_bits(0x3870000000000000); // 0x1p-120 === 2 ^ (-120)
Expand Down
1 change: 0 additions & 1 deletion src/math/atan.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ const AT: [f64; 11] = [
///
/// Computes the inverse tangent (arc tangent) of the input value.
/// Returns a value in radians, in the range of -pi/2 to pi/2.
#[inline]
#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)]
pub fn atan(x: f64) -> f64 {
let mut x = x;
Expand Down
1 change: 0 additions & 1 deletion src/math/atan2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ const PI_LO: f64 = 1.2246467991473531772E-16; /* 0x3CA1A626, 0x33145C07 */
/// Computes the inverse tangent (arc tangent) of `y/x`.
/// Produces the correct result even for angles near pi/2 or -pi/2 (that is, when `x` is near 0).
/// Returns a value in radians, in the range of -pi to pi.
#[inline]
#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)]
pub fn atan2(y: f64, x: f64) -> f64 {
if x.is_nan() || y.is_nan() {
Expand Down
1 change: 0 additions & 1 deletion src/math/atan2f.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ const PI_LO: f32 = -8.7422776573e-08; /* 0xb3bbbd2e */
/// Computes the inverse tangent (arc tangent) of `y/x`.
/// Produces the correct result even for angles near pi/2 or -pi/2 (that is, when `x` is near 0).
/// Returns a value in radians, in the range of -pi to pi.
#[inline]
#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)]
pub fn atan2f(y: f32, x: f32) -> f32 {
if x.is_nan() || y.is_nan() {
Expand Down
1 change: 0 additions & 1 deletion src/math/atanf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ const A_T: [f32; 5] = [
///
/// Computes the inverse tangent (arc tangent) of the input value.
/// Returns a value in radians, in the range of -pi/2 to pi/2.
#[inline]
#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)]
pub fn atanf(mut x: f32) -> f32 {
let x1p_120 = f32::from_bits(0x03800000); // 0x1p-120 === 2 ^ (-120)
Expand Down
1 change: 0 additions & 1 deletion src/math/cbrt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ const P4: f64 = 0.145996192886612446982; /* 0x3fc2b000, 0xd4e4edd7 */
// Cube root (f64)
///
/// Computes the cube root of the argument.
#[inline]
#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)]
pub fn cbrt(x: f64) -> f64 {
let x1p54 = f64::from_bits(0x4350000000000000); // 0x1p54 === 2 ^ 54
Expand Down
1 change: 0 additions & 1 deletion src/math/cbrtf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ const B2: u32 = 642849266; /* B2 = (127-127.0/3-24/3-0.03306235651)*2**23 */
/// Cube root (f32)
///
/// Computes the cube root of the argument.
#[inline]
#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)]
pub fn cbrtf(x: f32) -> f32 {
let x1p24 = f32::from_bits(0x4b800000); // 0x1p24f === 2 ^ 24
Expand Down
1 change: 0 additions & 1 deletion src/math/ceil.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ const TOINT: f64 = 1. / f64::EPSILON;
/// Ceil (f64)
///
/// Finds the nearest integer greater than or equal to `x`.
#[inline]
#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)]
pub fn ceil(x: f64) -> f64 {
// On wasm32 we know that LLVM's intrinsic will compile to an optimized
Expand Down
1 change: 0 additions & 1 deletion src/math/ceilf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ use core::f32;
/// Ceil (f32)
///
/// Finds the nearest integer greater than or equal to `x`.
#[inline]
#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)]
pub fn ceilf(x: f32) -> f32 {
// On wasm32 we know that LLVM's intrinsic will compile to an optimized
Expand Down
1 change: 0 additions & 1 deletion src/math/cos.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ use super::{k_cos, k_sin, rem_pio2};
// Accuracy:
// TRIG(x) returns trig(x) nearly rounded
//
#[inline]
#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)]
pub fn cos(x: f64) -> f64 {
let ix = (f64::to_bits(x) >> 32) as u32 & 0x7fffffff;
Expand Down
1 change: 0 additions & 1 deletion src/math/cosf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ const C2_PIO2: f64 = 2. * FRAC_PI_2; /* 0x400921FB, 0x54442D18 */
const C3_PIO2: f64 = 3. * FRAC_PI_2; /* 0x4012D97C, 0x7F3321D2 */
const C4_PIO2: f64 = 4. * FRAC_PI_2; /* 0x401921FB, 0x54442D18 */

#[inline]
#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)]
pub fn cosf(x: f32) -> f32 {
let x64 = x as f64;
Expand Down
1 change: 0 additions & 1 deletion src/math/cosh.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ use super::k_expo2;
/// Computes the hyperbolic cosine of the argument x.
/// Is defined as `(exp(x) + exp(-x))/2`
/// Angles are specified in radians.
#[inline]
#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)]
pub fn cosh(mut x: f64) -> f64 {
/* |x| */
Expand Down
1 change: 0 additions & 1 deletion src/math/coshf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ use super::k_expo2f;
/// Computes the hyperbolic cosine of the argument x.
/// Is defined as `(exp(x) + exp(-x))/2`
/// Angles are specified in radians.
#[inline]
#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)]
pub fn coshf(mut x: f32) -> f32 {
let x1p120 = f32::from_bits(0x7b800000); // 0x1p120f === 2 ^ 120
Expand Down
1 change: 0 additions & 1 deletion src/math/exp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ const P5: f64 = 4.13813679705723846039e-08; /* 0x3E663769, 0x72BEA4D0 */
///
/// Calculate the exponential of `x`, that is, *e* raised to the power `x`
/// (where *e* is the base of the natural system of logarithms, approximately 2.71828).
#[inline]
#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)]
pub fn exp(mut x: f64) -> f64 {
let x1p1023 = f64::from_bits(0x7fe0000000000000); // 0x1p1023 === 2 ^ 1023
Expand Down
1 change: 0 additions & 1 deletion src/math/exp2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,6 @@ static TBL: [u64; TBLSIZE * 2] = [
/// Exponential, base 2 (f64)
///
/// Calculate `2^x`, that is, 2 raised to the power `x`.
#[inline]
#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)]
pub fn exp2(mut x: f64) -> f64 {
let redux = f64::from_bits(0x4338000000000000) / TBLSIZE as f64;
Expand Down
1 change: 0 additions & 1 deletion src/math/exp2f.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ static EXP2FT: [u64; TBLSIZE] = [
/// Exponential, base 2 (f32)
///
/// Calculate `2^x`, that is, 2 raised to the power `x`.
#[inline]
#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)]
pub fn exp2f(mut x: f32) -> f32 {
let redux = f32::from_bits(0x4b400000) / TBLSIZE as f32;
Expand Down
1 change: 0 additions & 1 deletion src/math/expf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ const P2: f32 = -2.7667332906e-3; /* -0xb55215.0p-32 */
///
/// Calculate the exponential of `x`, that is, *e* raised to the power `x`
/// (where *e* is the base of the natural system of logarithms, approximately 2.71828).
#[inline]
#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)]
pub fn expf(mut x: f32) -> f32 {
let x1p127 = f32::from_bits(0x7f000000); // 0x1p127f === 2 ^ 127
Expand Down
1 change: 0 additions & 1 deletion src/math/expm1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ const Q5: f64 = -2.01099218183624371326e-07; /* BE8AFDB7 6E09C32D */
/// system of logarithms, approximately 2.71828).
/// The result is accurate even for small values of `x`,
/// where using `exp(x)-1` would lose many significant digits.
#[inline]
#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)]
pub fn expm1(mut x: f64) -> f64 {
let hi: f64;
Expand Down
1 change: 0 additions & 1 deletion src/math/expm1f.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ const Q2: f32 = 1.5807170421e-3; /* 0xcf3010.0p-33 */
/// system of logarithms, approximately 2.71828).
/// The result is accurate even for small values of `x`,
/// where using `exp(x)-1` would lose many significant digits.
#[inline]
#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)]
pub fn expm1f(mut x: f32) -> f32 {
let x1p127 = f32::from_bits(0x7f000000); // 0x1p127f === 2 ^ 127
Expand Down
1 change: 0 additions & 1 deletion src/math/expo2.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
use super::{combine_words, exp};

/* exp(x)/2 for x >= log(DBL_MAX), slightly better than 0.5*exp(x/2)*exp(x/2) */
#[inline]
#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)]
pub(crate) fn expo2(x: f64) -> f64 {
/* k is such that k*ln2 has minimal relative error and x - kln2 > log(DBL_MIN) */
Expand Down
1 change: 0 additions & 1 deletion src/math/fabs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ use core::u64;
/// Absolute value (magnitude) (f64)
/// Calculates the absolute value (magnitude) of the argument `x`,
/// by direct manipulation of the bit representation of `x`.
#[inline]
#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)]
pub fn fabs(x: f64) -> f64 {
// On wasm32 we know that LLVM's intrinsic will compile to an optimized
Expand Down
1 change: 0 additions & 1 deletion src/math/fabsf.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/// Absolute value (magnitude) (f32)
/// Calculates the absolute value (magnitude) of the argument `x`,
/// by direct manipulation of the bit representation of `x`.
#[inline]
#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)]
pub fn fabsf(x: f32) -> f32 {
// On wasm32 we know that LLVM's intrinsic will compile to an optimized
Expand Down
1 change: 0 additions & 1 deletion src/math/fdim.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ use core::f64;
/// * NAN if either argument is NAN.
///
/// A range error may occur.
#[inline]
#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)]
pub fn fdim(x: f64, y: f64) -> f64 {
if x.is_nan() {
Expand Down
1 change: 0 additions & 1 deletion src/math/fdimf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ use core::f32;
/// * NAN if either argument is NAN.
///
/// A range error may occur.
#[inline]
#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)]
pub fn fdimf(x: f32, y: f32) -> f32 {
if x.is_nan() {
Expand Down
1 change: 0 additions & 1 deletion src/math/floor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ const TOINT: f64 = 1. / f64::EPSILON;
/// Floor (f64)
///
/// Finds the nearest integer less than or equal to `x`.
#[inline]
#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)]
pub fn floor(x: f64) -> f64 {
// On wasm32 we know that LLVM's intrinsic will compile to an optimized
Expand Down
1 change: 0 additions & 1 deletion src/math/floorf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ use core::f32;
/// Floor (f32)
///
/// Finds the nearest integer less than or equal to `x`.
#[inline]
#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)]
pub fn floorf(x: f32) -> f32 {
// On wasm32 we know that LLVM's intrinsic will compile to an optimized
Expand Down
3 changes: 0 additions & 3 deletions src/math/fma.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ struct Num {
sign: i32,
}

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

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

#[inline]
fn mul(x: u64, y: u64) -> (u64, u64) {
let t1: u64;
let t2: u64;
Expand All @@ -53,7 +51,6 @@ fn mul(x: u64, y: u64) -> (u64, u64) {
/// Computes `(x*y)+z`, rounded as one ternary operation:
/// Computes the value (as if) to infinite precision and rounds once to the result format,
/// according to the rounding mode characterized by the value of FLT_ROUNDS.
#[inline]
#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)]
pub fn fma(x: f64, y: f64, z: f64) -> f64 {
let x1p63: f64 = f64::from_bits(0x43e0000000000000); // 0x1p63 === 2 ^ 63
Expand Down
1 change: 0 additions & 1 deletion src/math/fmaf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ use super::fenv::{
/// Computes `(x*y)+z`, rounded as one ternary operation:
/// Computes the value (as if) to infinite precision and rounds once to the result format,
/// according to the rounding mode characterized by the value of FLT_ROUNDS.
#[inline]
#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)]
pub fn fmaf(x: f32, y: f32, mut z: f32) -> f32 {
let xy: f64;
Expand Down
1 change: 0 additions & 1 deletion src/math/fmax.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#[inline]
#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)]
pub fn fmax(x: f64, y: f64) -> f64 {
// IEEE754 says: maxNum(x, y) is the canonicalized number y if x < y, x if y < x, the
Expand Down
1 change: 0 additions & 1 deletion src/math/fmaxf.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#[inline]
#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)]
pub fn fmaxf(x: f32, y: f32) -> f32 {
// IEEE754 says: maxNum(x, y) is the canonicalized number y if x < y, x if y < x, the
Expand Down
1 change: 0 additions & 1 deletion src/math/fmin.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#[inline]
#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)]
pub fn fmin(x: f64, y: f64) -> f64 {
// IEEE754 says: minNum(x, y) is the canonicalized number x if x < y, y if y < x, the
Expand Down
1 change: 0 additions & 1 deletion src/math/fminf.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#[inline]
#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)]
pub fn fminf(x: f32, y: f32) -> f32 {
// IEEE754 says: minNum(x, y) is the canonicalized number x if x < y, y if y < x, the
Expand Down
1 change: 0 additions & 1 deletion src/math/fmod.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
use core::u64;

#[inline]
#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)]
pub fn fmod(x: f64, y: f64) -> f64 {
let mut uxi = x.to_bits();
Expand Down
1 change: 0 additions & 1 deletion src/math/fmodf.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
use core::f32;
use core::u32;

#[inline]
#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)]
pub fn fmodf(x: f32, y: f32) -> f32 {
let mut uxi = x.to_bits();
Expand Down
2 changes: 0 additions & 2 deletions src/math/hypot.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ use super::sqrt;

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

#[inline]
fn sq(x: f64) -> (f64, f64) {
let xh: f64;
let xl: f64;
Expand All @@ -18,7 +17,6 @@ fn sq(x: f64) -> (f64, f64) {
(hi, lo)
}

#[inline]
#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)]
pub fn hypot(mut x: f64, mut y: f64) -> f64 {
let x1p700 = f64::from_bits(0x6bb0000000000000); // 0x1p700 === 2 ^ 700
Expand Down
1 change: 0 additions & 1 deletion src/math/hypotf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ use core::f32;

use super::sqrtf;

#[inline]
#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)]
pub fn hypotf(mut x: f32, mut y: f32) -> f32 {
let x1p90 = f32::from_bits(0x6c800000); // 0x1p90f === 2 ^ 90
Expand Down
1 change: 0 additions & 1 deletion src/math/k_cos.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ const C6: f64 = -1.13596475577881948265e-11; /* 0xBDA8FAE9, 0xBE8838D4 */
// expression for cos(). Retention happens in all cases tested
// under FreeBSD, so don't pessimize things by forcibly clipping
// any extra precision in w.
#[inline]
#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)]
pub(crate) fn k_cos(x: f64, y: f64) -> f64 {
let z = x * x;
Expand Down
1 change: 0 additions & 1 deletion src/math/k_cosf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ const C1: f64 = 0.0416666233237390631894; /* 0x155553e1053a42.0p-57 */
const C2: f64 = -0.00138867637746099294692; /* -0x16c087e80f1e27.0p-62 */
const C3: f64 = 0.0000243904487962774090654; /* 0x199342e0ee5069.0p-68 */

#[inline]
#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)]
pub(crate) fn k_cosf(x: f64) -> f32 {
let z = x * x;
Expand Down
1 change: 0 additions & 1 deletion src/math/k_expo2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ use super::exp;
const K: i32 = 2043;

/* expf(x)/2 for x >= log(FLT_MAX), slightly better than 0.5f*expf(x/2)*expf(x/2) */
#[inline]
#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)]
pub(crate) fn k_expo2(x: f64) -> f64 {
let k_ln2 = f64::from_bits(0x40962066151add8b);
Expand Down
1 change: 0 additions & 1 deletion src/math/k_expo2f.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ use super::expf;
const K: i32 = 235;

/* expf(x)/2 for x >= log(FLT_MAX), slightly better than 0.5f*expf(x/2)*expf(x/2) */
#[inline]
#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)]
pub(crate) fn k_expo2f(x: f32) -> f32 {
let k_ln2 = f32::from_bits(0x4322e3bc);
Expand Down
1 change: 0 additions & 1 deletion src/math/k_sin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ const S6: f64 = 1.58969099521155010221e-10; /* 0x3DE5D93A, 0x5ACFD57C */
// r = x *(S2+x *(S3+x *(S4+x *(S5+x *S6))))
// then 3 2
// sin(x) = x + (S1*x + (x *(r-y/2)+y))
#[inline]
#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)]
pub(crate) fn k_sin(x: f64, y: f64, iy: i32) -> f64 {
let z = x * x;
Expand Down
Loading