···1717 bit array pattern to extract a `Float` and had a constructor called `Number`.
1818 ([Surya Rose](https://github.com/GearsDatapacks))
19192020+- Fixed a bug where `-0.0` would be encoded incorrectly in 16-bit bit array
2121+ segments on the JavaScript target.
2222+ ([Surya Rose](https://github.com/GearsDatapacks))
20232124## v1.18.0-rc1 - 2026-07-21
2225
···12551255 } else if (value === -Infinity) {
12561256 buffer[1] = 0xfc;
12571257 } else if (value === 0) {
12581258- // Both values are already zero
12581258+ // 0 === -0, so we need to do an additional check here
12591259+ if (isNegativeZero(value)) {
12601260+ buffer[1] = 128;
12611261+ }
12621262+ // Otherwise, both values are already zero
12591263 } else {
12601264 const sign = value < 0 ? 1 : 0;
12611265 value = Math.abs(value);
···12871291 }
1288129212891293 return buffer;
12941294+}
12951295+12961296+/**
12971297+ * Returns whether or not a value is `-0`, since this cannot be checked using
12981298+ * equality.
12991299+ *
13001300+ * @param {number} value
13011301+ * @returns {boolean}
13021302+ */
13031303+function isNegativeZero(value) {
13041304+ // One of the few differences between 0 and -0 is that division by -0 returns
13051305+ // -Infinity rather than Infinity.
13061306+ return 1 / value === -Infinity;
12901307}
1291130812921309/**