diff --git a/eo-runtime/src/main/eo/org/eolang/float.eo b/eo-runtime/src/main/eo/org/eolang/float.eo index bbddda9ea1..e197203c75 100644 --- a/eo-runtime/src/main/eo/org/eolang/float.eo +++ b/eo-runtime/src/main/eo/org/eolang/float.eo @@ -30,9 +30,20 @@ [] > float # Tests that $ = x [x] > eq - eq. > @ - ^.as-bytes - x.as-bytes + if. > @ + and. + eq. + ^.as-bytes > self-as-bytes! + 00-00-00-00-00-00-00-00 > zero-as-bytes! + eq. + x.as-bytes > x-as-bytes! + zero-as-bytes + eq. + ^.neg.as-bytes + x.neg.as-bytes + eq. + self-as-bytes + x-as-bytes # Tests that $ < x [x] > lt diff --git a/eo-runtime/src/main/eo/org/eolang/int.eo b/eo-runtime/src/main/eo/org/eolang/int.eo index 2935cc2183..b6a0cf4fa7 100644 --- a/eo-runtime/src/main/eo/org/eolang/int.eo +++ b/eo-runtime/src/main/eo/org/eolang/int.eo @@ -31,9 +31,20 @@ # Tests that $ = x [x] > eq - eq. > @ - ^.as-bytes - x.as-bytes + if. > @ + and. + eq. + ^.as-bytes > self-as-bytes! + 00-00-00-00-00-00-00-00 > zero-as-bytes! + eq. + x.as-bytes > x-as-bytes! + zero-as-bytes + eq. + ^.neg.as-bytes + x.neg.as-bytes + eq. + self-as-bytes + x-as-bytes # Tests that $ < x [x] > lt diff --git a/eo-runtime/src/main/java/org/eolang/Param.java b/eo-runtime/src/main/java/org/eolang/Param.java index 3a6ea603c5..2785df7d80 100644 --- a/eo-runtime/src/main/java/org/eolang/Param.java +++ b/eo-runtime/src/main/java/org/eolang/Param.java @@ -116,13 +116,7 @@ public Bytes asBytes() { } else if (Character.class.isInstance(ret)) { res = new BytesOf((char) ret); } else if (Double.class.isInstance(ret)) { - final double adjusted; - if (ret.equals(0.0)) { - adjusted = -0.0; - } else { - adjusted = (double) ret; - } - res = new BytesOf(adjusted); + res = new BytesOf((double) ret); } else if (byte[].class.isInstance(ret)) { res = new BytesOf((byte[]) ret); } else {