Skip to content

Commit

Permalink
Correct docstring of rem_pio2_kernel (#29335)
Browse files Browse the repository at this point in the history
  • Loading branch information
dpsanders authored May 3, 2020
1 parent 8ab87d2 commit cf3d8b5
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions base/special/rem_pio2.jl
Original file line number Diff line number Diff line change
Expand Up @@ -209,12 +209,13 @@ function paynehanek(x::Float64)
end

"""
rem_pio2_kernel(x)
rem_pio2_kernel(x::Union{Float32, Float64})
Return the remainder of `x` modulo π/2 as a double-double pair, along with a `k`
such that ``k \\mod 3 == K \\mod 3`` where ``K*π/2 = x - rem``. Note, that it is
only meant for use when ``|x|>=π/4``, and that ``π/2`` is always subtracted or
added for ``π/4<|x|<=π/2`` instead of simply returning `x`.
Calculate `x` divided by `π/2` accurately for arbitrarily large `x`.
Returns a pair `(k, r)`, where `k` is the quadrant of the result
(multiple of π/2) and `r` is the remainder, such that ``k * π/2 = x - r``.
The remainder is given as a double-double pair.
`k` is positive if `x > 0` and is negative if `x ≤ 0`.
"""
@inline function rem_pio2_kernel(x::Float64)
xhp = poshighword(x)
Expand Down

1 comment on commit cf3d8b5

@nanosoldier
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Executing the daily package evaluation, I will reply here when finished:

@nanosoldier runtests(ALL, isdaily = true)

Please sign in to comment.