Skip to content

Commit

Permalink
Merge pull request #42 from ven-k/patch-1
Browse files Browse the repository at this point in the history
Bump compat entry for SpecialFunctions to v2 (while keeping the existing v1.3)
  • Loading branch information
ChrisRackauckas committed Jun 7, 2022
2 parents 528d62c + 0f52bb1 commit ddbf2d6
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "MathML"
uuid = "abcecc63-2b08-419c-80c4-c63dca6fa478"
authors = ["anand <anandj@uchicago.edu> and contributors"]
version = "0.1.10"
version = "0.1.11"

[deps]
AbstractTrees = "1520ce14-60c1-5f80-bbc7-55ef81b5835c"
Expand All @@ -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"

Expand Down
1 change: 1 addition & 0 deletions src/MathML.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ module MathML
using DocStringExtensions

using EzXML, Symbolics, Statistics, IfElse, AbstractTrees
import SpecialFunctions

include("utils.jl")
include("parse.jl")
Expand Down
2 changes: 1 addition & 1 deletion src/maps.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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...),
Expand Down
2 changes: 1 addition & 1 deletion test/parse.jl
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ str = """

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

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

0 comments on commit ddbf2d6

Please sign in to comment.