npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

fp-conv-cli

v1.0.2

Published

Cross-platform command-line tool for floating-point conversions. Encode, decode, and convert numbers across FP32, FP16, BF16, TF32, FP8, FP6, FP4, and integer formats, with binary/hex breakdowns and precision-loss analysis.

Readme

fp-conv-cli

npm

Cross-platform command-line tool for floating-point conversions. Encode, decode, and convert numbers across FP32, FP16, BF16, TF32, FP8, FP6, FP4, and integer formats, with binary/hex breakdowns and precision-loss analysis.

The installed command is fp-conv. It reuses the same JavaScript conversion engine that powers the fp-conv web app and the fp-conv MCP server, so results are identical across all three.

Runs anywhere Node.js 18+ runs: Windows, macOS, and Linux.

Installation

npm install -g fp-conv-cli

Or run without installing:

npx fp-conv-cli encode 3.14 --format fp32

Usage

fp-conv <command> [options]

Commands

| Command | Description | | ----------------- | ------------------------------------------------------ | | encode <value> | Encode a decimal/keyword value into a format. | | decode <bits> | Decode a binary or hex bit-pattern in a format. | | convert <value> | Convert a value from one format to another. | | info <format> | Show range, bias, and special-value details. | | list | List all available preset formats. |

Options

| Option | Description | | ---------------------- | --------------------------------------------------------------------------- | | -f, --format <fmt> | Format preset key (e.g. fp32, int8) or a JSON object for a custom format. | | --from <fmt> | Source format for convert. | | --to <fmt> | Target format for convert. | | -r, --rounding <m> | tiesToEven (default), tiesToAway, towardZero, towardPositive, towardNegative. | | --json | Emit machine-readable JSON instead of formatted text. | | -h, --help | Show help. | | -v, --version | Show version. |

Values accept a number, hex (e.g. 0xFF), or keyword (infinity, -infinity, nan). Bit-patterns accept a binary string (e.g. 0100000) or hex (e.g. 0x40).

Examples

# Encode a decimal into FP32
fp-conv encode 3.14 --format fp32

# Negative values work directly; use `--` if a value is mistaken for an option
fp-conv encode -1.5 --format fp16
fp-conv encode --format fp16 -- -1.5

# Decode a hex bit-pattern as FP16
fp-conv decode 0x4048 --format fp16

# Convert between formats and see precision loss
fp-conv convert 3.14 --from fp32 --to fp16

# Inspect a format's range and special-value support
fp-conv info bf16

# List every supported format
fp-conv list

# Use a custom floating-point format
fp-conv encode 1.5 --format '{"signBits":1,"exponentBits":8,"mantissaBits":7}'

# Machine-readable output for scripting
fp-conv convert 3.14 --from fp32 --to fp16 --json

Development

This package lives in the fp-conv repository as an npm workspace. The published bundle (dist/index.js) inlines the shared conversion engine (lib/floating-point.js) and tool definitions (src/webmcp.js) from the repo root via esbuild, keeping a single source of truth and no runtime dependencies.

npm install                         # from the repo root
npm run build --workspace fp-conv-cli
npm test  --workspace fp-conv-cli

License

MIT © Spencer Williams