Skip to content

Commit fe934f0

Browse files
Improve docstring for Base.Math.exponent (#36438)
Co-authored-by: Stefan Karpinski <stefan@karpinski.org>
1 parent d762e8c commit fe934f0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

base/math.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -776,9 +776,10 @@ end
776776
ldexp(x::Float16, q::Integer) = Float16(ldexp(Float32(x), q))
777777

778778
"""
779-
exponent(x) -> Int
779+
exponent(x::AbstractFloat) -> Int
780780
781781
Get the exponent of a normalized floating-point number.
782+
Returns the largest integer `y` such that `2^y ≤ abs(x)`.
782783
"""
783784
function exponent(x::T) where T<:IEEEFloat
784785
@noinline throw1(x) = throw(DomainError(x, "Cannot be NaN or Inf."))

0 commit comments

Comments
 (0)