# LibBF Library

## News

## Introduction

LibBF is a small library to handle arbitrary precision floating point
numbers. Its compiled size is about 16 KB of x86 code and has no
dependency on other libraries. It is not the fastest library nor the
smaller but it tries to be simple while using asymptotically optimal
algorithms. All the implemented operations have a near linear running
time.

The TinyPI example computes billions of digits of Pi using the
Chudnovsky formula.

Features:
- Arbitrary precision floating point numbers in base 2^b (b=64 or 32).
- basic operations: addition, subtraction, multiplication, division,
inverse square root.
- Multiplication using a SIMD optimized Number Theoretic Transform.
- Efficient base 10 conversion.
- MIT license.

## Download

Source code: libbf-2017-03-08.tar.gz.

Windows executables of TinyPI: tinypi-2017-03-08-win.zip.

TinyPI is also included in the RISCVEMU Javascript demo

## Related projects

Arbitrary precision floating point libraries:
Other small open source programs to compute large number of digits of PI:
Larger and faster programs to compute PI:
## Licensing

It is released under the MIT license.

Fabrice Bellard - http://bellard.org/