Open-EO / openeo-processes

Interoperable processes for openEO's big Earth observation cloud processing.
https://processes.openeo.org
Apache License 2.0
48 stars 16 forks source link

round: confusing definition of rounding #326

Closed Ardweaden closed 2 years ago

Ardweaden commented 2 years ago

Process ID: round

Describe the issue: Documentation states:

If the fractional part of x is halfway between two integers, one of which is even and the other odd, then the even number is returned. This behavior follows IEEE Standard 754.

However, based on the definition in the standard, I'm not sure this should hold for integers only. I would expect this would be used at arbitrary point, e.g. round(x=0.25, p=1) => 0.2 and round(p=0.35, p=1) => 0.4.

Proposed solution: Clarify that the number should be rounded to the one with even least significant digit.

m-mohr commented 2 years ago

Yes, I agree. I'll issue a PR.

m-mohr commented 2 years ago

Please see PR #327. A review would be appreciated.