Skip to content

Commit 0776be3

Browse files
authored
support euler exponentiation (#201)
1 parent 0d068e3 commit 0776be3

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name = "ApproxFunBase"
22
uuid = "fbd15aa5-315a-5a7d-a8a4-24992e37be05"
3-
version = "0.7.2"
3+
version = "0.7.3"
44

55
[deps]
66
AbstractFFTs = "621f4979-c628-5d54-868e-fcf4e3e8185c"

src/specialfunctions.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,8 @@ for (op, ODE, RHS, growth) in ((:(exp), "D-f'", "0", :(real)
196196
end
197197
end
198198

199+
Base.:(^)(::Irrational{:ℯ}, f::Fun) = exp(f)
200+
199201
function specialfunctionnormalizationpoint2(op, growth, f, T = cfstype(f))
200202
xmin, xmax, opfxmin, opfxmax, opmax = _specialfunctionnormalizationpoint(op,growth,f)
201203
while opmax10eps(T) || abs(f(xmin)-f(xmax))10eps(T)

test/SpacesTest.jl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,12 @@ using LinearAlgebra
149149
@test g(i) == h(i)
150150
end
151151
end
152+
153+
@testset "euler and exp" begin
154+
f = Fun(PointSpace(1:3), 1:3)
155+
@test^f == exp(f)
156+
@test values(ℯ^f) == exp.(values(f))
157+
end
152158
end
153159

154160
@testset "DiracSpace" begin

0 commit comments

Comments
 (0)