Skip to content

Commit

Permalink
Fix error check in Elliptic3 function
Browse files Browse the repository at this point in the history
  • Loading branch information
cpmech committed Apr 3, 2024
1 parent 1abd5bf commit 683911d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fun/ellipticintegral.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ func Elliptic3(n, φ, k float64) float64 {
if math.Abs(k*s-1.0) < 1e-15 {
return math.Inf(1)
}
if math.Abs(n*s-1.0) < 1e-15 {
if math.Abs(n*s*s-1.0) < 1e-15 {
return math.Inf(1)
}
t := N * s * s
Expand Down

0 comments on commit 683911d

Please sign in to comment.