SINH

Compute the hyperbolic sine of a real number.

Category: mathReturns: DOUBLEDialect: Standard

Syntax

SINH(expr)

Description

## Overview Returns the hyperbolic sine of the input. The hyperbolic sine is defined by SINH(x) = (e^x - e^-x) / 2. It grows exponentially in both directions and is unbounded. SINH appears in catenary cable shapes, special relativity, and any model where a symmetric, unbounded, anti-symmetric nonlinearity is needed. Because SINH shares the exponential growth profile of EXP, it overflows to infinity around the same input magnitude (roughly 710 for IEEE 754 double-precision). For numerical stability with small inputs, prefer the Taylor expansion (x + x^3/6 + ...) implicit in most library implementations rather than recomputing (EXP(x) - EXP(-x)) / 2 yourself, which loses precision near zero. ## Behavior - Domain: all finite DOUBLE values. - Range: (-infinity, infinity). - Returns NULL if the argument is NULL. - Returns 0 for input 0 and preserves sign: SINH(-x) = -SINH(x). - Returns positive infinity for very large positive inputs and negative infinity for very large negative inputs. ## Numeric precision - Uses the IEEE 754 double-precision sinh routine. Accurate to within one ULP for typical magnitudes. - Overflows to infinity for inputs with absolute value above approximately 710. - Naive evaluation as (EXP(x) - EXP(-x)) / 2 loses precision near zero; the built-in function preserves small-input accuracy. ## Compatibility - Conforms to the SQL standard definition of SINH as a scalar DOUBLE function. - Matches typical mathematical library implementations.

Parameters

NameTypeDescription
exprSpecifies the real-valued input. Accepts any finite DOUBLE value. Extremely large magnitudes produce infinity.

Examples

-- Basic literal
SELECT SINH(0);
-- Result: 0.0
-- Hyperbolic sine of 1
SELECT SINH(1);
-- Result: 1.1752011936438014
-- Anti-symmetry: SINH(-x) = -SINH(x)
SELECT SINH(-2), -SINH(2);
-- Result: -3.626860407847019, -3.626860407847019
-- Definition: (e^x - e^-x) / 2
SELECT SINH(1), (EXP(1) - EXP(-1)) / 2;
-- Result: 1.1752011936438014, 1.1752011936438014
-- Overflow for very large input
SELECT SINH(1000);
-- Result: Infinity
-- Column use: model a nonlinear strain response
SELECT sensor_id, 0.5 * SINH(load_normalized) AS strain_response
FROM engineering.test.load_samples;

Pitfalls

See Also

Open in interactive docs →   DeltaForge home →