Skip to content

Commit f870ea0

Browse files
authored
Correct return types in docstrings of sincos* (#54006)
Just a tiny correction to the return types noted in the docstrings, and include a phrase in `sincosd` that's present in the other two.
1 parent 97ac3ec commit f870ea0

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

base/special/trig.jl

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ end
165165
@noinline sincos_domain_error(x) = throw(DomainError(x, "sincos(x) is only defined for finite x."))
166166

167167
"""
168-
sincos(x::T) where T -> float(T)
168+
sincos(x::T) where T -> Tuple{float(T),float(T)}
169169
170170
Simultaneously compute the sine and cosine of `x`, where `x` is in radians, returning
171171
a tuple `(sine, cosine)`.
@@ -850,7 +850,7 @@ function cospi(x::T) where T<:IEEEFloat
850850
end
851851
end
852852
"""
853-
sincospi(x::T) where T -> float(T)
853+
sincospi(x::T) where T -> Tuple{float(T),float(T)}
854854
855855
Simultaneously compute [`sinpi(x)`](@ref) and [`cospi(x)`](@ref) (the sine and cosine of `π*x`,
856856
where `x` is in radians), returning a tuple `(sine, cosine)`.
@@ -1266,9 +1266,10 @@ end
12661266
tand(x::Real) = sind(x) / cosd(x)
12671267

12681268
"""
1269-
sincosd(x::T) where T -> float(T)
1269+
sincosd(x::T) where T -> Tuple{float(T),float(T)}
12701270
1271-
Simultaneously compute the sine and cosine of `x`, where `x` is in degrees.
1271+
Simultaneously compute the sine and cosine of `x`, where `x` is in degrees, returning
1272+
a tuple `(sine, cosine)`.
12721273
12731274
Throw a [`DomainError`](@ref) if `isinf(x)`, return a `(T(NaN), T(NaN))` tuple if `isnan(x)`.
12741275

0 commit comments

Comments
 (0)