-
Notifications
You must be signed in to change notification settings - Fork 104
Closed
Description
Hello!
Running JET on SpecialFunctions.logabsgamma (or any function that calls it) leads to an error, specifically on Julia 1.12 and with JET v0.10.7:
julia> using SpecialFunctions, JET
julia> JET.test_call(SpecialFunctions._logabsgamma, (Float64,))
JET-test failed at /Users/pyong/.julia/packages/JET/OqLEC/src/JETBase.jl:1113
Expression: (JET.report_call)(SpecialFunctions._logabsgamma, (Float64,))
═════ 1 possible error found ═════
┌ _logabsgamma(x::Float64) @ SpecialFunctions /Users/pyong/ppl/SpecialFunctions.jl/src/logabsgamma/e_lgamma_r.jl:173
│ local variable `nadj` may be undefined: nadj::Float64
└────────────────────This occurs because of this line:
SpecialFunctions.jl/src/logabsgamma/e_lgamma_r.jl
Lines 172 to 174 in 1f0527c
| if isneg | |
| r = nadj - r | |
| end |
I previously reported this on JET (aviatesk/JET.jl#749) and was directed here. The suggestion was to either merge the two if isneg sections (although I don't immediately see how to do this without a slight drop in performance), or to insert @assert @isdefined(nadj) at the bottom to tell the compiler that nadj exists.
Metadata
Metadata
Assignees
Labels
No labels