| InvalidOperationException | either x or y is signaling NaN |
| UnderflowException | result is subnormal |
| InexactException | result is inexact |
| x | y | fdim(x, y) |
|---|---|---|
| NaN | any | NaN |
| any | NaN | NaN |
| x > y | x - y | |
| x ≤ y | 0.0 |
decimal32 x = "10.4"; decimal32 y = "7.3"; assert (fdim(x, y) == decimal32("3.1")); assert (fdim(y, x) == 0);
Returns the positive difference between x and y. If x ≤ y, retuns 0.0