Skip to content

Commit

Permalink
Merge pull request #126 from kalmarek/minor-updates-and-release
Browse files Browse the repository at this point in the history
Minor updates and release
  • Loading branch information
Joel-Dahne authored Jun 23, 2021
2 parents 5d95a1e + 2657ce1 commit 0d650d9
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 13 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "Arblib"
uuid = "fb37089c-8514-4489-9461-98f9c8763369"
authors = ["Marek Kaluba <[email protected]>", "Sascha Timme <Sascha Timme <[email protected]>", "Joel Dahne <[email protected]>"]
version = "0.3.2"
version = "0.4.0"

[deps]
Arb_jll = "d9960996-1013-53c9-9ba4-74a4155039c3"
Expand Down
3 changes: 3 additions & 0 deletions src/Arblib.jl
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ import SpecialFunctions
if VERSION >= v"1.5.0-DEV.639"
import Base: contains
end
if VERSION >= v"1.6"
import Base: sincospi
end

export Mag,
MagRef,
Expand Down
24 changes: 12 additions & 12 deletions test/arithmetic.jl
Original file line number Diff line number Diff line change
Expand Up @@ -132,25 +132,26 @@
atanh,
asinh,
]
# TODO: Replace with ≈
@test abs(f(T(0.5)) - f(0.5)) <= 1e-15
@test f(T(0.5)) f(0.5)
end
# TODO: Replace with ≈
@test abs(acosh(T(2)) - acosh(2)) <= 1e-15
@test acosh(T(2)) acosh(2)

@test Arblib.rsqrt(T(1 // 4)) == T(2)
@test Arblib.sqr(T(3)) == T(9)

@test sinpi(T(1)) == T(0)
@test cospi(T(1)) == T(-1)
@test Arblib.tanpi(T(1)) == T(0)
# TODO: Replace with ≈
@test abs(Arblib.cotpi(T(0.5))) <= 1e-15
@test abs(Arblib.cscpi(T(0.5)) - 1) <= 1e-15
@test abs(sinc(T(0.5)) - sinc(0.5)) <= 1e-15
@test Arblib.cotpi(T(0.5)) == 0
@test Arblib.cscpi(T(0.5)) == 1
@test sinc(T(0.5)) sinc(0.5)

@test isequal(sincos(T(1)), (sin(T(1)), cos(T(1))))
@test isequal(Arblib.sincospi(T(1)), (sinpi(T(1)), cospi(T(1))))
if VERSION >= v"1.6"
@test isequal(sincospi(T(1)), (sinpi(T(1)), cospi(T(1))))
else
@test isequal(Arblib.sincospi(T(1)), (sinpi(T(1)), cospi(T(1))))
end
@test isequal(Arblib.sinhcosh(T(1)), (sinh(T(1)), cosh(T(1))))
end

Expand All @@ -173,8 +174,7 @@
@test Arblib.sqrtpos(Arb(-4)) == Arb(0)
@test Arblib.sqrt1pm1(Arb(3)) == Arb(1)

# TODO: Replace with ≈
@test abs(atan(Arb(2), Arb(3)) - atan(2, 3)) <= 1e-15
@test atan(Arb(2), Arb(3)) atan(2, 3)

@test min(Arb(1), Arb(2)) == Arb(1)
@test max(Arb(1), Arb(2)) == Arb(2)
Expand All @@ -197,7 +197,7 @@
@test Arblib.contains(maximum(A), Arb((10, 11)))
@test Arblib.contains(maximum(reverse(A)), Arb((10, 11)))
@test all(Arblib.contains.(extrema(A), (Arb((0, 1)), Arb((10, 11)))))
# These fails with the default implementation
# These fails with the default implementation of minimum and maximum
@test Arblib.contains(
minimum([Arb((-i, -i + 1)) for i = 0:1000]),
Arb((-1000, -999)),
Expand Down

2 comments on commit 0d650d9

@Joel-Dahne
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 register()

@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/39486

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.4.0 -m "<description of version>" 0d650d992a9cfdc9caec4d790cb30e68596cd5ca
git push origin v0.4.0

Please sign in to comment.