This commit is contained in:
2025-07-18 21:19:30 +01:00
parent 77928c8fcb
commit cfee5d2214
2 changed files with 22 additions and 22 deletions

View File

@@ -72,8 +72,8 @@ impl<const SS: usize, const DS: usize, E: PrimInt + Unsigned> StackCalc<SS, DS,
pub fn add(&mut self) -> Result<Decimal<DS, E>, StackCalcError> {
let a = self.pop()?;
let b = self.pop()?;
let a = f64::try_from(a)?;
let b = f64::try_from(b)?;
let a = f32::try_from(a)?;
let b = f32::try_from(b)?;
let res = Decimal::try_from(a + b)?;
self.push(res)?;
Ok(res)