Commit 917a3f87 authored by Andrey Zgarbul's avatar Andrey Zgarbul

pxe2

parent d5aa6370
......@@ -138,8 +138,7 @@ impl<const N: u32> crate::Quire<PxE2<{ N }>> for Q32E2 {
Self::from(p)
}
fn to_posit(&self) -> PxE2<{ N }> {
unimplemented!()
//PxE2::from(self)
PxE2::<{N}>::from(self)
}
fn from_bits(v: Self::Bits) -> Self {
Self::from_bits(v)
......
......@@ -147,6 +147,14 @@ impl From<&Q32E2> for P32E2 {
}
}
#[cfg(feature = "nightly")]
impl<const N: u32> From<Q32E2> for PxE2<{ N }> {
#[inline]
fn from(q_a: Q32E2) -> Self {
(&q_a).into()
}
}
#[cfg(feature = "nightly")]
impl<const N: u32> From<&Q32E2> for PxE2<{ N }> {
fn from(q_a: &Q32E2) -> Self {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment