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

Implement functions: sinh / cosh / tanh / asinh / acosh / atanh #9675

Closed
Tracked by #8806
neverchanje opened this issue May 9, 2023 · 5 comments · Fixed by #8918
Closed
Tracked by #8806

Implement functions: sinh / cosh / tanh / asinh / acosh / atanh #9675

neverchanje opened this issue May 9, 2023 · 5 comments · Fixed by #8918
Labels
type/feature user-facing-changes Contains changes that are visible to users
Milestone

Comments

@neverchanje
Copy link
Contributor

neverchanje commented May 9, 2023

Is your feature request related to a problem? Please describe.

Syntax

SINH(dp DOUBLE PRECISION) → DOUBLE PRECISION

Description

The sinh function in Postgres is used to compute the hyperbolic sine
of a given number, which must be a DOUBLE PRECISION value. The result
is a DOUBLE PRECISION value representing the hyperbolic sine of the
input number.

Parameters

  • dp (DOUBLE PRECISION): The input number for which to compute the
    hyperbolic sine.

Returns

The function returns a DOUBLE PRECISION value, which is the hyperbolic
sine of the input number.

Examples

SELECT SINH(0.0); -- Returns 0
SELECT SINH(1.0); -- Returns approximately 1.175201
SELECT SINH(-1.0); -- Returns approximately -1.175201

In these examples, the sinh function computes the hyperbolic sine of
the given input numbers.

@github-actions github-actions bot added this to the release-0.20 milestone May 9, 2023
@neverchanje neverchanje changed the title Implement functions: sin, asin, sinh Implement functions: sinh / cosh / tanh / asinh / acosh / atanh May 9, 2023
@neverchanje
Copy link
Contributor Author

Syntax

COSH(dp DOUBLE PRECISION) → DOUBLE PRECISION

Description

The cosh function in Postgres is used to compute the hyperbolic cosine
of a given number, which must be a DOUBLE PRECISION value. The result
is a DOUBLE PRECISION value representing the hyperbolic cosine of the
input number.

Parameters

  • dp (DOUBLE PRECISION): The input number for which to compute the
    hyperbolic cosine.

Returns

The function returns a DOUBLE PRECISION value, which is the hyperbolic
cosine of the input number.

Examples

SELECT COSH(0.0); -- Returns 1
SELECT COSH(1.0); -- Returns approximately 1.543081
SELECT COSH(-1.0); -- Returns approximately 1.543081

In these examples, the cosh function computes the hyperbolic cosine of
the given input numbers.

@neverchanje
Copy link
Contributor Author

Syntax

TANH(dp DOUBLE PRECISION) → DOUBLE PRECISION

Description

The tanh function in Postgres is used to compute the hyperbolic
tangent of a given number, which must be a DOUBLE PRECISION value. The
result is a DOUBLE PRECISION value representing the hyperbolic tangent
of the input number.

Parameters

  • dp (DOUBLE PRECISION): The input number for which to compute the
    hyperbolic tangent.

Returns

The function returns a DOUBLE PRECISION value, which is the hyperbolic
tangent of the input number.

Examples

SELECT TANH(0.0); -- Returns 0
SELECT TANH(1.0); -- Returns approximately 0.761594
SELECT TANH(-1.0); -- Returns approximately -0.761594

In these examples, the tanh function computes the hyperbolic tangent
of the given input numbers.

@neverchanje neverchanje added the user-facing-changes Contains changes that are visible to users label May 9, 2023
@neverchanje neverchanje linked a pull request May 9, 2023 that will close this issue
6 tasks
@neverchanje
Copy link
Contributor Author

Syntax

ASINH(dp DOUBLE PRECISION) → DOUBLE PRECISION

Description

The asinh function in Postgres is used to compute the inverse
hyperbolic sine (area hyperbolic sine) of a given number, which must be
a DOUBLE PRECISION value. The result is a DOUBLE PRECISION value
representing the inverse hyperbolic sine of the input number.

Parameters

  • dp (DOUBLE PRECISION): The input number for which to compute the
    inverse hyperbolic sine.

Returns

The function returns a DOUBLE PRECISION value, which is the inverse
hyperbolic sine of the input number.

Examples

SELECT ASINH(0.0); -- Returns 0
SELECT ASINH(1.0); -- Returns approximately 0.881374
SELECT ASINH(-1.0); -- Returns approximately -0.881374

In these examples, the asinh function computes the inverse hyperbolic
sine (area hyperbolic sine) of the given input numbers.

@neverchanje
Copy link
Contributor Author

Syntax

ACOSH(dp DOUBLE PRECISION) → DOUBLE PRECISION

Description

The acosh function in Postgres is used to compute the inverse
hyperbolic cosine (area hyperbolic cosine) of a given number, which must
be a DOUBLE PRECISION value greater than or equal to 1. The result is
a DOUBLE PRECISION value representing the inverse hyperbolic cosine of
the input number.

Parameters

  • dp (DOUBLE PRECISION): The input number for which to compute the
    inverse hyperbolic cosine. The number must be greater than or equal to
    1.

Returns

The function returns a DOUBLE PRECISION value, which is the inverse
hyperbolic cosine of the input number.

Examples

SELECT ACOSH(1.0); -- Returns 0
SELECT ACOSH(2.0); -- Returns approximately 1.316958
SELECT ACOSH(3.0); -- Returns approximately 1.762747

In these examples, the acosh function computes the inverse hyperbolic
cosine (area hyperbolic cosine) of the given input numbers.

@neverchanje
Copy link
Contributor Author

Syntax

ATANH(dp DOUBLE PRECISION) → DOUBLE PRECISION

Description

The atanh function in Postgres is used to compute the inverse
hyperbolic tangent (area hyperbolic tangent) of a given number, which
must be a DOUBLE PRECISION value between -1 and 1, excluding -1 and 1
themselves. The result is a DOUBLE PRECISION value representing the
inverse hyperbolic tangent of the input number.

Parameters

  • dp (DOUBLE PRECISION): The input number for which to compute the
    inverse hyperbolic tangent. The number must be between -1 and 1,
    exclusive.

Returns

The function returns a DOUBLE PRECISION value, which is the inverse
hyperbolic tangent of the input number.

Examples

SELECT ATANH(0.0); -- Returns 0
SELECT ATANH(0.5); -- Returns approximately 0.549306
SELECT ATANH(-0.5); -- Returns approximately -0.549306

In these examples, the atanh function computes the inverse hyperbolic
tangent (area hyperbolic tangent) of the given input numbers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/feature user-facing-changes Contains changes that are visible to users
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant