dragonbox
brew install dragonbox
v1.1.3
BSL-1.0 OR (Apache-2.0 WITH LLVM-exception)
Reference implementation of Dragonbox in C++
8
30-day installs · #9236
23
90-day · #9423
91
365-day · #9423
811
★ GitHub stars · updated 10mo ago
Build dependencies
Links
- https://github.com/jk-jeon/dragonbox
- GitHub: jk-jeon/dragonbox
- Brew formula source: Formula/d/dragonbox.rb
Raw metadata
{
"aliases": [],
"alternatives": [],
"build_dependencies": [
"cmake"
],
"categories": [],
"caveats": null,
"conflicts_with": [],
"dependencies": [],
"deprecated": 0,
"deprecation_reason": null,
"desc": "Reference implementation of Dragonbox in C++",
"disable_reason": null,
"disabled": 0,
"enrichment_fetched_at": "2026-06-20T23:37:07+00:00",
"first_seen": "2026-06-20T23:34:18+00:00",
"full_name": "dragonbox",
"github_default_branch": "master",
"github_last_commit_at": "2025-10-03T21:31:58Z",
"github_readme_excerpt": "# Dragonbox\nThis library is a reference implementation of [Dragonbox](other_files/Dragonbox.pdf) in C++.\n\nDragonbox is a float-to-string conversion algorithm based on a beautiful algorithm [Schubfach](https://drive.google.com/file/d/1IEeATSVnEE6TkrHlCYNY2GjaraBjOT4f/edit), developed by Raffaello Giulietti in 2017-2018. Dragonbox is further inspired by [Grisu](https://www.cs.tufts.edu/~nr/cs257/archive/florian-loitsch/printf.pdf) and [Grisu-Exact](https://github.com/jk-jeon/Grisu-Exact).\n\n# Introduction\nDragonbox generates a pair of integers from a floating-point number: the decimal significand and the decimal exponent of the input floating-point number. These integers can then be used for string generation of decimal representation of the input floating-point number, the procedure commonly called ````ftoa```` or ````dtoa````.\n\nThe algorithm guarantees three things:\n\n1) It has the roundtrip guarantee; that is, a correct parser interprets the generated output string as the original input floating-point number. (See [here](https://github.com/jk-jeon/dragonbox/blob/master/README.md#precise-meaning-of-roundtrip-gurantee) for some explanation on this.)\n\n2) The output is of the shortest length; that is, no other output strings that are interpreted as the input number can contain less number of significand digits than the output of Dragonbox.\n\n3) The output is correctly rounded: the number generated by Dragonbox is the closest to the actual value of the input number among possible outputs of minimum number of digits.\n\n# About the Name \"Dragonbox\"\nThe core idea of Schubfach, which Dragonbox is based on, is a continuous analogue of discrete [pigeonhole principle](https://en.wikipedia.org/wiki/Pigeonhole_principle). The name *Schubfach* is coming from the German name of the pigeonhole principle, *Schubfachprinzip*, meaning \"drawer principle\". Since another name of the pigeonhole principle is *Dirichlet\u0027s box principle*, I decided to call my algorithm \"Dragonbox\" to honor its o",
"github_repo": "jk-jeon/dragonbox",
"github_stars": 811,
"github_topics": [],
"homepage": "https://github.com/jk-jeon/dragonbox",
"homepage_og_description": null,
"homepage_og_image": null,
"homepage_title": null,
"installs_30d": 8,
"installs_365d": 91,
"installs_90d": 23,
"keg_only": 0,
"keg_only_reason": null,
"last_seen": "2026-06-20T23:34:18+00:00",
"license": "BSL-1.0 OR (Apache-2.0 WITH LLVM-exception)",
"llm_generated_at": null,
"llm_model": null,
"name": "dragonbox",
"oldnames": [],
"one_liner": null,
"optional_dependencies": [],
"rank_30d": 9236,
"rank_365d": 9423,
"rank_90d": 9423,
"raw_hash": "7651d6e46d2734fd",
"recommended_dependencies": [],
"revision": 0,
"ruby_source_path": "Formula/d/dragonbox.rb",
"tap": "homebrew/core",
"test_dependencies": [
"cmake"
],
"uses_from_macos": [],
"version_head": "HEAD",
"version_stable": "1.1.3",
"versioned_formulae": [],
"why_use_this": null
}