Skip to content

Revert "Move DualNumbers to an extension" #568

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name = "ApproxFunBase"
uuid = "fbd15aa5-315a-5a7d-a8a4-24992e37be05"
version = "0.9.11"
version = "0.9.10"

[deps]
AbstractFFTs = "621f4979-c628-5d54-868e-fcf4e3e8185c"
Expand All @@ -11,6 +11,7 @@ Calculus = "49dc2e85-a5d0-5ad3-a950-438e2897f1b9"
Combinatorics = "861a8166-3701-5b0c-9a16-15d98fcdc6aa"
DSP = "717857b8-e6f2-59f4-9121-6e50c889abd2"
DomainSets = "5b8099bc-c8ec-5219-889f-1d9e522a28bf"
DualNumbers = "fa6b7ba4-c1ee-5f82-b5fc-ecf0adba8f74"
FFTW = "7a1cc6ca-52ef-59f5-83cd-3a7055c09341"
FillArrays = "1a297f60-69ca-5386-bcde-b61e274b549b"
InfiniteArrays = "4858937d-0d70-526a-a4dd-2d5cb5dd786c"
Expand All @@ -19,15 +20,14 @@ LazyArrays = "5078a376-72f3-5289-bfd5-ec5146d43c02"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
LowRankMatrices = "e65ccdef-c354-471a-8090-89bec1c20ec3"
SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"
SpecialFunctions = "276daf66-3868-5448-9aa4-cd146d93841b"
StaticArrays = "90137ffa-7385-5640-81b9-e52037218182"
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"

[weakdeps]
DualNumbers = "fa6b7ba4-c1ee-5f82-b5fc-ecf0adba8f74"
SpecialFunctions = "276daf66-3868-5448-9aa4-cd146d93841b"

[extensions]
ApproxFunBaseDualNumbersExt = "DualNumbers"
ApproxFunBaseSpecialFunctionsExt = "SpecialFunctions"

[compat]
Expand All @@ -54,11 +54,10 @@ julia = "1.9"

[extras]
Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595"
DualNumbers = "fa6b7ba4-c1ee-5f82-b5fc-ecf0adba8f74"
Infinities = "e1ba4f0e-776d-440f-acd9-e1d2e9742647"
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
SpecialFunctions = "276daf66-3868-5448-9aa4-cd146d93841b"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[targets]
test = ["Aqua", "Random", "Infinities", "Test", "SpecialFunctions", "DualNumbers"]
test = ["Aqua", "Random", "Infinities", "Test", "SpecialFunctions"]
10 changes: 0 additions & 10 deletions ext/ApproxFunBaseDualNumbersExt.jl

This file was deleted.

2 changes: 2 additions & 0 deletions src/ApproxFunBase.jl
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,15 @@ import Calculus
import Combinatorics: multiexponents
using DSP
using DomainSets
using DualNumbers
using FFTW
using FillArrays
using InfiniteArrays
using IntervalSets
using LinearAlgebra
using LowRankMatrices
using SparseArrays
# using SpecialFunctions
using StaticArrays: SVector, @SArray, SArray
import Statistics: mean

Expand Down
3 changes: 3 additions & 0 deletions src/LinearAlgebra/helper.jl
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,9 @@ eps(::T) where T<:Integer = eps(T)

eps(::Type{Complex{T}}) where {T<:Real} = eps(real(T))
eps(z::Complex{T}) where {T<:Real} = eps(abs(z))
eps(::Type{Dual{Complex{T}}}) where {T<:Real} = eps(real(T))
eps(z::Dual{Complex{T}}) where {T<:Real} = eps(abs(z))


eps(::Type{Vector{T}}) where {T<:Number} = eps(T)
eps(::Type{SVector{k,T}}) where {k,T<:Number} = eps(T)
Expand Down
1 change: 1 addition & 0 deletions src/specialfunctions.jl
Original file line number Diff line number Diff line change
Expand Up @@ -418,6 +418,7 @@ for OP in (:(Base.max),:(Base.min))
end
end

# from DualNumbers
for (funsym, exp) in Calculus.symbolic_derivatives_1arg()
funsym == :abs && continue
funsym == :sign && continue
Expand Down
11 changes: 4 additions & 7 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@ using SpecialFunctions
using Test

@testset "Project quality" begin
Aqua.test_all(ApproxFunBase, ambiguities=false, piracy = false)
Aqua.test_all(ApproxFunBase, ambiguities=false, piracy = false,
# only test formatting on VERSION >= v1.7
# https://github.com/JuliaTesting/Aqua.jl/issues/105#issuecomment-1551405866
project_toml_formatting = VERSION >= v"1.9")
end

@testset "Helper" begin
Expand Down Expand Up @@ -772,12 +775,6 @@ end
@time include("ETDRK4Test.jl")
include("show.jl")

@testset "Dual" begin
z = complex(1,1)
@test ApproxFunBase.eps(Dual(z, zero(z))) == ApproxFunBase.eps(z)
@test ApproxFunBase.eps(Dual{ComplexF64}) == ApproxFunBase.eps(ComplexF64)
end

@testset "chebyshev_clenshaw" begin
@test @inferred(chebyshev_clenshaw(Int[], 1)) == 0
@test @inferred(chebyshev_clenshaw(Int[], Dual(0,1))) == Dual(0,0)
Expand Down