For the complete documentation index, see llms.txt. Markdown versions of documentation pages are available by appending .md to page URLs.
Skip to content

sinh

Use the sinh() function to calculate the hyperbolic sine of a numeric value.

Syntax

sinh(<number>)

Parameters

Name
Type
Required
Description

number

integer, float

Yes

The numeric value for which to calculate the hyperbolic sine. Any real number is valid.

Returns

Type: float

Description: The sinh() function returns the hyperbolic sine of the input value. If the input is null, the function returns null.

Usage notes

  • Input type: XQL doesn't support NaN or infinite values as input and these value types also can not be returned.

  • Valid Input Range: The sinh() function accepts any real number as input.

  • Null Handling: If the input expression is null, the function returns null.

  • Symmetry: The function is odd, meaning sinh(-x) = -sinh(x).

  • Identity Value: sinh(0) always returns 0.0.

  • Definition: The hyperbolic sine is defined as (e^x - e^(-x)) / 2.

  • Overflow: For very large input values, the result may overflow to infinity.

  • Common Use Cases: This function is typically used within the alter stage for mathematical modeling, catenary curve calculations, and scientific computations.

Examples

Example 1: Calculate hyperbolic sine of literal values

Goal: Calculate the hyperbolic sine for specific numeric literals to verify known mathematical results.

XQL code:

Explanation: sinh(0) returns 0.0. sinh(1) returns approximately 1.1752, and sinh(-1) returns approximately -1.1752, demonstrating the odd symmetry of the function.

Output:

RESULT1
RESULT2
RESULT3

0.0

1.17520

-1.17520

Example 2: Calculate hyperbolic sine from a field value

Goal: Calculate the hyperbolic sine of values stored in a dataset field.

XQL code:

Explanation: This query computes the hyperbolic sine for each value in the duration_seconds field. No filtering is needed since sinh() accepts any real number.

Output:

EVENT_ID
DURATION_SECONDS
SINH_RESULT

101

0.0

0.0

102

1.0

1.17520

103

2.0

3.62686

Example 3: Verify relationship between sinh and asinh

Goal: Demonstrate that asinh() is the inverse of sinh() by applying both functions sequentially.

XQL code:

Explanation: This query first computes sinh() of duration_seconds, then applies asinh() to the result. The final value should match the original duration_seconds, confirming the inverse relationship.

Output:

EVENT_ID
DURATION_SECONDS
SINH_VAL
ASINH_SINH_VAL

101

1.0

1.17520

1.0

102

2.0

3.62686

2.0

103

3.0

10.01787

3.0

Last updated

Was this helpful?