UPDATE: Also use erfc (thanks copilot!)

This commit is contained in:
Nicolás Hatcher
2025-11-20 21:53:08 +01:00
committed by Nicolás Hatcher Andrés
parent fd34e46689
commit 2cab93be18

View File

@@ -1,4 +1,4 @@
use statrs::function::erf::erf; use statrs::function::erf::{erf, erfc};
use crate::{ use crate::{
calc_result::CalcResult, calc_result::CalcResult,
@@ -162,7 +162,7 @@ impl Model {
Ok(f) => f, Ok(f) => f,
Err(s) => return s, Err(s) => return s,
}; };
CalcResult::Number(1.0 - erf(x)) CalcResult::Number(erfc(x))
} }
pub(crate) fn fn_erfcprecise(&mut self, args: &[Node], cell: CellReferenceIndex) -> CalcResult { pub(crate) fn fn_erfcprecise(&mut self, args: &[Node], cell: CellReferenceIndex) -> CalcResult {
@@ -173,6 +173,6 @@ impl Model {
Ok(f) => f, Ok(f) => f,
Err(s) => return s, Err(s) => return s,
}; };
CalcResult::Number(1.0 - erf(x)) CalcResult::Number(erfc(x))
} }
} }