Lines Matching full:self
10 fn to_i64(&self) -> Option<i64> { in to_i64()
11 Self::to_f32(*self).to_i64() in to_i64()
14 fn to_u64(&self) -> Option<u64> { in to_u64()
15 Self::to_f32(*self).to_u64() in to_u64()
18 fn to_i8(&self) -> Option<i8> { in to_i8()
19 Self::to_f32(*self).to_i8() in to_i8()
22 fn to_u8(&self) -> Option<u8> { in to_u8()
23 Self::to_f32(*self).to_u8() in to_u8()
26 fn to_i16(&self) -> Option<i16> { in to_i16()
27 Self::to_f32(*self).to_i16() in to_i16()
30 fn to_u16(&self) -> Option<u16> { in to_u16()
31 Self::to_f32(*self).to_u16() in to_u16()
34 fn to_i32(&self) -> Option<i32> { in to_i32()
35 Self::to_f32(*self).to_i32() in to_i32()
38 fn to_u32(&self) -> Option<u32> { in to_u32()
39 Self::to_f32(*self).to_u32() in to_u32()
42 fn to_f32(&self) -> Option<f32> { in to_f32()
43 Some(Self::to_f32(*self)) in to_f32()
46 fn to_f64(&self) -> Option<f64> { in to_f64()
47 Some(Self::to_f64(*self)) in to_f64()
53 fn from_i64(n: i64) -> Option<Self> { in from_i64() argument
54 n.to_f32().map(Self::from_f32) in from_i64()
57 fn from_u64(n: u64) -> Option<Self> { in from_u64() argument
58 n.to_f32().map(Self::from_f32) in from_u64()
61 fn from_i8(n: i8) -> Option<Self> { in from_i8() argument
62 n.to_f32().map(Self::from_f32) in from_i8()
65 fn from_u8(n: u8) -> Option<Self> { in from_u8() argument
66 n.to_f32().map(Self::from_f32) in from_u8()
69 fn from_i16(n: i16) -> Option<Self> { in from_i16() argument
70 n.to_f32().map(Self::from_f32) in from_i16()
73 fn from_u16(n: u16) -> Option<Self> { in from_u16() argument
74 n.to_f32().map(Self::from_f32) in from_u16()
77 fn from_i32(n: i32) -> Option<Self> { in from_i32() argument
78 n.to_f32().map(Self::from_f32) in from_i32()
81 fn from_u32(n: u32) -> Option<Self> { in from_u32() argument
82 n.to_f32().map(Self::from_f32) in from_u32()
85 fn from_f32(n: f32) -> Option<Self> { in from_f32() argument
86 n.to_f32().map(Self::from_f32) in from_f32()
89 fn from_f64(n: f64) -> Option<Self> { in from_f64() argument
90 n.to_f64().map(Self::from_f64) in from_f64()
98 fn from_str_radix(str: &str, radix: u32) -> Result<Self, Self::FromStrRadixErr> { in from_str_radix() argument
99 Ok(Self::from_f32(f32::from_str_radix(str, radix)?)) in from_str_radix()
105 fn one() -> Self { in one()
106 Self::ONE in one()
112 fn zero() -> Self { in zero()
113 Self::ZERO in zero()
117 fn is_zero(&self) -> bool { in is_zero()
118 *self == Self::ZERO in is_zero()
124 fn from<T: ToPrimitive>(n: T) -> Option<Self> { in from() argument
125 n.to_f32().map(Self::from_f32) in from()
131 fn infinity() -> Self { in infinity()
132 Self::INFINITY in infinity()
136 fn neg_infinity() -> Self { in neg_infinity()
137 Self::NEG_INFINITY in neg_infinity()
141 fn nan() -> Self { in nan()
142 Self::NAN in nan()
146 fn neg_zero() -> Self { in neg_zero()
147 Self::NEG_ZERO in neg_zero()
151 fn min_value() -> Self { in min_value()
152 Self::MIN in min_value()
156 fn min_positive_value() -> Self { in min_positive_value()
157 Self::MIN_POSITIVE in min_positive_value()
161 fn epsilon() -> Self { in epsilon()
162 Self::EPSILON in epsilon()
166 fn max_value() -> Self { in max_value()
167 Self::MAX in max_value()
171 fn is_nan(self) -> bool { in is_nan()
172 self.is_nan() in is_nan()
176 fn is_infinite(self) -> bool { in is_infinite()
177 self.is_infinite() in is_infinite()
181 fn is_finite(self) -> bool { in is_finite()
182 self.is_finite() in is_finite()
186 fn is_normal(self) -> bool { in is_normal()
187 self.is_normal() in is_normal()
191 fn classify(self) -> FpCategory { in classify()
192 self.classify() in classify()
196 fn floor(self) -> Self { in floor() argument
197 Self::from_f32(self.to_f32().floor()) in floor()
201 fn ceil(self) -> Self { in ceil() argument
202 Self::from_f32(self.to_f32().ceil()) in ceil()
206 fn round(self) -> Self { in round() argument
207 Self::from_f32(self.to_f32().round()) in round()
211 fn trunc(self) -> Self { in trunc() argument
212 Self::from_f32(self.to_f32().trunc()) in trunc()
216 fn fract(self) -> Self { in fract() argument
217 Self::from_f32(self.to_f32().fract()) in fract()
221 fn abs(self) -> Self { in abs() argument
222 Self::from_bits(self.to_bits() & 0x7FFF) in abs()
226 fn signum(self) -> Self { in signum() argument
227 self.signum() in signum()
231 fn is_sign_positive(self) -> bool { in is_sign_positive()
232 self.is_sign_positive() in is_sign_positive()
236 fn is_sign_negative(self) -> bool { in is_sign_negative()
237 self.is_sign_negative() in is_sign_negative()
240 fn min(self, other: Self) -> Self { in min() argument
241 match self.partial_cmp(&other) { in min()
243 if self.is_nan() { in min()
246 self in min()
250 Some(Ordering::Less) => self, in min()
254 fn max(self, other: Self) -> Self { in max() argument
255 match self.partial_cmp(&other) { in max()
257 if self.is_nan() { in max()
260 self in max()
263 Some(Ordering::Greater) | Some(Ordering::Equal) => self, in max()
269 fn recip(self) -> Self { in recip() argument
270 Self::from_f32(self.to_f32().recip()) in recip()
274 fn powi(self, exp: i32) -> Self { in powi() argument
275 Self::from_f32(self.to_f32().powi(exp)) in powi()
279 fn to_degrees(self) -> Self { in to_degrees() argument
280 Self::from_f32(self.to_f32().to_degrees()) in to_degrees()
284 fn to_radians(self) -> Self { in to_radians() argument
285 Self::from_f32(self.to_f32().to_radians()) in to_radians()
289 fn integer_decode(self) -> (u64, i16, i8) { in integer_decode()
290 num_traits::float::FloatCore::integer_decode(self.to_f32()) in integer_decode()
296 fn nan() -> Self { in nan()
297 Self::NAN in nan()
301 fn infinity() -> Self { in infinity()
302 Self::INFINITY in infinity()
306 fn neg_infinity() -> Self { in neg_infinity()
307 Self::NEG_INFINITY in neg_infinity()
311 fn neg_zero() -> Self { in neg_zero()
312 Self::NEG_ZERO in neg_zero()
316 fn min_value() -> Self { in min_value()
317 Self::MIN in min_value()
321 fn min_positive_value() -> Self { in min_positive_value()
322 Self::MIN_POSITIVE in min_positive_value()
326 fn epsilon() -> Self { in epsilon()
327 Self::EPSILON in epsilon()
331 fn max_value() -> Self { in max_value()
332 Self::MAX in max_value()
336 fn is_nan(self) -> bool { in is_nan()
337 self.is_nan() in is_nan()
341 fn is_infinite(self) -> bool { in is_infinite()
342 self.is_infinite() in is_infinite()
346 fn is_finite(self) -> bool { in is_finite()
347 self.is_finite() in is_finite()
351 fn is_normal(self) -> bool { in is_normal()
352 self.is_normal() in is_normal()
356 fn classify(self) -> FpCategory { in classify()
357 self.classify() in classify()
361 fn floor(self) -> Self { in floor() argument
362 Self::from_f32(self.to_f32().floor()) in floor()
366 fn ceil(self) -> Self { in ceil() argument
367 Self::from_f32(self.to_f32().ceil()) in ceil()
371 fn round(self) -> Self { in round() argument
372 Self::from_f32(self.to_f32().round()) in round()
376 fn trunc(self) -> Self { in trunc() argument
377 Self::from_f32(self.to_f32().trunc()) in trunc()
381 fn fract(self) -> Self { in fract() argument
382 Self::from_f32(self.to_f32().fract()) in fract()
386 fn abs(self) -> Self { in abs() argument
387 Self::from_f32(self.to_f32().abs()) in abs()
391 fn signum(self) -> Self { in signum() argument
392 Self::from_f32(self.to_f32().signum()) in signum()
396 fn is_sign_positive(self) -> bool { in is_sign_positive()
397 self.is_sign_positive() in is_sign_positive()
401 fn is_sign_negative(self) -> bool { in is_sign_negative()
402 self.is_sign_negative() in is_sign_negative()
406 fn mul_add(self, a: Self, b: Self) -> Self { in mul_add() argument
407 Self::from_f32(self.to_f32().mul_add(a.to_f32(), b.to_f32())) in mul_add()
411 fn recip(self) -> Self { in recip() argument
412 Self::from_f32(self.to_f32().recip()) in recip()
416 fn powi(self, n: i32) -> Self { in powi() argument
417 Self::from_f32(self.to_f32().powi(n)) in powi()
421 fn powf(self, n: Self) -> Self { in powf() argument
422 Self::from_f32(self.to_f32().powf(n.to_f32())) in powf()
426 fn sqrt(self) -> Self { in sqrt() argument
427 Self::from_f32(self.to_f32().sqrt()) in sqrt()
431 fn exp(self) -> Self { in exp() argument
432 Self::from_f32(self.to_f32().exp()) in exp()
436 fn exp2(self) -> Self { in exp2() argument
437 Self::from_f32(self.to_f32().exp2()) in exp2()
441 fn ln(self) -> Self { in ln() argument
442 Self::from_f32(self.to_f32().ln()) in ln()
446 fn log(self, base: Self) -> Self { in log() argument
447 Self::from_f32(self.to_f32().log(base.to_f32())) in log()
451 fn log2(self) -> Self { in log2() argument
452 Self::from_f32(self.to_f32().log2()) in log2()
456 fn log10(self) -> Self { in log10() argument
457 Self::from_f32(self.to_f32().log10()) in log10()
461 fn to_degrees(self) -> Self { in to_degrees() argument
462 Self::from_f32(self.to_f32().to_degrees()) in to_degrees()
466 fn to_radians(self) -> Self { in to_radians() argument
467 Self::from_f32(self.to_f32().to_radians()) in to_radians()
471 fn max(self, other: Self) -> Self { in max() argument
472 self.max(other) in max()
476 fn min(self, other: Self) -> Self { in min() argument
477 self.min(other) in min()
481 fn abs_sub(self, other: Self) -> Self { in abs_sub() argument
482 Self::from_f32((self.to_f32() - other.to_f32()).max(0.0)) in abs_sub()
486 fn cbrt(self) -> Self { in cbrt() argument
487 Self::from_f32(self.to_f32().cbrt()) in cbrt()
491 fn hypot(self, other: Self) -> Self { in hypot() argument
492 Self::from_f32(self.to_f32().hypot(other.to_f32())) in hypot()
496 fn sin(self) -> Self { in sin() argument
497 Self::from_f32(self.to_f32().sin()) in sin()
501 fn cos(self) -> Self { in cos() argument
502 Self::from_f32(self.to_f32().cos()) in cos()
506 fn tan(self) -> Self { in tan() argument
507 Self::from_f32(self.to_f32().tan()) in tan()
511 fn asin(self) -> Self { in asin() argument
512 Self::from_f32(self.to_f32().asin()) in asin()
516 fn acos(self) -> Self { in acos() argument
517 Self::from_f32(self.to_f32().acos()) in acos()
521 fn atan(self) -> Self { in atan() argument
522 Self::from_f32(self.to_f32().atan()) in atan()
526 fn atan2(self, other: Self) -> Self { in atan2() argument
527 Self::from_f32(self.to_f32().atan2(other.to_f32())) in atan2()
531 fn sin_cos(self) -> (Self, Self) { in sin_cos() argument
532 let (sin, cos) = self.to_f32().sin_cos(); in sin_cos()
533 (Self::from_f32(sin), Self::from_f32(cos)) in sin_cos()
537 fn exp_m1(self) -> Self { in exp_m1() argument
538 Self::from_f32(self.to_f32().exp_m1()) in exp_m1()
542 fn ln_1p(self) -> Self { in ln_1p() argument
543 Self::from_f32(self.to_f32().ln_1p()) in ln_1p()
547 fn sinh(self) -> Self { in sinh() argument
548 Self::from_f32(self.to_f32().sinh()) in sinh()
552 fn cosh(self) -> Self { in cosh() argument
553 Self::from_f32(self.to_f32().cosh()) in cosh()
557 fn tanh(self) -> Self { in tanh() argument
558 Self::from_f32(self.to_f32().tanh()) in tanh()
562 fn asinh(self) -> Self { in asinh() argument
563 Self::from_f32(self.to_f32().asinh()) in asinh()
567 fn acosh(self) -> Self { in acosh() argument
568 Self::from_f32(self.to_f32().acosh()) in acosh()
572 fn atanh(self) -> Self { in atanh() argument
573 Self::from_f32(self.to_f32().atanh()) in atanh()
577 fn integer_decode(self) -> (u64, i16, i8) { in integer_decode()
578 num_traits::float::Float::integer_decode(self.to_f32()) in integer_decode()
584 fn E() -> Self { in E()
585 Self::E in E()
589 fn FRAC_1_PI() -> Self { in FRAC_1_PI()
590 Self::FRAC_1_PI in FRAC_1_PI()
594 fn FRAC_1_SQRT_2() -> Self { in FRAC_1_SQRT_2()
595 Self::FRAC_1_SQRT_2 in FRAC_1_SQRT_2()
599 fn FRAC_2_PI() -> Self { in FRAC_2_PI()
600 Self::FRAC_2_PI in FRAC_2_PI()
604 fn FRAC_2_SQRT_PI() -> Self { in FRAC_2_SQRT_PI()
605 Self::FRAC_2_SQRT_PI in FRAC_2_SQRT_PI()
609 fn FRAC_PI_2() -> Self { in FRAC_PI_2()
610 Self::FRAC_PI_2 in FRAC_PI_2()
614 fn FRAC_PI_3() -> Self { in FRAC_PI_3()
615 Self::FRAC_PI_3 in FRAC_PI_3()
619 fn FRAC_PI_4() -> Self { in FRAC_PI_4()
620 Self::FRAC_PI_4 in FRAC_PI_4()
624 fn FRAC_PI_6() -> Self { in FRAC_PI_6()
625 Self::FRAC_PI_6 in FRAC_PI_6()
629 fn FRAC_PI_8() -> Self { in FRAC_PI_8()
630 Self::FRAC_PI_8 in FRAC_PI_8()
634 fn LN_10() -> Self { in LN_10()
635 Self::LN_10 in LN_10()
639 fn LN_2() -> Self { in LN_2()
640 Self::LN_2 in LN_2()
644 fn LOG10_E() -> Self { in LOG10_E()
645 Self::LOG10_E in LOG10_E()
649 fn LOG2_E() -> Self { in LOG2_E()
650 Self::LOG2_E in LOG2_E()
654 fn PI() -> Self { in PI()
655 Self::PI in PI()
658 fn SQRT_2() -> Self { in SQRT_2()
659 Self::SQRT_2 in SQRT_2()
663 fn LOG10_2() -> Self in LOG10_2()
665 Self: Sized + Div<Self, Output = Self>, in LOG10_2()
667 Self::LOG10_2 in LOG10_2()
671 fn LOG2_10() -> Self in LOG2_10()
673 Self: Sized + Div<Self, Output = Self>, in LOG2_10()
675 Self::LOG2_10 in LOG2_10()
681 fn min_value() -> Self { in min_value()
686 fn max_value() -> Self { in max_value()
695 fn as_(self) -> $ty {
696 self.$meth().as_()
704 fn as_(self) -> f16 { in as_()
705 self in as_()
726 fn as_(self) -> f16 {
727 f16::$meth(self.as_())
748 fn to_i64(&self) -> Option<i64> { in to_i64()
749 Self::to_f32(*self).to_i64() in to_i64()
752 fn to_u64(&self) -> Option<u64> { in to_u64()
753 Self::to_f32(*self).to_u64() in to_u64()
756 fn to_i8(&self) -> Option<i8> { in to_i8()
757 Self::to_f32(*self).to_i8() in to_i8()
760 fn to_u8(&self) -> Option<u8> { in to_u8()
761 Self::to_f32(*self).to_u8() in to_u8()
764 fn to_i16(&self) -> Option<i16> { in to_i16()
765 Self::to_f32(*self).to_i16() in to_i16()
768 fn to_u16(&self) -> Option<u16> { in to_u16()
769 Self::to_f32(*self).to_u16() in to_u16()
772 fn to_i32(&self) -> Option<i32> { in to_i32()
773 Self::to_f32(*self).to_i32() in to_i32()
776 fn to_u32(&self) -> Option<u32> { in to_u32()
777 Self::to_f32(*self).to_u32() in to_u32()
780 fn to_f32(&self) -> Option<f32> { in to_f32()
781 Some(Self::to_f32(*self)) in to_f32()
784 fn to_f64(&self) -> Option<f64> { in to_f64()
785 Some(Self::to_f64(*self)) in to_f64()
791 fn from_i64(n: i64) -> Option<Self> { in from_i64() argument
792 n.to_f32().map(Self::from_f32) in from_i64()
795 fn from_u64(n: u64) -> Option<Self> { in from_u64() argument
796 n.to_f32().map(Self::from_f32) in from_u64()
799 fn from_i8(n: i8) -> Option<Self> { in from_i8() argument
800 n.to_f32().map(Self::from_f32) in from_i8()
803 fn from_u8(n: u8) -> Option<Self> { in from_u8() argument
804 n.to_f32().map(Self::from_f32) in from_u8()
807 fn from_i16(n: i16) -> Option<Self> { in from_i16() argument
808 n.to_f32().map(Self::from_f32) in from_i16()
811 fn from_u16(n: u16) -> Option<Self> { in from_u16() argument
812 n.to_f32().map(Self::from_f32) in from_u16()
815 fn from_i32(n: i32) -> Option<Self> { in from_i32() argument
816 n.to_f32().map(Self::from_f32) in from_i32()
819 fn from_u32(n: u32) -> Option<Self> { in from_u32() argument
820 n.to_f32().map(Self::from_f32) in from_u32()
823 fn from_f32(n: f32) -> Option<Self> { in from_f32() argument
824 n.to_f32().map(Self::from_f32) in from_f32()
827 fn from_f64(n: f64) -> Option<Self> { in from_f64() argument
828 n.to_f64().map(Self::from_f64) in from_f64()
836 fn from_str_radix(str: &str, radix: u32) -> Result<Self, Self::FromStrRadixErr> { in from_str_radix() argument
837 Ok(Self::from_f32(f32::from_str_radix(str, radix)?)) in from_str_radix()
843 fn one() -> Self { in one()
844 Self::ONE in one()
850 fn zero() -> Self { in zero()
851 Self::ZERO in zero()
855 fn is_zero(&self) -> bool { in is_zero()
856 *self == Self::ZERO in is_zero()
862 fn from<T: ToPrimitive>(n: T) -> Option<Self> { in from() argument
863 n.to_f32().map(Self::from_f32) in from()
869 fn infinity() -> Self { in infinity()
870 Self::INFINITY in infinity()
874 fn neg_infinity() -> Self { in neg_infinity()
875 Self::NEG_INFINITY in neg_infinity()
879 fn nan() -> Self { in nan()
880 Self::NAN in nan()
884 fn neg_zero() -> Self { in neg_zero()
885 Self::NEG_ZERO in neg_zero()
889 fn min_value() -> Self { in min_value()
890 Self::MIN in min_value()
894 fn min_positive_value() -> Self { in min_positive_value()
895 Self::MIN_POSITIVE in min_positive_value()
899 fn epsilon() -> Self { in epsilon()
900 Self::EPSILON in epsilon()
904 fn max_value() -> Self { in max_value()
905 Self::MAX in max_value()
909 fn is_nan(self) -> bool { in is_nan()
910 self.is_nan() in is_nan()
914 fn is_infinite(self) -> bool { in is_infinite()
915 self.is_infinite() in is_infinite()
919 fn is_finite(self) -> bool { in is_finite()
920 self.is_finite() in is_finite()
924 fn is_normal(self) -> bool { in is_normal()
925 self.is_normal() in is_normal()
929 fn classify(self) -> FpCategory { in classify()
930 self.classify() in classify()
934 fn floor(self) -> Self { in floor() argument
935 Self::from_f32(self.to_f32().floor()) in floor()
939 fn ceil(self) -> Self { in ceil() argument
940 Self::from_f32(self.to_f32().ceil()) in ceil()
944 fn round(self) -> Self { in round() argument
945 Self::from_f32(self.to_f32().round()) in round()
949 fn trunc(self) -> Self { in trunc() argument
950 Self::from_f32(self.to_f32().trunc()) in trunc()
954 fn fract(self) -> Self { in fract() argument
955 Self::from_f32(self.to_f32().fract()) in fract()
959 fn abs(self) -> Self { in abs() argument
960 Self::from_bits(self.to_bits() & 0x7FFF) in abs()
964 fn signum(self) -> Self { in signum() argument
965 self.signum() in signum()
969 fn is_sign_positive(self) -> bool { in is_sign_positive()
970 self.is_sign_positive() in is_sign_positive()
974 fn is_sign_negative(self) -> bool { in is_sign_negative()
975 self.is_sign_negative() in is_sign_negative()
978 fn min(self, other: Self) -> Self { in min() argument
979 match self.partial_cmp(&other) { in min()
981 if self.is_nan() { in min()
984 self in min()
988 Some(Ordering::Less) => self, in min()
992 fn max(self, other: Self) -> Self { in max() argument
993 match self.partial_cmp(&other) { in max()
995 if self.is_nan() { in max()
998 self in max()
1001 Some(Ordering::Greater) | Some(Ordering::Equal) => self, in max()
1007 fn recip(self) -> Self { in recip() argument
1008 Self::from_f32(self.to_f32().recip()) in recip()
1012 fn powi(self, exp: i32) -> Self { in powi() argument
1013 Self::from_f32(self.to_f32().powi(exp)) in powi()
1017 fn to_degrees(self) -> Self { in to_degrees() argument
1018 Self::from_f32(self.to_f32().to_degrees()) in to_degrees()
1022 fn to_radians(self) -> Self { in to_radians() argument
1023 Self::from_f32(self.to_f32().to_radians()) in to_radians()
1027 fn integer_decode(self) -> (u64, i16, i8) { in integer_decode()
1028 num_traits::float::FloatCore::integer_decode(self.to_f32()) in integer_decode()
1034 fn nan() -> Self { in nan()
1035 Self::NAN in nan()
1039 fn infinity() -> Self { in infinity()
1040 Self::INFINITY in infinity()
1044 fn neg_infinity() -> Self { in neg_infinity()
1045 Self::NEG_INFINITY in neg_infinity()
1049 fn neg_zero() -> Self { in neg_zero()
1050 Self::NEG_ZERO in neg_zero()
1054 fn min_value() -> Self { in min_value()
1055 Self::MIN in min_value()
1059 fn min_positive_value() -> Self { in min_positive_value()
1060 Self::MIN_POSITIVE in min_positive_value()
1064 fn epsilon() -> Self { in epsilon()
1065 Self::EPSILON in epsilon()
1069 fn max_value() -> Self { in max_value()
1070 Self::MAX in max_value()
1074 fn is_nan(self) -> bool { in is_nan()
1075 self.is_nan() in is_nan()
1079 fn is_infinite(self) -> bool { in is_infinite()
1080 self.is_infinite() in is_infinite()
1084 fn is_finite(self) -> bool { in is_finite()
1085 self.is_finite() in is_finite()
1089 fn is_normal(self) -> bool { in is_normal()
1090 self.is_normal() in is_normal()
1094 fn classify(self) -> FpCategory { in classify()
1095 self.classify() in classify()
1099 fn floor(self) -> Self { in floor() argument
1100 Self::from_f32(self.to_f32().floor()) in floor()
1104 fn ceil(self) -> Self { in ceil() argument
1105 Self::from_f32(self.to_f32().ceil()) in ceil()
1109 fn round(self) -> Self { in round() argument
1110 Self::from_f32(self.to_f32().round()) in round()
1114 fn trunc(self) -> Self { in trunc() argument
1115 Self::from_f32(self.to_f32().trunc()) in trunc()
1119 fn fract(self) -> Self { in fract() argument
1120 Self::from_f32(self.to_f32().fract()) in fract()
1124 fn abs(self) -> Self { in abs() argument
1125 Self::from_f32(self.to_f32().abs()) in abs()
1129 fn signum(self) -> Self { in signum() argument
1130 Self::from_f32(self.to_f32().signum()) in signum()
1134 fn is_sign_positive(self) -> bool { in is_sign_positive()
1135 self.is_sign_positive() in is_sign_positive()
1139 fn is_sign_negative(self) -> bool { in is_sign_negative()
1140 self.is_sign_negative() in is_sign_negative()
1144 fn mul_add(self, a: Self, b: Self) -> Self { in mul_add() argument
1145 Self::from_f32(self.to_f32().mul_add(a.to_f32(), b.to_f32())) in mul_add()
1149 fn recip(self) -> Self { in recip() argument
1150 Self::from_f32(self.to_f32().recip()) in recip()
1154 fn powi(self, n: i32) -> Self { in powi() argument
1155 Self::from_f32(self.to_f32().powi(n)) in powi()
1159 fn powf(self, n: Self) -> Self { in powf() argument
1160 Self::from_f32(self.to_f32().powf(n.to_f32())) in powf()
1164 fn sqrt(self) -> Self { in sqrt() argument
1165 Self::from_f32(self.to_f32().sqrt()) in sqrt()
1169 fn exp(self) -> Self { in exp() argument
1170 Self::from_f32(self.to_f32().exp()) in exp()
1174 fn exp2(self) -> Self { in exp2() argument
1175 Self::from_f32(self.to_f32().exp2()) in exp2()
1179 fn ln(self) -> Self { in ln() argument
1180 Self::from_f32(self.to_f32().ln()) in ln()
1184 fn log(self, base: Self) -> Self { in log() argument
1185 Self::from_f32(self.to_f32().log(base.to_f32())) in log()
1189 fn log2(self) -> Self { in log2() argument
1190 Self::from_f32(self.to_f32().log2()) in log2()
1194 fn log10(self) -> Self { in log10() argument
1195 Self::from_f32(self.to_f32().log10()) in log10()
1199 fn to_degrees(self) -> Self { in to_degrees() argument
1200 Self::from_f32(self.to_f32().to_degrees()) in to_degrees()
1204 fn to_radians(self) -> Self { in to_radians() argument
1205 Self::from_f32(self.to_f32().to_radians()) in to_radians()
1209 fn max(self, other: Self) -> Self { in max() argument
1210 self.max(other) in max()
1214 fn min(self, other: Self) -> Self { in min() argument
1215 self.min(other) in min()
1219 fn abs_sub(self, other: Self) -> Self { in abs_sub() argument
1220 Self::from_f32((self.to_f32() - other.to_f32()).max(0.0)) in abs_sub()
1224 fn cbrt(self) -> Self { in cbrt() argument
1225 Self::from_f32(self.to_f32().cbrt()) in cbrt()
1229 fn hypot(self, other: Self) -> Self { in hypot() argument
1230 Self::from_f32(self.to_f32().hypot(other.to_f32())) in hypot()
1234 fn sin(self) -> Self { in sin() argument
1235 Self::from_f32(self.to_f32().sin()) in sin()
1239 fn cos(self) -> Self { in cos() argument
1240 Self::from_f32(self.to_f32().cos()) in cos()
1244 fn tan(self) -> Self { in tan() argument
1245 Self::from_f32(self.to_f32().tan()) in tan()
1249 fn asin(self) -> Self { in asin() argument
1250 Self::from_f32(self.to_f32().asin()) in asin()
1254 fn acos(self) -> Self { in acos() argument
1255 Self::from_f32(self.to_f32().acos()) in acos()
1259 fn atan(self) -> Self { in atan() argument
1260 Self::from_f32(self.to_f32().atan()) in atan()
1264 fn atan2(self, other: Self) -> Self { in atan2() argument
1265 Self::from_f32(self.to_f32().atan2(other.to_f32())) in atan2()
1269 fn sin_cos(self) -> (Self, Self) { in sin_cos() argument
1270 let (sin, cos) = self.to_f32().sin_cos(); in sin_cos()
1271 (Self::from_f32(sin), Self::from_f32(cos)) in sin_cos()
1275 fn exp_m1(self) -> Self { in exp_m1() argument
1276 Self::from_f32(self.to_f32().exp_m1()) in exp_m1()
1280 fn ln_1p(self) -> Self { in ln_1p() argument
1281 Self::from_f32(self.to_f32().ln_1p()) in ln_1p()
1285 fn sinh(self) -> Self { in sinh() argument
1286 Self::from_f32(self.to_f32().sinh()) in sinh()
1290 fn cosh(self) -> Self { in cosh() argument
1291 Self::from_f32(self.to_f32().cosh()) in cosh()
1295 fn tanh(self) -> Self { in tanh() argument
1296 Self::from_f32(self.to_f32().tanh()) in tanh()
1300 fn asinh(self) -> Self { in asinh() argument
1301 Self::from_f32(self.to_f32().asinh()) in asinh()
1305 fn acosh(self) -> Self { in acosh() argument
1306 Self::from_f32(self.to_f32().acosh()) in acosh()
1310 fn atanh(self) -> Self { in atanh() argument
1311 Self::from_f32(self.to_f32().atanh()) in atanh()
1315 fn integer_decode(self) -> (u64, i16, i8) { in integer_decode()
1316 num_traits::float::Float::integer_decode(self.to_f32()) in integer_decode()
1322 fn E() -> Self { in E()
1323 Self::E in E()
1327 fn FRAC_1_PI() -> Self { in FRAC_1_PI()
1328 Self::FRAC_1_PI in FRAC_1_PI()
1332 fn FRAC_1_SQRT_2() -> Self { in FRAC_1_SQRT_2()
1333 Self::FRAC_1_SQRT_2 in FRAC_1_SQRT_2()
1337 fn FRAC_2_PI() -> Self { in FRAC_2_PI()
1338 Self::FRAC_2_PI in FRAC_2_PI()
1342 fn FRAC_2_SQRT_PI() -> Self { in FRAC_2_SQRT_PI()
1343 Self::FRAC_2_SQRT_PI in FRAC_2_SQRT_PI()
1347 fn FRAC_PI_2() -> Self { in FRAC_PI_2()
1348 Self::FRAC_PI_2 in FRAC_PI_2()
1352 fn FRAC_PI_3() -> Self { in FRAC_PI_3()
1353 Self::FRAC_PI_3 in FRAC_PI_3()
1357 fn FRAC_PI_4() -> Self { in FRAC_PI_4()
1358 Self::FRAC_PI_4 in FRAC_PI_4()
1362 fn FRAC_PI_6() -> Self { in FRAC_PI_6()
1363 Self::FRAC_PI_6 in FRAC_PI_6()
1367 fn FRAC_PI_8() -> Self { in FRAC_PI_8()
1368 Self::FRAC_PI_8 in FRAC_PI_8()
1372 fn LN_10() -> Self { in LN_10()
1373 Self::LN_10 in LN_10()
1377 fn LN_2() -> Self { in LN_2()
1378 Self::LN_2 in LN_2()
1382 fn LOG10_E() -> Self { in LOG10_E()
1383 Self::LOG10_E in LOG10_E()
1387 fn LOG2_E() -> Self { in LOG2_E()
1388 Self::LOG2_E in LOG2_E()
1392 fn PI() -> Self { in PI()
1393 Self::PI in PI()
1397 fn SQRT_2() -> Self { in SQRT_2()
1398 Self::SQRT_2 in SQRT_2()
1402 fn LOG10_2() -> Self in LOG10_2()
1404 Self: Sized + Div<Self, Output = Self>, in LOG10_2()
1406 Self::LOG10_2 in LOG10_2()
1410 fn LOG2_10() -> Self in LOG2_10()
1412 Self: Sized + Div<Self, Output = Self>, in LOG2_10()
1414 Self::LOG2_10 in LOG2_10()
1420 fn min_value() -> Self { in min_value()
1425 fn max_value() -> Self { in max_value()
1432 fn as_(self) -> bf16 { in as_()
1433 self in as_()
1441 fn as_(self) -> $ty {
1442 self.$meth().as_()
1465 fn as_(self) -> bf16 {
1466 bf16::$meth(self.as_())