diff --git a/Project.toml b/Project.toml index 058e1e3a..39c78157 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "Polymake" uuid = "d720cf60-89b5-51f5-aff5-213f193123e7" repo = "https://github.com/oscar-system/Polymake.jl.git" -version = "0.11.19" +version = "0.11.20" [deps] AbstractAlgebra = "c3fe647b-3220-5bb0-a1ea-a7954cac585d" @@ -44,6 +44,6 @@ SparseArrays = "^1.6" TOPCOM_jll = "~0.17.8" julia = "^1.6" lib4ti2_jll = "^1.6.10" -libpolymake_julia_jll = "~0.12.0" +libpolymake_julia_jll = "~0.12.1" polymake_jll = "^400.1200.0" -polymake_oscarnumber_jll = "~0.3.0" +polymake_oscarnumber_jll = "~0.3.1" diff --git a/src/oscarnumber.jl b/src/oscarnumber.jl index 825328ad..937cb06d 100644 --- a/src/oscarnumber.jl +++ b/src/oscarnumber.jl @@ -26,7 +26,7 @@ Base.:/(x::OscarNumber, y::OscarNumber) = x // y convert(::Type{<:OscarNumber}, on::OscarNumber) = on function unwrap(on::OscarNumber) - if Polymake.isinf(on) != 0 + if isinf(on) error("cannot unwrap OscarNumber containing infinity") elseif _uses_rational(on) return _get_rational(on) @@ -104,18 +104,9 @@ const _on_parent_by_id = Dict{Clong, Any}() @cfunction(Base.:-, Ref{ArgT}, (Ref{ArgT},)) end -function _on_abs_fallback(e::ArgT)::ArgT where ArgT - return Base.cmp(e,0) < 0 ? -e : deepcopy(e) -end @generated function _on_gen_abs(::Type{ArgT}) where ArgT - if hasmethod(abs, (ArgT,)) - return quote - @cfunction(Base.abs, Ref{ArgT}, (Ref{ArgT},)) - end - else - return quote - @cfunction(_on_abs_fallback, Ref{ArgT}, (Ref{ArgT},)) - end + return quote + @cfunction(Base.abs, Ref{ArgT}, (Ref{ArgT},)) end end