Compat.jl
Compat.jl copied to clipboard
logrange
This adds https://github.com/JuliaLang/julia/pull/39071
Note that:
- ~~The version check may need to change once backported to 1.11 branch~~
- Before Julia 1.9, it won't use TwicePrecision, as the necessary log/exp functions aren't defined. The result is slightly worse floating point accuracy.
- It doesn't print the same way, since there's a big messy
print_rangefunction (for LinRange) whose signature the PR widened. - ~~The docstrings don't show up in REPL help, I don't know why. Maybe that's true of all functions here. It means you can't see the notes about the above points.~~
julia> logrange(1, 4, length=5)
5-element Compat.LogRange{Float64, Float64}:
1.0
1.414213562373095
2.0
2.82842712474619
4.0
help?> logrange
search: logrange
No documentation found.
Compat.logrange is a Function.
# 2 methods for generic function "logrange":
[1] logrange(start::Real, stop::Real; length) in Compat at /Users/me/.julia/dev/Compat/src/Compat.jl:832
[2] logrange(start::Real, stop::Real, length::Integer) in Compat at /Users/me/.julia/dev/Compat/src/Compat.jl:831
help?> Compat.LogRange
No documentation found.
Compat.LogRange is of type UnionAll.
Summary
≡≡≡≡≡≡≡≡≡
struct UnionAll <: Type{T}
julia> VERSION
v"1.6.0"
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 93.71%. Comparing base (
82d1848) to head (6f5ee40). Report is 2 commits behind head on master.
Additional details and impacted files
@@ Coverage Diff @@
## master #821 +/- ##
==========================================
+ Coverage 92.65% 93.71% +1.06%
==========================================
Files 2 2
Lines 354 414 +60
==========================================
+ Hits 328 388 +60
Misses 26 26
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
I don't have the energy/enthusiasm to review this PR. Feel free to proceed without me.
The docstrings don't show up in REPL help, I don't know why. Maybe that's true of all functions here. It means you can't see the notes about the above points.
I think that's because they are inside the if, not at top level, so need an explicit @doc.
so need an eplicit
@doc.
I've added this to all docstrings in the package, since none worked before. (Could be a separate PR but that's more hassle.)
If you include a version bump in Project.toml, we can tag a new version immediately after merge. Otherwise seems good to go.