f256: A Go library, built on math/big.Float, for precision crypto-currency ledger calculations, using a 42:214 fixed-precision representation

85d27fc Update language version and dependencies

~trn pushed to ~trn/fl256 git

3 days ago

cbbe9a9 Merge pull request #6 from johnsonjh/Fix-codebeat

~trn pushed to ~trn/fl256 git

8 days ago


#A high-precision fixed-point numeric representation library for Go

GRC License-fl256 License-OX153MkI CodebeatBadge Maintainability


fl256 implements a high-precision fixed-point numeric type for Go. It may be useful in certain domain-specific mathematical contexts.


NOTE: This library is built on big.Float. As such, it does not implement end-to-end fixed-point calculations, and is not using BCD or other native decimal types. It was originally intended for use in a crypto-currency ledger system, with specific constraints: a currency with a maximum supply of 4,398,046,511,103, represented with an unsigned fixed-point 42.214 256-bit interchange format, and is not intended for general purpose decimal calculations or accounting applications.


Potential users must fully understand the implications and limitations of this implementation, and evaluate the appropriateness for any application or use case.

There are many mature alternatives that exist for performing financial calculations using fixed-point operations for general use, such as:

Please follow all best practices and industry norms. You must exercise due diligence when selecting any high precision math library for use.


#Original Author

  • Loki 'l0k18' Verloren <stalker.loki@protonmail.ch>

    • "Loki" is the original author of the float256 library, from which fl256 was derived. The float256 source code was released into the public domain, by way of the Unlicense public domain declaration/dedication/license, which allowed the fl256 library to be created and released under the current licensing scheme.

    • As an official policy, if any bugs are found that affect both the fl256 and float256 projects, the appropriate patches will adapted for inclusion in the float256 project, released into the public domain (by way of the Unlicense declaration/dedication/license), and provided to the float256 authors. This policy will remain active as long as the float256 project continues to release their source code into the public domain, either by way of the Unlicense, or by any other analogous public domain declaration, dedication, or license, provided that such declaration, dedication, or license fully and completely disclaims all copyright monopoly interest which may be assigned automatically, or otherwise made available to the float256 authors by way of local legislation, international law, treaty, convention, or agreement, with equivalent force and effect of the Unlicense, such as the CC0 1.0 Universal Public Domain Dedication or the WTFPL2.


fl256 is distributed as uniquely multi-licensed software.

This package is dual-licensed, and made available under both a traditional open-source license, as well as a restricted-use, non-free, proprietary license.

  • The fl256 License is an Open Source software license. It is fully compatible with The X.Org Preferred License, which is a minor variant of The MIT License. The fl256 License verbiage is identical to that of The X.Org Preferred License, differentiated only by changes in punctuation and spacing.

  • The Oxford 153 Entitlement: Mark I, or, informally, "the OX153MkI", is a new, unique, non-free, and strongly proprietary software license. While the author strongly encourages all eligible users to accept the Terms and Conditions of the OX153MkI, it is by no means a requirement - anyone who will not (or can not) be bound by the terms set forth in the OX153MkI may fork the repository, and simply remove all references to the OX153MkI. In this case, you are bound ONLY by the terms of the The fl256 License license. While it is recommended that the new projects are renamed, to avoid any user confusion, the creation of derivative works bear no actual moral or legal requirements or contractual stipulations that could force the renaming or re-branding of derivative works.


Anyone who wishes to contribute code (or documentation) to fl256, furthermore, ("the Tool"), will be required to digitally sign, using either PGP/GnuPG or opmsg, the "fl256 CLA/CTA/LO". This is a combination documentation that consists of a Contributor License Agreement, Copyright Transfer Assignment, and Loyalty Oath. Because of the restrictive Terms and Conditions of The Oxford 153 Entitlement: Mark I, every contributor, no matter how small their contribution, must provide the fl256 authors a digitally signed copy of the "fl256 CLA/CTA/LO" document, without exception. Anyone who cannot consent to the complete terms of the "fl256 CLA/CTA/LO" can NOT contribute to the project.

The Contributor License Agreement, Copyright Transfer Assignment, and Loyalty Oath document is intended to ensure, in perpetuity, the absolute integrity of all tools distributed under the OX153MkI. As such, this document is a non-negotiable, eternally binding legal instrument, which the contributor grants the "the fl256 authors" a perpetual, world- and universe-wide, non-exclusive, free-of-charge, zero-royalty, forever irrevocable, persistent, immutable, absolute, unalterable, and completely unlimited-in-scope license to their contribution, as well as full release and transfer of copyright assignment and ownership. This allows "the fl256 authors" to reproduce, redistribute, sub-license, re-license, or otherwise control entirely the contribution, including, but not limited to, any works which may be later derived from the contribution. The document also includes a very specific Loyalty Oath, intended to authoritatively finalize complete total acceptance of, and assure eternal adherence to, the principles and values embodied by the The Oxford 153 Entitlement: Mark I.

A complete copy of "fl256 CLA/CTA/LO" will be furnished upon request to any potential contributors. We encourage all potential contributors to read and completely understand the "fl256 CLA/CTA/LO". It further recommended that any would-be contributors seek guidance from qualified and licensed legal council, preferably well-versed in U.S. Contract Law. Seeking formal assistance should be the first step if any questions arise during the reading of the "fl256 CLA/CTA/LO" documents. Unfortunately, "the fl256 authors" can not (and will not) answer any inquiries regarding the contents of the "fl256 CLA/CTA/LO" documents.