Skip to content

Commit

Permalink
add better error checking for dual numbers
Browse files Browse the repository at this point in the history
  • Loading branch information
MikaelSlevinsky committed Jul 9, 2020
1 parent 123e404 commit 720e95d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name = "HypergeometricFunctions"
uuid = "34004b35-14d8-5ef3-9330-4cdb6864b03a"
version = "0.3"
version = "0.3.1"

[deps]
DualNumbers = "fa6b7ba4-c1ee-5f82-b5fc-ecf0adba8f74"
Expand Down
5 changes: 4 additions & 1 deletion src/specialfunctions.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
@inline errcheck(x, y, tol) = isfinite(x) && isfinite(y) && (norm(x-y) > max(norm(x), norm(y))*tol)
@inline norm2(x) = norm(x)
@inline norm2(x::Dual) = hypot(x.value, x.epsilon)

@inline errcheck(x, y, tol) = isfinite(x) && isfinite(y) && (norm2(x-y) > max(norm2(x), norm2(y))*tol)

# Same as in FastTransforms.jl
"""
Expand Down

2 comments on commit 720e95d

@MikaelSlevinsky
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/17696

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.3.1 -m "<description of version>" 720e95dd2e99ca54465c1e52459e8908ca2e681d
git push origin v0.3.1

Please sign in to comment.