ACOSH

Compute the inverse hyperbolic cosine of a real number at least 1.

Category: mathReturns: DOUBLEDialect: Standard

Syntax

ACOSH(expr)

Description

## Overview Returns the inverse hyperbolic cosine of the input. ACOSH is defined only for inputs greater than or equal to 1, and returns a non-negative angle (technically a rapidity, not a geometric angle). It is the algebraic inverse of COSH on the non-negative branch and is equivalent to LN(x + SQRT(x*x - 1)). ACOSH appears most often in special relativity (recovering rapidity from the Lorentz gamma factor), catenary cable analysis, and numerical inversions of hyperbolic functions. The domain restriction (x >= 1) mirrors COSH's range. ## Behavior - Domain: [1, infinity). Values strictly less than 1 return NULL. - Range: [0, infinity). - Returns NULL if the argument is NULL. - Is strictly increasing: ACOSH preserves order on its domain. - ACOSH(COSH(x)) equals |x|, not x. The inverse returns only the non-negative branch. ## Numeric precision - Uses the IEEE 754 double-precision acosh routine, accurate to within one ULP. - The naive closed form LN(x + SQRT(x*x - 1)) loses precision for x just above 1 because of cancellation in the radical. Call ACOSH directly rather than expanding. - Near x = 1, the derivative is unbounded, so ACOSH is sensitive to input noise in that regime. ## Compatibility - Conforms to the SQL standard definition of ACOSH as a scalar DOUBLE function with domain x >= 1. - Matches typical mathematical library implementations.

Parameters

NameTypeDescription
exprSpecifies the real-valued input. Must be greater than or equal to 1. Values less than 1 yield NULL.

Examples

-- Basic literal: ACOSH of 1 is 0
SELECT ACOSH(1);
-- Result: 0.0
-- Inverse hyperbolic cosine of 2
SELECT ACOSH(2);
-- Result: 1.3169578969248166
-- Round trip: ACOSH(COSH(x)) = |x|
SELECT ACOSH(COSH(3.0));
-- Result: 3.0
-- Out-of-domain input returns NULL
SELECT ACOSH(0.5);
-- Result: NULL
-- Closed form: ACOSH(x) = LN(x + SQRT(x*x - 1))
SELECT ACOSH(3), LN(3 + SQRT(8));
-- Result: 1.7627471740390859, 1.7627471740390859
-- Column use: recover rapidity from relativistic gamma factor
SELECT track_id, ACOSH(gamma) AS rapidity
FROM physics.simulation.tracks
WHERE gamma >= 1;

Pitfalls

See Also

Open in interactive docs →   DeltaForge home →