Home
last modified time | relevance | path

Searched refs:to_f64 (Results 1 – 12 of 12) sorted by relevance

/external/rust/crates/num-traits/src/
Dcast.rs117 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/
Dbfloat.rs186 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 …]
Dbinary16.rs69 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 …]
Dslice.rs526 dst[i] = f.to_f64(); in convert_to_f64_slice()
/external/rust/crates/criterion/src/
Dmeasurement.rs100 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
Droutine.rs211 m.to_f64(&b.value) in bench()
/external/rust/crates/half/benches/
Dconvert.rs70 |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/
Dvalue.rs398 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/
Dcustom_measurement.rs88 fn to_f64(&self, val: &Self::Value) -> f64 { in to_f64() method
/external/rust/crates/num-traits/tests/
Dcast.rs54 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/
Dlib.rs488 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/
DCHANGELOG.md120 - Made `to_f32` and `to_f64` public. Fixes [#7], by [@PSeitz].