diff --git a/src/core_functions/function_list.cpp b/src/core_functions/function_list.cpp index 6874af34ab86..57cbd87389e0 100644 --- a/src/core_functions/function_list.cpp +++ b/src/core_functions/function_list.cpp @@ -62,6 +62,7 @@ static const StaticFunctionDefinition internal_functions[] = { DUCKDB_SCALAR_FUNCTION(StartsWithOperatorFun), DUCKDB_SCALAR_FUNCTION_SET_ALIAS(AbsFun), DUCKDB_SCALAR_FUNCTION(AcosFun), + DUCKDB_SCALAR_FUNCTION(AcoshFun), DUCKDB_SCALAR_FUNCTION_SET(AgeFun), DUCKDB_SCALAR_FUNCTION_ALIAS(AggregateFun), DUCKDB_SCALAR_FUNCTION(AliasFun), @@ -97,8 +98,10 @@ static const StaticFunctionDefinition internal_functions[] = { DUCKDB_SCALAR_FUNCTION(ArrayValueFun), DUCKDB_SCALAR_FUNCTION(ASCIIFun), DUCKDB_SCALAR_FUNCTION(AsinFun), + DUCKDB_SCALAR_FUNCTION(AsinhFun), DUCKDB_SCALAR_FUNCTION(AtanFun), DUCKDB_SCALAR_FUNCTION(Atan2Fun), + DUCKDB_SCALAR_FUNCTION(AtanhFun), DUCKDB_AGGREGATE_FUNCTION_SET(AvgFun), DUCKDB_SCALAR_FUNCTION_SET(BarFun), DUCKDB_SCALAR_FUNCTION_ALIAS(Base64Fun), @@ -121,6 +124,7 @@ static const StaticFunctionDefinition internal_functions[] = { DUCKDB_SCALAR_FUNCTION(ChrFun), DUCKDB_AGGREGATE_FUNCTION(CorrFun), DUCKDB_SCALAR_FUNCTION(CosFun), + DUCKDB_SCALAR_FUNCTION(CoshFun), DUCKDB_SCALAR_FUNCTION(CotFun), DUCKDB_AGGREGATE_FUNCTION(CovarPopFun), DUCKDB_AGGREGATE_FUNCTION(CovarSampFun), @@ -325,6 +329,7 @@ static const StaticFunctionDefinition internal_functions[] = { DUCKDB_SCALAR_FUNCTION_SET(SignFun), DUCKDB_SCALAR_FUNCTION_SET(SignBitFun), DUCKDB_SCALAR_FUNCTION(SinFun), + DUCKDB_SCALAR_FUNCTION(SinhFun), DUCKDB_AGGREGATE_FUNCTION(SkewnessFun), DUCKDB_SCALAR_FUNCTION_ALIAS(SplitFun), DUCKDB_SCALAR_FUNCTION(SqrtFun), @@ -348,6 +353,7 @@ static const StaticFunctionDefinition internal_functions[] = { DUCKDB_AGGREGATE_FUNCTION_SET(SumNoOverflowFun), DUCKDB_AGGREGATE_FUNCTION_ALIAS(SumkahanFun), DUCKDB_SCALAR_FUNCTION(TanFun), + DUCKDB_SCALAR_FUNCTION(TanhFun), DUCKDB_SCALAR_FUNCTION_SET(TimeBucketFun), DUCKDB_SCALAR_FUNCTION(TimeTZSortKeyFun), DUCKDB_SCALAR_FUNCTION_SET(TimezoneFun), diff --git a/src/include/duckdb/core_functions/scalar/math_functions.hpp b/src/include/duckdb/core_functions/scalar/math_functions.hpp index 367b360b349f..2e84f1d9519a 100644 --- a/src/include/duckdb/core_functions/scalar/math_functions.hpp +++ b/src/include/duckdb/core_functions/scalar/math_functions.hpp @@ -396,4 +396,58 @@ struct TruncFun { static ScalarFunctionSet GetFunctions(); }; +struct CoshFun { + static constexpr const char *Name = "cosh"; + static constexpr const char *Parameters = "x"; + static constexpr const char *Description = "Computes the hyperbolic cos of x"; + static constexpr const char *Example = "cosh(1)"; + + static ScalarFunction GetFunction(); +}; + +struct SinhFun { + static constexpr const char *Name = "sinh"; + static constexpr const char *Parameters = "x"; + static constexpr const char *Description = "Computes the hyperbolic sin of x"; + static constexpr const char *Example = "sinh(1)"; + + static ScalarFunction GetFunction(); +}; + +struct TanhFun { + static constexpr const char *Name = "tanh"; + static constexpr const char *Parameters = "x"; + static constexpr const char *Description = "Computes the hyperbolic tan of x"; + static constexpr const char *Example = "tanh(1)"; + + static ScalarFunction GetFunction(); +}; + +struct AcoshFun { + static constexpr const char *Name = "acosh"; + static constexpr const char *Parameters = "x"; + static constexpr const char *Description = "Computes the inverse hyperbolic cos of x"; + static constexpr const char *Example = "acosh(0.5)"; + + static ScalarFunction GetFunction(); +}; + +struct AsinhFun { + static constexpr const char *Name = "asinh"; + static constexpr const char *Parameters = "x"; + static constexpr const char *Description = "Computes the inverse hyperbolic sin of x"; + static constexpr const char *Example = "asinh(0.5)"; + + static ScalarFunction GetFunction(); +}; + +struct AtanhFun { + static constexpr const char *Name = "atanh"; + static constexpr const char *Parameters = "x"; + static constexpr const char *Description = "Computes the inverse hyperbolic tan of x"; + static constexpr const char *Example = "atanh(0.5)"; + + static ScalarFunction GetFunction(); +}; + } // namespace duckdb