Skip to content

Commit

Permalink
refactor(arithmetic): specify FP overflow and domain options for rema…
Browse files Browse the repository at this point in the history
…ining ops (#269)

Addition, substraction, multiplication and division were added before we'd settled on / had
conversations around what made sense for floating-point overflow and domain error options.  Adding
in appropriate overflow options for those four ops and also adding the appropriate domain error
option for division.

BREAKING CHANGE: Options SILENT, SATURATE, ERROR are no longer valid for use with floating point
arguments to add, subtract, multiply or divide
  • Loading branch information
gforsyth authored Jul 28, 2022
1 parent 1339534 commit de64a3c
Showing 1 changed file with 22 additions and 8 deletions.
30 changes: 22 additions & 8 deletions extensions/functions_arithmetic.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,15 @@ scalar_functions:
- value: i64
return: i64
- args:
- options: [ SILENT, SATURATE, ERROR ]
- name: rounding
options: [ TIE_TO_EVEN, TIE_AWAY_FROM_ZERO, TRUNCATE, CEILING, FLOOR ]
required: false
- value: fp32
- value: fp32
return: fp32
- args:
- options: [ SILENT, SATURATE, ERROR ]
- name: rounding
options: [ TIE_TO_EVEN, TIE_AWAY_FROM_ZERO, TRUNCATE, CEILING, FLOOR ]
required: false
- value: fp64
- value: fp64
Expand Down Expand Up @@ -70,13 +72,15 @@ scalar_functions:
- value: i64
return: i64
- args:
- options: [ SILENT, SATURATE, ERROR ]
- name: rounding
options: [ TIE_TO_EVEN, TIE_AWAY_FROM_ZERO, TRUNCATE, CEILING, FLOOR ]
required: false
- value: fp32
- value: fp32
return: fp32
- args:
- options: [ SILENT, SATURATE, ERROR ]
- name: rounding
options: [ TIE_TO_EVEN, TIE_AWAY_FROM_ZERO, TRUNCATE, CEILING, FLOOR ]
required: false
- value: fp64
- value: fp64
Expand Down Expand Up @@ -110,13 +114,15 @@ scalar_functions:
- value: i64
return: i64
- args:
- options: [ SILENT, SATURATE, ERROR ]
- name: rounding
options: [ TIE_TO_EVEN, TIE_AWAY_FROM_ZERO, TRUNCATE, CEILING, FLOOR ]
required: false
- value: fp32
- value: fp32
return: fp32
- args:
- options: [ SILENT, SATURATE, ERROR ]
- name: rounding
options: [ TIE_TO_EVEN, TIE_AWAY_FROM_ZERO, TRUNCATE, CEILING, FLOOR ]
required: false
- value: fp64
- value: fp64
Expand Down Expand Up @@ -150,13 +156,21 @@ scalar_functions:
- value: i64
return: i64
- args:
- options: [ SILENT, SATURATE, ERROR ]
- name: rounding
options: [ TIE_TO_EVEN, TIE_AWAY_FROM_ZERO, TRUNCATE, CEILING, FLOOR ]
required: false
- name: on_domain_error
options: [ NAN, ERROR ]
required: false
- value: fp32
- value: fp32
return: fp32
- args:
- options: [ SILENT, SATURATE, ERROR ]
- name: rounding
options: [ TIE_TO_EVEN, TIE_AWAY_FROM_ZERO, TRUNCATE, CEILING, FLOOR ]
required: false
- name: on_domain_error
options: [ NAN, ERROR ]
required: false
- value: fp64
- value: fp64
Expand Down

0 comments on commit de64a3c

Please sign in to comment.