Skip to content

logrange#821

Merged
martinholters merged 9 commits intoJuliaLang:masterfrom
mcabbott:logrange
Feb 24, 2024
Merged

logrange#821
martinholters merged 9 commits intoJuliaLang:masterfrom
mcabbott:logrange

Conversation

@mcabbott
Copy link
Copy Markdown
Contributor

@mcabbott mcabbott commented Feb 17, 2024

This adds JuliaLang/julia#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_range function (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.
Details
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
Copy link
Copy Markdown

codecov bot commented Feb 17, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

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              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@LilithHafner
Copy link
Copy Markdown
Member

I don't have the energy/enthusiasm to review this PR. Feel free to proceed without me.

@LilithHafner LilithHafner removed their request for review February 18, 2024 19:13
Comment thread src/Compat.jl Outdated
Comment thread src/Compat.jl Outdated
Co-authored-by: Alex Arslan <ararslan@comcast.net>
Comment thread README.md Outdated
Comment thread src/Compat.jl Outdated
Comment thread src/Compat.jl Outdated
Co-authored-by: Alex Arslan <ararslan@comcast.net>
@martinholters
Copy link
Copy Markdown
Member

martinholters commented Feb 21, 2024

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.

Comment thread src/Compat.jl
@mcabbott
Copy link
Copy Markdown
Contributor Author

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.)

Comment thread README.md Outdated
Co-authored-by: Martin Holters <martin.holters@hsu-hh.de>
@martinholters
Copy link
Copy Markdown
Member

If you include a version bump in Project.toml, we can tag a new version immediately after merge. Otherwise seems good to go.

@martinholters martinholters merged commit 220f4d7 into JuliaLang:master Feb 24, 2024
@mcabbott mcabbott deleted the logrange branch February 24, 2024 17:11
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.

4 participants