Skip to content

fp-conv-cli 1.1.0

Latest

Choose a tag to compare

@sw23 sw23 released this 22 Aug 23:42
· 5 commits to main since this release
4df0f94

Correctness fixes from #58. Published to npm as fp-conv-cli@1.1.0.

Fixed

  • encode() now rounds instead of truncating for zero-mantissa formats (previously up to 2x error)
  • unsigned formats no longer emit a sign bit for -Infinity, which produced an encoding that could not be decoded
  • NaN and Infinity no longer share an encoding when mantissaBits === 0
  • directed rounding no longer flushes tiny nonzero values to zero, which violated IEEE 754
  • unknown rounding modes are now rejected consistently, rather than only for inexact values

Changed

  • nonzero fixed-point results now report isNormal: true, matching classify()
  • invalid rounding modes that were silently accepted for exact, zero and special values now throw

Full changelog: cli-v1.0.2...cli-v1.1.0