Skip to content

Commit

Permalink
feat: add log zero option
Browse files Browse the repository at this point in the history
  • Loading branch information
thisisnic committed Sep 15, 2022
1 parent ac66419 commit c0624ec
Showing 1 changed file with 6 additions and 25 deletions.
31 changes: 6 additions & 25 deletions extensions/functions_arithmetic.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -176,19 +176,15 @@ scalar_functions:
-
name: "divide"
description: >
Divide x by y. In the case of integer division, partial values are truncated.
The `on_division_by_zero` option governs behaviour in cases where y is 0 and x is not 0.
The `on_domain_error` option governs behaviour for 0/0 and Inf/Inf etc.
Divide x by y. In the case of integer division, partial values are truncated (i.e. rounded towards 0).
The `on_division_by_zero` option governs behavior in cases where y is 0 and x is not 0.
`LIMIT` means positive or negative infinity (depending on the sign of x and y).
If x and y are both 0 or both +/-infinity, behavior will be governed by `on_domain_error`.
impls:
- args:
- name: overflow
options: [ SILENT, SATURATE, ERROR ]
required: false
- name: on_division_by_zero
options: [ NAN, ERROR, LIMIT ]
required: false
- name: on_domain_error
options: [ NAN, ERROR ]
- name: x
value: i8
- name: y
Expand All @@ -198,11 +194,6 @@ scalar_functions:
- name: overflow
options: [ SILENT, SATURATE, ERROR ]
required: false
- name: on_division_by_zero
options: [ NAN, ERROR, LIMIT ]
required: false
- name: on_domain_error
options: [ NAN, ERROR ]
- name: x
value: i16
- name: y
Expand All @@ -212,11 +203,6 @@ scalar_functions:
- name: overflow
options: [ SILENT, SATURATE, ERROR ]
required: false
- name: on_division_by_zero
options: [ NAN, ERROR, LIMIT ]
required: false
- name: on_domain_error
options: [ NAN, ERROR ]
- name: x
value: i32
- name: y
Expand All @@ -226,11 +212,6 @@ scalar_functions:
- name: overflow
options: [ SILENT, SATURATE, ERROR ]
required: false
- name: on_division_by_zero
options: [ NAN, ERROR, LIMIT ]
required: false
- name: on_domain_error
options: [ NAN, ERROR ]
- name: x
value: i64
- name: y
Expand All @@ -244,7 +225,7 @@ scalar_functions:
options: [ NAN, ERROR ]
required: false
- name: on_division_by_zero
options: [ NAN, ERROR, LIMIT ]
options: [ LIMIT, NAN, ERROR ]
required: false
- name: x
value: fp32
Expand All @@ -259,7 +240,7 @@ scalar_functions:
options: [ NAN, ERROR ]
required: false
- name: on_division_by_zero
options: [ NAN, ERROR, LIMIT ]
options: [ LIMIT, NAN, ERROR ]
required: false
- name: x
value: fp64
Expand Down

0 comments on commit c0624ec

Please sign in to comment.