Replace super::super with crate::support where possible
Since `crate::support` now works in both `compiler-builtins` and `libm`, we can get rid of some of these unusual paths.
This commit is contained in:
committed by
Trevor Gross
parent
5032002c2f
commit
687902c1af
@@ -7,8 +7,7 @@
|
||||
//! performance seems to be better (based on icount) and it does not seem to experience rounding
|
||||
//! errors on i386.
|
||||
|
||||
use super::super::support::{FpResult, Status};
|
||||
use super::super::{Float, Int, IntTy, MinInt};
|
||||
use crate::support::{Float, FpResult, Int, IntTy, MinInt, Status};
|
||||
|
||||
#[inline]
|
||||
pub fn ceil<F: Float>(x: F) -> F {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
use super::super::Float;
|
||||
use crate::support::Float;
|
||||
|
||||
/// Copy the sign of `y` to `x`.
|
||||
#[inline]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
use super::super::Float;
|
||||
use crate::support::Float;
|
||||
|
||||
/// Absolute value.
|
||||
#[inline]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
use super::super::Float;
|
||||
use crate::support::Float;
|
||||
|
||||
#[inline]
|
||||
pub fn fdim<F: Float>(x: F, y: F) -> F {
|
||||
|
||||
@@ -7,8 +7,7 @@
|
||||
//! performance seems to be better (based on icount) and it does not seem to experience rounding
|
||||
//! errors on i386.
|
||||
|
||||
use super::super::support::{FpResult, Status};
|
||||
use super::super::{Float, Int, IntTy, MinInt};
|
||||
use crate::support::{Float, FpResult, Int, IntTy, MinInt, Status};
|
||||
|
||||
#[inline]
|
||||
pub fn floor<F: Float>(x: F) -> F {
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
//!
|
||||
//! [link]: https://grouper.ieee.org/groups/msc/ANSI_IEEE-Std-754-2019/background/minNum_maxNum_Removal_Demotion_v3.pdf
|
||||
|
||||
use super::super::Float;
|
||||
use crate::support::Float;
|
||||
|
||||
#[inline]
|
||||
pub fn fmax<F: Float>(x: F, y: F) -> F {
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
//!
|
||||
//! Excluded from our implementation is sNaN handling.
|
||||
|
||||
use super::super::Float;
|
||||
use crate::support::Float;
|
||||
|
||||
#[inline]
|
||||
pub fn fmaximum<F: Float>(x: F, y: F) -> F {
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
//!
|
||||
//! Excluded from our implementation is sNaN handling.
|
||||
|
||||
use super::super::Float;
|
||||
use crate::support::Float;
|
||||
|
||||
#[inline]
|
||||
pub fn fmaximum_num<F: Float>(x: F, y: F) -> F {
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
//!
|
||||
//! [link]: https://grouper.ieee.org/groups/msc/ANSI_IEEE-Std-754-2019/background/minNum_maxNum_Removal_Demotion_v3.pdf
|
||||
|
||||
use super::super::Float;
|
||||
use crate::support::Float;
|
||||
|
||||
#[inline]
|
||||
pub fn fmin<F: Float>(x: F, y: F) -> F {
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
//!
|
||||
//! Excluded from our implementation is sNaN handling.
|
||||
|
||||
use super::super::Float;
|
||||
use crate::support::Float;
|
||||
|
||||
#[inline]
|
||||
pub fn fminimum<F: Float>(x: F, y: F) -> F {
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
//!
|
||||
//! Excluded from our implementation is sNaN handling.
|
||||
|
||||
use super::super::Float;
|
||||
use crate::support::Float;
|
||||
|
||||
#[inline]
|
||||
pub fn fminimum_num<F: Float>(x: F, y: F) -> F {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* SPDX-License-Identifier: MIT OR Apache-2.0 */
|
||||
use super::super::{CastFrom, Float, Int, MinInt};
|
||||
use crate::support::{CastFrom, Float, Int, MinInt};
|
||||
|
||||
#[inline]
|
||||
pub fn fmod<F: Float>(x: F, y: F) -> F {
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
/* SPDX-License-Identifier: MIT */
|
||||
/* origin: musl src/math/rint.c */
|
||||
|
||||
use super::super::Float;
|
||||
use super::super::support::{FpResult, Round};
|
||||
use crate::support::{Float, FpResult, Round};
|
||||
|
||||
/// IEEE 754-2019 `roundToIntegralExact`, which respects rounding mode and raises inexact if
|
||||
/// applicable.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
use super::super::{Float, MinInt};
|
||||
use super::{copysign, trunc};
|
||||
use crate::support::{Float, MinInt};
|
||||
|
||||
#[inline]
|
||||
pub fn round<F: Float>(x: F) -> F {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
use super::super::{CastFrom, CastInto, Float, IntTy, MinInt};
|
||||
use crate::support::{CastFrom, CastInto, Float, IntTy, MinInt};
|
||||
|
||||
/// Scale the exponent.
|
||||
///
|
||||
|
||||
@@ -41,8 +41,9 @@
|
||||
//! Goldschmidt has the advantage over Newton-Raphson that `sqrt(x)` and `1/sqrt(x)` are
|
||||
//! computed at the same time, i.e. there is no need to calculate `1/sqrt(x)` and invert it.
|
||||
|
||||
use super::super::support::{FpResult, IntTy, Round, Status, cold_path};
|
||||
use super::super::{CastFrom, CastInto, DInt, Float, HInt, Int, MinInt};
|
||||
use crate::support::{
|
||||
CastFrom, CastInto, DInt, Float, FpResult, HInt, Int, IntTy, MinInt, Round, Status, cold_path,
|
||||
};
|
||||
|
||||
#[inline]
|
||||
pub fn sqrt<F>(x: F) -> F
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
/* SPDX-License-Identifier: MIT
|
||||
* origin: musl src/math/trunc.c */
|
||||
|
||||
use super::super::support::{FpResult, Status};
|
||||
use super::super::{Float, Int, IntTy, MinInt};
|
||||
use crate::support::{Float, FpResult, Int, IntTy, MinInt, Status};
|
||||
|
||||
#[inline]
|
||||
pub fn trunc<F: Float>(x: F) -> F {
|
||||
|
||||
Reference in New Issue
Block a user