Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix signif deprecation #26780

Merged
merged 1 commit into from
Apr 12, 2018
Merged

Fix signif deprecation #26780

merged 1 commit into from
Apr 12, 2018

Conversation

jmkuhn
Copy link
Contributor

@jmkuhn jmkuhn commented Apr 11, 2018

Update to PR #26670.

@jmkuhn
Copy link
Contributor Author

jmkuhn commented Apr 12, 2018

With the current nightly:

julia> signif(1.23456, 3)
┌ Warning: `signif(x::Number, digits)` is deprecated, use `round(x; sigdigits=digits, base=base)` instead.
│   caller = top-level scope
└ @ Core :0
ERROR: MethodError: no method matching log(::typeof(base), ::Float64)
Closest candidates are:
  log(::Irrational{:ℯ}, ::Number) at mathconstants.jl:91
  log(::T<:Number, ::T<:Number) where T<:Number at math.jl:177
  log(::Number, ::Number) at math.jl:205
Stacktrace:
 [1] hidigit(::Float64, ::Function) at ./floatfuncs.jl:184
 [2] _round at ./floatfuncs.jl:190 [inlined]
 [3] #round#559 at ./floatfuncs.jl:128 [inlined]
 [4] #round at ./<missing>:0 [inlined] (repeats 2 times)
 [5] signif(::Float64, ::Int64) at ./deprecated.jl:57
 [6] top-level scope

instead of the desired:

julia> signif(1.23456, 3)
┌ Warning: `signif(x::Number, digits)` is deprecated, use `round(x; sigdigits=digits)` instead.
│   caller = top-level scope
└ @ Core :0
1.23

@JeffBezanson JeffBezanson merged commit c45bbde into JuliaLang:master Apr 12, 2018
@jmkuhn jmkuhn deleted the signifdep branch April 13, 2018 02:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants