From 1cca618c5fbd0cf0fe08b3ceca8c96e846dea140 Mon Sep 17 00:00:00 2001 From: Jazab Chaudhry Date: Tue, 16 Apr 2024 15:10:22 -0400 Subject: [PATCH] feat:add i64 as arg for exp,ln,log10,log2 and logb --- extensions/functions_arithmetic.yaml | 7 ++++ extensions/functions_logarithmic.yaml | 48 +++++++++++++++++++++++++++ 2 files changed, 55 insertions(+) diff --git a/extensions/functions_arithmetic.yaml b/extensions/functions_arithmetic.yaml index cc520c541..f58d83406 100644 --- a/extensions/functions_arithmetic.yaml +++ b/extensions/functions_arithmetic.yaml @@ -442,6 +442,13 @@ scalar_functions: name: "exp" description: "The mathematical constant e, raised to the power of the value." impls: + - args: + - name: x + value: i64 + options: + rounding: + values: [ TIE_TO_EVEN, TIE_AWAY_FROM_ZERO, TRUNCATE, CEILING, FLOOR ] + return: fp64 - args: - name: x value: fp32 diff --git a/extensions/functions_logarithmic.yaml b/extensions/functions_logarithmic.yaml index fc88dabd6..5925e6cb4 100644 --- a/extensions/functions_logarithmic.yaml +++ b/extensions/functions_logarithmic.yaml @@ -5,6 +5,17 @@ scalar_functions: name: "ln" description: "Natural logarithm of the value" impls: + - args: + - name: x + value: i64 + options: + rounding: + values: [ TIE_TO_EVEN, TIE_AWAY_FROM_ZERO, TRUNCATE, CEILING, FLOOR ] + on_domain_error: + values: [ NAN, "NULL", ERROR ] + on_log_zero: + values: [NAN, ERROR, MINUS_INFINITY] + return: fp64 - args: - name: x value: fp32 @@ -31,6 +42,17 @@ scalar_functions: name: "log10" description: "Logarithm to base 10 of the value" impls: + - args: + - name: x + value: i64 + options: + rounding: + values: [ TIE_TO_EVEN, TIE_AWAY_FROM_ZERO, TRUNCATE, CEILING, FLOOR ] + on_domain_error: + values: [ NAN, "NULL", ERROR ] + on_log_zero: + values: [NAN, ERROR, MINUS_INFINITY] + return: fp64 - args: - name: x value: fp32 @@ -57,6 +79,17 @@ scalar_functions: name: "log2" description: "Logarithm to base 2 of the value" impls: + - args: + - name: x + value: i64 + options: + rounding: + values: [ TIE_TO_EVEN, TIE_AWAY_FROM_ZERO, TRUNCATE, CEILING, FLOOR ] + on_domain_error: + values: [ NAN, "NULL", ERROR ] + on_log_zero: + values: [NAN, ERROR, MINUS_INFINITY] + return: fp64 - args: - name: x value: fp32 @@ -86,6 +119,21 @@ scalar_functions: logb(x, b) => log_{b} (x) impls: + - args: + - value: i64 + name: "x" + description: "The number `x` to compute the logarithm of" + - value: i64 + name: "base" + description: "The logarithm base `b` to use" + options: + rounding: + values: [ TIE_TO_EVEN, TIE_AWAY_FROM_ZERO, TRUNCATE, CEILING, FLOOR ] + on_domain_error: + values: [ NAN, "NULL", ERROR ] + on_log_zero: + values: [NAN, ERROR, MINUS_INFINITY] + return: fp64 - args: - value: fp32 name: "x"