From 85c48728e7c1eb44f3892c15f155e58bfa64fe8c Mon Sep 17 00:00:00 2001 From: Jacob Lifshay Date: Thu, 13 May 2021 18:24:53 -0700 Subject: [PATCH] fix copysign --- src/prim.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/prim.rs b/src/prim.rs index 93c7940..4b3c6ca 100644 --- a/src/prim.rs +++ b/src/prim.rs @@ -1,6 +1,7 @@ +#[cfg(not(feature = "std"))] +use crate::scalar::{Scalar, Value}; use crate::{ f16::F16, - scalar::{Scalar, Value}, traits::{ConvertFrom, ConvertTo}, }; use core::{fmt, hash, ops}; @@ -233,7 +234,7 @@ macro_rules! impl_float { } fn copy_sign(self, sign: Self) -> Self { #[cfg(feature = "std")] - return $float::copysign(self); + return $float::copysign(self, sign); #[cfg(not(feature = "std"))] return crate::algorithms::base::copy_sign(Scalar, Value(self), Value(sign)).0; } -- 2.30.2