We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 068510f commit 746547aCopy full SHA for 746547a
test/ChebyshevTest.jl
@@ -257,4 +257,18 @@ import ApproxFunOrthogonalPolynomials: forwardrecurrence
257
@test f ≈ g
258
end
259
260
+
261
+ @testset "Operator exponentiation" begin
262
+ for M in Any[Multiplication(Fun(), Chebyshev()), Multiplication(Fun())]
263
+ N = @inferred (M -> M^0)(M)
264
+ @test N * Fun() == Fun()
265
+ N = @inferred (M -> M^1)(M)
266
+ @test N == M
267
+ N = @inferred (M -> M^2)(M)
268
+ @test N == M*M
269
+ @test M^3 == M * M * M
270
+ @test M^4 == M * M * M * M
271
+ @test M^10 == foldr(*, fill(M, 10))
272
+ end
273
274
0 commit comments