From 52175abe3232ed1822d1182915225061d44d4b25 Mon Sep 17 00:00:00 2001 From: Venkateshprasad <32921645+ven-k@users.noreply.github.com> Date: Tue, 7 Jun 2022 06:22:44 -0700 Subject: [PATCH 1/4] Bump compat entry for SapecialFunctions to v2 (while keeping existing v1.3) --- Project.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Project.toml b/Project.toml index d9f3a8b..0a8a875 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "MathML" uuid = "abcecc63-2b08-419c-80c4-c63dca6fa478" authors = ["anand and contributors"] -version = "0.1.10" +version = "0.1.11" [deps] AbstractTrees = "1520ce14-60c1-5f80-bbc7-55ef81b5835c" @@ -17,7 +17,7 @@ AbstractTrees = "0.3" DocStringExtensions = "0.8" EzXML = "1.1" IfElse = "0.1" -SpecialFunctions = "1.3" +SpecialFunctions = "1.3, 2" Symbolics = "3, 4" julia = "1.6" From 6ce256bf94d5956b15b6116e9eb6070efa5c8dd2 Mon Sep 17 00:00:00 2001 From: Christopher Rackauckas Date: Tue, 7 Jun 2022 09:41:04 -0400 Subject: [PATCH 2/4] Update maps.jl --- src/maps.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/maps.jl b/src/maps.jl index 03d6519..0c6c03a 100644 --- a/src/maps.jl +++ b/src/maps.jl @@ -29,7 +29,7 @@ applymap = Dict{String,Function}( # "gt" => x -> Base.foldl(Base.:>, x), # "quotient" => x->Base.:div(x...), # broken, RoundingMode - "factorial" => x -> Base.factorial(x...), + "factorial" => x -> SpecialFunctions.gamma(1 .+ x[1]), "max" => x -> Base.max(x...), "min" => x -> Base.min(x...), "rem" => x -> Base.:rem(x...), From af21d7a8afa3d56de3d3ec9a0939254a92a86e7b Mon Sep 17 00:00:00 2001 From: Christopher Rackauckas Date: Tue, 7 Jun 2022 10:02:40 -0400 Subject: [PATCH 3/4] Update MathML.jl --- src/MathML.jl | 1 + 1 file changed, 1 insertion(+) diff --git a/src/MathML.jl b/src/MathML.jl index 25dc924..3d025a4 100644 --- a/src/MathML.jl +++ b/src/MathML.jl @@ -5,6 +5,7 @@ module MathML using DocStringExtensions using EzXML, Symbolics, Statistics, IfElse, AbstractTrees +import SpecialFunctions include("utils.jl") include("parse.jl") From 0f52bb15592a3bf0d7376fc15201f9f56bdfda06 Mon Sep 17 00:00:00 2001 From: Christopher Rackauckas Date: Tue, 7 Jun 2022 10:18:08 -0400 Subject: [PATCH 4/4] Update parse.jl --- test/parse.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/parse.jl b/test/parse.jl index 945f884..2603888 100644 --- a/test/parse.jl +++ b/test/parse.jl @@ -105,7 +105,7 @@ str = """ # factorial str = "x" -@test isequal(MathML.parse_str(str), factorial(x)) +@test isequal(MathML.parse_str(str), SpecialFunctions.gamma(1+x)) str = "5" @test MathML.parse_str(str) == 120