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

logrange #821

Merged
merged 9 commits into from
Feb 24, 2024
Merged

logrange #821

merged 9 commits into from
Feb 24, 2024

Conversation

mcabbott
Copy link
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.
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"

Copy link

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
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
src/Compat.jl Outdated Show resolved Hide resolved
src/Compat.jl Outdated Show resolved Hide resolved
Co-authored-by: Alex Arslan <ararslan@comcast.net>
README.md Outdated Show resolved Hide resolved
src/Compat.jl Outdated Show resolved Hide resolved
src/Compat.jl Outdated Show resolved Hide resolved
Co-authored-by: Alex Arslan <ararslan@comcast.net>
@martinholters
Copy link
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.

@mcabbott
Copy link
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.)

README.md Outdated Show resolved Hide resolved
Co-authored-by: Martin Holters <martin.holters@hsu-hh.de>
@martinholters
Copy link
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
20 checks passed
@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.

None yet

4 participants