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

Add note to torch docs for sinh/cosh #49413

Closed
wants to merge 3 commits into from
Closed
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
14 changes: 14 additions & 0 deletions torch/_torch_docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -2009,6 +2009,13 @@ def merge_dicts(*dicts):
Returns a new tensor with the hyperbolic cosine of the elements of
:attr:`input`.

.. note::
soulitzer marked this conversation as resolved.
Show resolved Hide resolved
Depending on the size and contiguity of the input, the implementation
soulitzer marked this conversation as resolved.
Show resolved Hide resolved
implementation of `torch.cosh` on cpu may use the Sleef library, which
only supports inputs in `[-709, 709]` for double precision numbers or inputs
in `[-88.5, 88.5]` for single precision numbers. If the input is out of this
range, infinity (with the correct sign) may be returned instead.

.. math::
\text{out}_{i} = \cosh(\text{input}_{i})
""" + r"""
Expand Down Expand Up @@ -7460,6 +7467,13 @@ def merge_dicts(*dicts):
Returns a new tensor with the hyperbolic sine of the elements of
:attr:`input`.

.. note::
Depending on the size and contiguity of the input, the implementation
implementation of `torch.sinh` on cpu may use the Sleef library, which
only supports inputs in `[-709, 709]` for double precision numbers or inputs
in `[-88.5, 88.5]` for single precision numbers. If the input is out of this
range, infinity (with the correct sign) may be returned instead.

.. math::
\text{out}_{i} = \sinh(\text{input}_{i})
""" + r"""
Expand Down