Skip to content

Commit ddbf2d6

Browse files
Merge pull request #42 from ven-k/patch-1
Bump compat entry for SpecialFunctions to v2 (while keeping the existing v1.3)
2 parents 528d62c + 0f52bb1 commit ddbf2d6

File tree

4 files changed

+5
-4
lines changed

4 files changed

+5
-4
lines changed

Project.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "MathML"
22
uuid = "abcecc63-2b08-419c-80c4-c63dca6fa478"
33
authors = ["anand <[email protected]> and contributors"]
4-
version = "0.1.10"
4+
version = "0.1.11"
55

66
[deps]
77
AbstractTrees = "1520ce14-60c1-5f80-bbc7-55ef81b5835c"
@@ -17,7 +17,7 @@ AbstractTrees = "0.3"
1717
DocStringExtensions = "0.8"
1818
EzXML = "1.1"
1919
IfElse = "0.1"
20-
SpecialFunctions = "1.3"
20+
SpecialFunctions = "1.3, 2"
2121
Symbolics = "3, 4"
2222
julia = "1.6"
2323

src/MathML.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ module MathML
55
using DocStringExtensions
66

77
using EzXML, Symbolics, Statistics, IfElse, AbstractTrees
8+
import SpecialFunctions
89

910
include("utils.jl")
1011
include("parse.jl")

src/maps.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ applymap = Dict{String,Function}(
2929
# "gt" => x -> Base.foldl(Base.:>, x),
3030

3131
# "quotient" => x->Base.:div(x...), # broken, RoundingMode
32-
"factorial" => x -> Base.factorial(x...),
32+
"factorial" => x -> SpecialFunctions.gamma(1 .+ x[1]),
3333
"max" => x -> Base.max(x...),
3434
"min" => x -> Base.min(x...),
3535
"rem" => x -> Base.:rem(x...),

test/parse.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ str = """
105105

106106
# factorial
107107
str = "<apply><factorial/><ci>x</ci></apply>"
108-
@test isequal(MathML.parse_str(str), factorial(x))
108+
@test isequal(MathML.parse_str(str), SpecialFunctions.gamma(1+x))
109109

110110
str = "<apply><factorial/><cn>5</cn></apply>"
111111
@test MathML.parse_str(str) == 120

0 commit comments

Comments
 (0)