From 2cab93be182a937f0a0eb03cbabd91f385f8d868 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=A1s=20Hatcher?= Date: Thu, 20 Nov 2025 21:53:08 +0100 Subject: [PATCH] UPDATE: Also use erfc (thanks copilot!) --- base/src/functions/engineering/bessel.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/base/src/functions/engineering/bessel.rs b/base/src/functions/engineering/bessel.rs index 12a09a1..18d4d53 100644 --- a/base/src/functions/engineering/bessel.rs +++ b/base/src/functions/engineering/bessel.rs @@ -1,4 +1,4 @@ -use statrs::function::erf::erf; +use statrs::function::erf::{erf, erfc}; use crate::{ calc_result::CalcResult, @@ -162,7 +162,7 @@ impl Model { Ok(f) => f, 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 { @@ -173,6 +173,6 @@ impl Model { Ok(f) => f, Err(s) => return s, }; - CalcResult::Number(1.0 - erf(x)) + CalcResult::Number(erfc(x)) } }