From e79f6cef58f884157c1fc56f81d9471d9a020440 Mon Sep 17 00:00:00 2001 From: ErikQQY <2283984853@qq.com> Date: Sat, 23 Mar 2024 14:29:43 +0800 Subject: [PATCH] Fix GLHighPrecision error Signed-off-by: ErikQQY <2283984853@qq.com> --- src/Derivative/GL.jl | 2 +- test/Derivative.jl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Derivative/GL.jl b/src/Derivative/GL.jl index 3b0b6f1..f63bf54 100644 --- a/src/Derivative/GL.jl +++ b/src/Derivative/GL.jl @@ -214,7 +214,7 @@ function fracdiff(f::Union{Function, Number, Vector}, α::T, t, alg::GLHighPrecision) where {T <: Real} - p = @unpack p = alg + @unpack p = alg if isa(f, Function) y=f.(t) elseif isa(f, Vector) diff --git a/test/Derivative.jl b/test/Derivative.jl index 7d5ed45..535e09a 100644 --- a/test/Derivative.jl +++ b/test/Derivative.jl @@ -43,7 +43,7 @@ end @testset "Test Grunwald-Letnikov Fractional Derivative" begin @test isapprox(fracdiff(x->x, 0.5, 0, 0.5, GLDirect())[1], 0.7978845583186518; atol = 1e-5) @test isapprox(fracdiff(x->x^5, 0.5, 0, 3.2, GLDirect())[1], 4.300306216488329e2; atol = 1e-5) - @test isapprox(fracdiff(x->x, 0.5, collect(0:0.01:1), 2, GLHighPrecision())[end], 2/sqrt(pi); atol = 1e-4) + @test isapprox(fracdiff(x->x, 0.5, collect(0:0.01:1), GLHighPrecision())[end], 2/sqrt(pi); atol = 1e-4) end @testset "Test GL_Multiplicative_Additive()" begin