Searched refs:to_f64 (Results 1 – 12 of 12) sorted by relevance
/external/rust/crates/num-traits/src/ |
D | cast.rs | 117 self.to_f64().as_ref().and_then(ToPrimitive::to_f32) in to_f32() 128 fn to_f64(&self) -> Option<f64> { in to_f64() method 130 Some(i) => i.to_f64(), in to_f64() 131 None => self.to_u64().as_ref().and_then(ToPrimitive::to_f64), in to_f64() 195 fn to_f64(&self) -> Option<f64> { 268 fn to_f64(&self) -> Option<f64> { 392 fn to_f64 -> f64; 607 impl_from_primitive!(f64, to_f64); 638 fn to_f64 -> f64; 736 impl_num_cast!(f64, to_f64);
|
/external/rust/crates/half/src/ |
D | bfloat.rs | 186 pub fn to_f64(self) -> f64 { in to_f64() method 474 x.to_f64() in from() 681 fn to_f64(&self) -> Option<f64> { in to_f64() method 682 Some(Self::to_f64(*self)) in to_f64() 715 n.to_f64().map(|x| Self::from_f64(x)) in from_f64() 920 assert_eq!(f.to_f64(), 7.0f64); in test_bf16_to_f64() 924 let diff = (f.to_f64() - 7.1f64).abs(); in test_bf16_to_f64() 926 assert!(diff <= 4.0 * bf16::EPSILON.to_f64()); in test_bf16_to_f64() 929 assert_eq!(bf16::from_bits(0x0001).to_f64(), tiny64); in test_bf16_to_f64() 930 assert_eq!(bf16::from_bits(0x0005).to_f64(), 5.0 * tiny64); in test_bf16_to_f64() [all …]
|
D | binary16.rs | 69 fn to_f64(&self) -> Option<f64> { in to_f64() method 70 Some(Self::to_f64(*self)) in to_f64() 103 n.to_f64().map(|x| Self::from_f64(x)) in from_f64() 494 pub fn to_f64(self) -> f64 { in to_f64() method 783 x.to_f64() in from() 1213 assert_eq!(f.to_f64(), 7.0f64); in test_f16_to_f64() 1217 let diff = (f.to_f64() - 7.1f64).abs(); in test_f16_to_f64() 1219 assert!(diff <= 4.0 * f16::EPSILON.to_f64()); in test_f16_to_f64() 1221 assert_eq!(f16::from_bits(0x0000_0001).to_f64(), 2.0f64.powi(-24)); in test_f16_to_f64() 1222 assert_eq!(f16::from_bits(0x0000_0005).to_f64(), 5.0 * 2.0f64.powi(-24)); in test_f16_to_f64() [all …]
|
D | slice.rs | 526 dst[i] = f.to_f64(); in convert_to_f64_slice()
|
/external/rust/crates/criterion/src/ |
D | measurement.rs | 100 fn to_f64(&self, value: &Self::Value) -> f64; in to_f64() method 206 fn to_f64(&self, val: &Self::Value) -> f64 { in to_f64() method
|
D | routine.rs | 211 m.to_f64(&b.value) in bench()
|
/external/rust/crates/half/benches/ |
D | convert.rs | 70 |b: &mut Bencher<'_>, i: &f16| b.iter(|| i.to_f64()), in bench_f16_to_f64() 294 |b: &mut Bencher<'_>, i: &bf16| b.iter(|| i.to_f64()), in bench_bf16_to_f64()
|
/external/rust/crates/log/src/kv/ |
D | value.rs | 398 to_f64 -> f64, 578 assert!(v.to_f64().is_some()); in test_to_number() 584 assert!(v.to_f64().is_none()); in test_to_number()
|
/external/rust/crates/criterion/benches/benchmarks/ |
D | custom_measurement.rs | 88 fn to_f64(&self, val: &Self::Value) -> f64 { in to_f64() method
|
/external/rust/crates/num-traits/tests/ |
D | cast.rs | 54 assert_eq!(i.to_f64(), w.to_f64()); in wrapping_to_primitive() 389 assert_eq_to!(to_f32 to_f64); in newtype_to_primitive()
|
/external/rust/crates/num-derive/src/ |
D | lib.rs | 488 fn to_f64(&self) -> Option<f64> { in to_primitive() 489 <#inner_ty as #import::ToPrimitive>::to_f64(&self.0) in to_primitive()
|
/external/rust/crates/half/ |
D | CHANGELOG.md | 120 - Made `to_f32` and `to_f64` public. Fixes [#7], by [@PSeitz].
|