Skip to content

Commit

Permalink
assert to avoid inexhaustive pattern warning
Browse files Browse the repository at this point in the history
Just adding an assert to the coefficients for computing the Gauss error function, to satisfy the exhaustiveness checks in 0.33
  • Loading branch information
hunkyjimpjorps committed Dec 8, 2023
1 parent ad11b96 commit 30289cd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/gleam_community/maths/special.gleam
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ pub fn beta(x: Float, y: Float) -> Float {
/// </div>
///
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
Expand Down

0 comments on commit 30289cd

Please sign in to comment.