Skip to content

Commit

Permalink
added tests
Browse files Browse the repository at this point in the history
  • Loading branch information
nickgerrets committed Aug 7, 2024
1 parent 664b358 commit db20159
Showing 1 changed file with 53 additions and 0 deletions.
53 changes: 53 additions & 0 deletions test/sql/function/numeric/test_trigo.test
Original file line number Diff line number Diff line change
Expand Up @@ -459,3 +459,56 @@ statement error
select acos(-2);
----
Invalid Input Error: ACOS is undefined outside [-1,1]


# Hyperbolic trigo functions

# ATANH
foreach value 1.1 -1.1

statement error
select atanh(${value});
----
Invalid Input Error: ATANH is undefined outside [-1,1]

endloop

query II
select atanh(1), atanh(-1);
----
inf inf

query III
select atanh(-0.5), atanh(0), atanh(0.5);
----
-0.5493061443340549 0.0 0.5493061443340549

# ACOSH
query IIII
select acosh(-1), acosh(0), acosh(1), acosh(2);
----
NaN NaN 0.0 1.3169578969248166

# ASINH
query III
select asinh(-1), asinh(0), asinh(2);
----
-0.881373587019543 0.0 1.4436354751788103

# TANH
query IIII
select tanh(-0.5), tanh(0), tanh(0.5), tanh(1000);
----
-0.46211715726000974 0.0 0.46211715726000974 1.0

# COSH
query IIII
select cosh(-1), cosh(0), cosh(1), cosh(1000);
----
1.5430806348152437 1.0 1.5430806348152437 inf

# SINH
query IIII
select sinh(-1), sinh(0), sinh(1), sinh(1000);
----
-1.1752011936438014 0.0 1.1752011936438014 inf

0 comments on commit db20159

Please sign in to comment.