From 30289cd0ff07d99eecde30be1d22bf038a15715f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jimpjorps=E2=84=A2?= Date: Fri, 8 Dec 2023 10:41:02 -0500 Subject: [PATCH] assert to avoid inexhaustive pattern warning Just adding an assert to the coefficients for computing the Gauss error function, to satisfy the exhaustiveness checks in 0.33 --- src/gleam_community/maths/special.gleam | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gleam_community/maths/special.gleam b/src/gleam_community/maths/special.gleam index cdf6b85..dfd9cbb 100644 --- a/src/gleam_community/maths/special.gleam +++ b/src/gleam_community/maths/special.gleam @@ -76,7 +76,7 @@ pub fn beta(x: Float, y: Float) -> Float { /// /// pub fn erf(x: Float) -> Float { - let [a1, a2, a3, a4, a5]: List(Float) = [ + let assert [a1, a2, a3, a4, a5]: List(Float) = [ 0.254829592, -0.284496736, 1.421413741, -1.453152027, 1.061405429, ] let p: Float = 0.3275911