Enable const evaluation for f16
and f128
This excludes casting, which needs more tests.
This commit is contained in:
parent
921645c737
commit
c906d2e428
2 changed files with 22 additions and 2 deletions
|
@ -69,6 +69,13 @@ impl<Prov: Provenance> fmt::LowerHex for Scalar<Prov> {
|
|||
}
|
||||
}
|
||||
|
||||
impl<Prov> From<Half> for Scalar<Prov> {
|
||||
#[inline(always)]
|
||||
fn from(f: Half) -> Self {
|
||||
Scalar::from_f16(f)
|
||||
}
|
||||
}
|
||||
|
||||
impl<Prov> From<Single> for Scalar<Prov> {
|
||||
#[inline(always)]
|
||||
fn from(f: Single) -> Self {
|
||||
|
@ -83,6 +90,13 @@ impl<Prov> From<Double> for Scalar<Prov> {
|
|||
}
|
||||
}
|
||||
|
||||
impl<Prov> From<Quad> for Scalar<Prov> {
|
||||
#[inline(always)]
|
||||
fn from(f: Quad) -> Self {
|
||||
Scalar::from_f128(f)
|
||||
}
|
||||
}
|
||||
|
||||
impl<Prov> From<ScalarInt> for Scalar<Prov> {
|
||||
#[inline(always)]
|
||||
fn from(ptr: ScalarInt) -> Self {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue