Searched refs:from_f64 (Results 1 – 12 of 12) sorted by relevance
/external/rust/crates/half/src/ |
D | slice.rs | 500 self[i] = bf16::from_f64(*f); in convert_from_f64_slice() 834 f16::from_f64(1.), in slice_convert_f16_f64() 835 f16::from_f64(2.), in slice_convert_f16_f64() 836 f16::from_f64(3.), in slice_convert_f16_f64() 837 f16::from_f64(4.), in slice_convert_f16_f64() 838 f16::from_f64(5.), in slice_convert_f16_f64() 839 f16::from_f64(6.), in slice_convert_f16_f64() 840 f16::from_f64(7.), in slice_convert_f16_f64() 841 f16::from_f64(8.), in slice_convert_f16_f64() 855 f16::from_f64(1.), in slice_convert_f16_f64() [all …]
|
D | bfloat.rs | 63 pub fn from_f64(value: f64) -> bf16 { in from_f64() method 714 fn from_f64(n: f64) -> Option<Self> { in from_f64() method 715 n.to_f64().map(|x| Self::from_f64(x)) in from_f64() 792 let one = bf16::from_f64(1.0); in test_bf16_consts_from_f64() 793 let zero = bf16::from_f64(0.0); in test_bf16_consts_from_f64() 794 let neg_zero = bf16::from_f64(-0.0); in test_bf16_consts_from_f64() 795 let inf = bf16::from_f64(core::f64::INFINITY); in test_bf16_consts_from_f64() 796 let neg_inf = bf16::from_f64(core::f64::NEG_INFINITY); in test_bf16_consts_from_f64() 797 let nan = bf16::from_f64(core::f64::NAN); in test_bf16_consts_from_f64() 807 let e = bf16::from_f64(core::f64::consts::E); in test_bf16_consts_from_f64() [all …]
|
D | binary16.rs | 102 fn from_f64(n: f64) -> Option<Self> { in from_f64() method 103 n.to_f64().map(|x| Self::from_f64(x)) in from_f64() 362 pub fn from_f64(value: f64) -> f16 { in from_f64() method 1081 let one = f16::from_f64(1.0); in test_f16_consts_from_f64() 1082 let zero = f16::from_f64(0.0); in test_f16_consts_from_f64() 1083 let neg_zero = f16::from_f64(-0.0); in test_f16_consts_from_f64() 1084 let inf = f16::from_f64(core::f64::INFINITY); in test_f16_consts_from_f64() 1085 let neg_inf = f16::from_f64(core::f64::NEG_INFINITY); in test_f16_consts_from_f64() 1086 let nan = f16::from_f64(core::f64::NAN); in test_f16_consts_from_f64() 1098 let e = f16::from_f64(core::f64::consts::E); in test_f16_consts_from_f64() [all …]
|
/external/rust/crates/plotters/src/coord/ranged1d/combinators/ |
D | logarithmic.rs | 12 fn from_f64(f: f64) -> Self; in from_f64() method 28 fn from_f64(f: f64) -> $t { 38 fn from_f64(f: f64) -> $t { 131 ret.push(V::from_f64(val)); in key_points() 139 ret.push(V::from_f64(v)); in key_points()
|
/external/rust/crates/half/benches/ |
D | convert.rs | 30 |b: &mut Bencher<'_>, i: &f64| b.iter(|| f16::from_f64(*i)), in bench_f64_to_f16() 213 .map(|(i, _)| f16::from_f64(i as f64)) in bench_slice_f16_to_f64() 254 |b: &mut Bencher<'_>, i: &f64| b.iter(|| bf16::from_f64(*i)), in bench_f64_to_bf16()
|
/external/rust/crates/num-traits/src/ |
D | cast.rs | 506 FromPrimitive::from_f64(From::from(n)) in from_f32() 516 fn from_f64(n: f64) -> Option<Self> { in from_f64() method 585 fn from_f64(n: f64) -> Option<$T> { 671 fn from_f64(f64);
|
/external/rust/crates/serde_json/src/value/ |
D | from.rs | 62 Number::from_f64(f).map_or(Value::Null, Value::Number) in from()
|
D | ser.rs | 135 Ok(Number::from_f64(value).map_or(Value::Null, Value::Number)) in serialize_f64()
|
D | de.rs | 48 Ok(Number::from_f64(value).map_or(Value::Null, Value::Number)) in deserialize()
|
/external/rust/crates/serde_json/src/ |
D | number.rs | 230 pub fn from_f64(f: f64) -> Option<Number> { in from_f64() method 358 Number::from_f64(value).ok_or_else(|| de::Error::custom("not a JSON number")) in deserialize()
|
/external/rust/crates/num-derive/src/ |
D | lib.rs | 314 fn from_f64(n: f64) -> Option<Self> { in from_primitive() 315 <#inner_ty as #import::FromPrimitive>::from_f64(n).map(#name) in from_primitive()
|
/external/rust/crates/num-traits/tests/ |
D | cast.rs | 351 assert_eq_from!(from_f32 from_f64); in newtype_from_primitive()
|