Skip to content

Commit

Permalink
Merge branch 'draft' into clarify-infinity
Browse files Browse the repository at this point in the history
  • Loading branch information
m-mohr authored Oct 27, 2023
2 parents 933e0aa + 4fd92b2 commit fc308a2
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 40 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Fixed

### Changed

- `clip`: Throw an exception if min > max [#472](https://github.com/Open-EO/openeo-processes/issues/472)

### Fixed

- `divide`: Clarified behavior for division by 0
- `ln` and `log`: Clarified that for x = 0 -infinity is returned
- `mod`: Clarified behavior for y = 0
- `sqrt`: Clarified that NaN is returned for negative numbers.

## [2.0.0-rc.1] - 2023-05-25

Expand Down
4 changes: 2 additions & 2 deletions and.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "and",
"summary": "Logical AND",
"description": "Checks if **both** values are true.\n\nEvaluates parameter `x` before `y` and stops once the outcome is unambiguous. If any argument is `null`, the result will be `null` if the outcome is ambiguous.\n\n**Truth table:**\n\n```\na \\ b || null | false | true\n----- || ----- | ----- | -----\nnull || null | false | null\nfalse || false | false | false\ntrue || null | false | true\n```",
"description": "Checks if **both** values are true.\n\nEvaluates parameter `x` before `y` and stops once the outcome is unambiguous. If any argument is `null`, the result will be `null` if the outcome is ambiguous.\n\n**Truth table:**\n\n```\nx \\ y || null | false | true\n----- || ----- | ----- | -----\nnull || null | false | null\nfalse || false | false | false\ntrue || null | false | true\n```",
"categories": [
"logic"
],
Expand Down Expand Up @@ -90,4 +90,4 @@
"result": true
}
}
}
}
40 changes: 8 additions & 32 deletions clip.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "clip",
"summary": "Clip a value between a minimum and a maximum",
"description": "Clips a number between specified minimum and maximum values. A value larger than the maximum value is set to the maximum value, a value lower than the minimum value is set to the minimum value.\n\nThe no-data value `null` is passed through and therefore gets propagated.",
"description": "Clips a number between specified minimum and maximum values. A value larger than the maximum value is set to the maximum value, a value lower than the minimum value is set to the minimum value. If the maximum value is smaller than the minimum number, the process throws a `MinMaxSwapped` exception.\n\nThe no-data value `null` is passed through and therefore gets propagated.",
"categories": [
"math"
],
Expand Down Expand Up @@ -40,6 +40,11 @@
]
}
},
"exceptions": {
"MinMaxSwapped": {
"message": "The minimum value should be lower than or equal to the maximum value."
}
},
"examples": [
{
"arguments": {
Expand Down Expand Up @@ -73,34 +78,5 @@
},
"returns": null
}
],
"process_graph": {
"min": {
"process_id": "min",
"arguments": {
"data": [
{
"from_parameter": "max"
},
{
"from_parameter": "x"
}
]
}
},
"max": {
"process_id": "max",
"arguments": {
"data": [
{
"from_parameter": "min"
},
{
"from_node": "min"
}
]
},
"result": true
}
}
}
]
}
4 changes: 2 additions & 2 deletions or.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "or",
"summary": "Logical OR",
"description": "Checks if **at least one** of the values is true. Evaluates parameter `x` before `y` and stops once the outcome is unambiguous. If a component is `null`, the result will be `null` if the outcome is ambiguous.\n\n**Truth table:**\n\n```\na \\ b || null | false | true\n----- || ---- | ----- | ----\nnull || null | null | true\nfalse || null | false | true\ntrue || true | true | true\n```",
"description": "Checks if **at least one** of the values is true. Evaluates parameter `x` before `y` and stops once the outcome is unambiguous. If a component is `null`, the result will be `null` if the outcome is ambiguous.\n\n**Truth table:**\n\n```\nx \\ y || null | false | true\n----- || ---- | ----- | ----\nnull || null | null | true\nfalse || null | false | true\ntrue || true | true | true\n```",
"categories": [
"logic"
],
Expand Down Expand Up @@ -90,4 +90,4 @@
"result": true
}
}
}
}
9 changes: 7 additions & 2 deletions sqrt.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "sqrt",
"summary": "Square root",
"description": "Computes the square root of a real number `x`, which is equal to calculating `x` to the power of *0.5*.\n\nA square root of x is a number a such that *`a² = x`*. Therefore, the square root is the inverse function of a to the power of 2, but only for *a >= 0*.\n\nThe no-data value `null` is passed through and therefore gets propagated.",
"description": "Computes the square root of a real number `x`, which is equal to calculating `x` to the power of *0.5*. For negative `x`, the process returns `NaN`.\n\nA square root of x is a number a such that *`a² = x`*. Therefore, the square root is the inverse function of a to the power of 2, but only for *a >= 0*.\n\nThe no-data value `null` is passed through and therefore gets propagated.",
"categories": [
"math",
"math > exponential & logarithmic"
Expand Down Expand Up @@ -58,6 +58,11 @@
"rel": "about",
"href": "http://mathworld.wolfram.com/SquareRoot.html",
"title": "Square root explained by Wolfram MathWorld"
},
{
"rel": "about",
"href": "https://ieeexplore.ieee.org/document/8766229",
"title": "IEEE Standard 754-2019 for Floating-Point Arithmetic"
}
],
"process_graph": {
Expand All @@ -72,4 +77,4 @@
"result": true
}
}
}
}
4 changes: 2 additions & 2 deletions xor.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "xor",
"summary": "Logical XOR (exclusive or)",
"description": "Checks if **exactly one** of the values is true. If a component is `null`, the result will be `null` if the outcome is ambiguous.\n\n**Truth table:**\n\n```\na \\ b || null | false | true\n----- || ---- | ----- | -----\nnull || null | null | null\nfalse || null | false | true\ntrue || null | true | false\n```",
"description": "Checks if **exactly one** of the values is true. If a component is `null`, the result will be `null` if the outcome is ambiguous.\n\n**Truth table:**\n\n```\nx \\ y || null | false | true\n----- || ---- | ----- | -----\nnull || null | null | null\nfalse || null | false | true\ntrue || null | true | false\n```",
"categories": [
"logic"
],
Expand Down Expand Up @@ -125,4 +125,4 @@
"result": true
}
}
}
}

0 comments on commit fc308a2

Please sign in to comment.