Skip to content

Commit

Permalink
Clarify mod process #168
Browse files Browse the repository at this point in the history
  • Loading branch information
m-mohr committed Jul 2, 2020
1 parent c4e1b08 commit ec6aca8
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- `filter_bbox`, `load_collection`, `resample_spatial`: Fixed invalid EPSG code examples.
- `aggregate_temporal`: Fixed outdated message for exception `TooManyDimensions`.
- `clip`: Fixed examples.
- `mean`: Clarify behaviour for arrays with `null`-values only.
- `mod`: Clarified behaviour. [#168](https://github.com/Open-EO/openeo-processes/issues/168)
- `resample_*`: Clarified behaviour.
- `mean`: Clarify behavior for arrays with `null`-values only.

## 1.0.0-rc.1 - 2020-01-31

Expand Down
13 changes: 9 additions & 4 deletions mod.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "mod",
"summary": "Modulo",
"description": "Remainder after division of `x` by `y`.\n\nThe result of a modulo operation has the sign of the divisor. The handling regarding the sign of the result [differs between programming languages](https://en.wikipedia.org/wiki/Modulo_operation) and needs careful consideration while implementing this process.\n\nThe no-data value `null` is passed through and therefore gets propagated if any of the arguments is `null`.",
"description": "Remainder after division of `x` by `y` for both integers and floating-point numbers.\n\nThe result of a modulo operation has the sign of the divisor. The handling regarding the sign of the result [differs between programming languages](https://en.wikipedia.org/wiki/Modulo_operation#In_programming_languages) and needs careful consideration to avoid unexpected results. To remove the sign, use the process ``absolute()``.\n\nThe no-data value `null` is passed through and therefore gets propagated if any of the arguments is `null`. A modulo by zero results in ±infinity if the processing environment supports it. Otherwise a `DivisionByZero` error must the thrown.",
"categories": [
"math"
],
Expand Down Expand Up @@ -36,6 +36,11 @@
]
}
},
"exceptions": {
"DivisionByZero": {
"message": "Division by zero is not supported."
}
},
"examples": [
{
"arguments": {
Expand All @@ -53,10 +58,10 @@
},
{
"arguments": {
"x": 27,
"y": -5
"x": 3.14,
"y": -2
},
"returns": -3
"returns": -0.86
},
{
"arguments": {
Expand Down

0 comments on commit ec6aca8

Please sign in to comment.