diff --git a/cases/arithmetic/cos.yaml b/cases/arithmetic/cos.yaml new file mode 100644 index 00000000..544e34fc --- /dev/null +++ b/cases/arithmetic/cos.yaml @@ -0,0 +1,46 @@ +function: cos +cases: + - group: + id: basic + description: Basic examples without any special cases + args: + - value: 0.01 + type: fp32 + result: + value: 0.9999500004189004 + type: fp32 + - group: basic + args: + - value: 4.5 + type: fp32 + result: + value: -0.2107957994307797 + type: fp32 + - group: basic + args: + - value: 1 + type: fp64 + result: + value: 0.5403023058681398 + type: fp64 + - group: basic + args: + - value: 7.00000095367431640625 + type: fp64 + result: + value: 0.7539016277917163 + type: fp64 + - group: basic + args: + - value: -7.00000095367431640625 + type: fp64 + result: + value: 0.7539016277917163 + type: fp64 + - group: basic + args: + - value: null + type: fp64 + result: + value: null + type: fp64 diff --git a/cases/arithmetic/sin.yaml b/cases/arithmetic/sin.yaml new file mode 100644 index 00000000..081b79d3 --- /dev/null +++ b/cases/arithmetic/sin.yaml @@ -0,0 +1,46 @@ +function: sin +cases: + - group: + id: basic + description: Basic examples without any special cases + args: + - value: 0.01 + type: fp32 + result: + value: 0.009999833110660423 + type: fp32 + - group: basic + args: + - value: 4.5 + type: fp32 + result: + value: -0.977530117665097 + type: fp32 + - group: basic + args: + - value: 1 + type: fp64 + result: + value: 0.8414709848078965 + type: fp64 + - group: basic + args: + - value: 7.00000095367431640625 + type: fp64 + result: + value: 0.6569873176957074 + type: fp64 + - group: basic + args: + - value: -7.00000095367431640625 + type: fp64 + result: + value: -0.6569873176957074 + type: fp64 + - group: basic + args: + - value: null + type: fp64 + result: + value: null + type: fp64 diff --git a/dialects/datafusion.yaml b/dialects/datafusion.yaml index 8cbb1d02..6cd37c08 100644 --- a/dialects/datafusion.yaml +++ b/dialects/datafusion.yaml @@ -34,6 +34,16 @@ scalar_functions: - args: - fp32 result: fp32 + - name: cos + unsupported_kernels: + - args: + - fp32 + result: fp32 + - name: sin + unsupported_kernels: + - args: + - fp32 + result: fp32 - name: factorial unsupported: True - name: abs diff --git a/dialects/duckdb.yaml b/dialects/duckdb.yaml index 0bb09281..3a48aba0 100644 --- a/dialects/duckdb.yaml +++ b/dialects/duckdb.yaml @@ -43,6 +43,8 @@ scalar_functions: required_options: overflow: ERROR rounding: TIE_TO_EVEN + - name: cos + - name: sin - name: factorial unsupported: true - name: abs diff --git a/dialects/postgres.yaml b/dialects/postgres.yaml index 31403c1a..88eb1e75 100644 --- a/dialects/postgres.yaml +++ b/dialects/postgres.yaml @@ -82,6 +82,8 @@ scalar_functions: required_options: on_domain_error: ERROR - name: exp + - name: cos + - name: sin - name: factorial - name: abs required_options: diff --git a/dialects/sqlite.yaml b/dialects/sqlite.yaml index 8e37e9c3..cb7056e4 100644 --- a/dialects/sqlite.yaml +++ b/dialects/sqlite.yaml @@ -43,6 +43,8 @@ scalar_functions: required_options: on_domain_error: NONE - name: exp + - name: cos + - name: sin - name: factorial unsupported: True - name: abs diff --git a/dialects/velox_presto.yaml b/dialects/velox_presto.yaml index 025c71c5..0e6c46c4 100644 --- a/dialects/velox_presto.yaml +++ b/dialects/velox_presto.yaml @@ -137,6 +137,16 @@ scalar_functions: - args: - fp32 result: fp32 + - name: cos + unsupported_kernels: + - args: + - fp32 + result: fp32 + - name: sin + unsupported_kernels: + - args: + - fp32 + result: fp32 - name: factorial unsupported: True - name: abs