Skip to content

fp-conv-cli 1.5.0

Choose a tag to compare

@sw23 sw23 released this 22 Oct 04:22
· 3 commits to main since this release
e99a4e3

Package-facing changes from #80. Published to npm as fp-conv-cli@1.5.0.

Added

  • convert --nan <m>: canonical (default, the target's quiet NaN, unchanged from before) or preserve (keep the sign where the target has a sign bit, keep as many high-order payload bits as fit, and quiet the result, as IEEE 754-2019 §6.2.3 and x86/AArch64 conversions do). Targets without a NaN encoding are unaffected. See docs/nan-behavior.md
  • convert --bits <pattern>: the source as a bit pattern in the input format, binary or hex, in place of <value>. This is how an exact encoding such as a NaN with a payload reaches a conversion: fp-conv convert --bits 0xFFC00000 --from fp32 --to fp16 --nan preserve prints 0xFE00

Changed

  • convert takes <value> or --bits, not both; giving both, or neither, is a usage error. A hex <value> is still a number (0xFF is 255)
  • info notes on its NaN input line, for a format that has a NaN, that convert --nan preserve keeps what fits of its sign and payload

Full changelog: cli-v1.4.0...cli-v1.5.0