Skip to content
ArbitraryPrecisionFloat - a library for performing floating point calculations with arbitrary precision in Smalltalk
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
Dolphin Float negativeZero has been added to Dolphin 7, don't override it. Feb 5, 2017
.gitattributes Help linguist recognizing Smalltalk Nov 20, 2017
LICENSE Create LICENSE file Nov 20, 2017 Restore link to InspirationSources Aug 11, 2015

This project was automatically exported from

ArbitraryPrecisionFloat is a new Smalltalk Number subclass that can perform arithmetic operations, and evaluate the principal mathematical functions.

Computations are performed with inexact arithmetic like other Floating point numbers. However, the precision of representation is programmable, and the arithmetic operations evaluations are accurate to 1/2 unit of least precision (ulp).

For elementary mathematical functions, the precision is of 1 ulp with faithfully rounded results, but a long term goal would be to achieve i1/2 ulp - a.k.a. exactly rounded function evaluation.

ArbitraryPrecisionFloat is able of mixed arithmetic operations like the other Number subclasses. A conversion to the most accurate inexact number class will occur in this case.

Other requirements are listed here and are (or should be) implemented in ArbitraryPrecisionFloatTests. A quick introduction on how to use the library is explained here.

ArbitraryPrecisionFloat implementation relies on LargeInteger arithmetic that exists on most Smalltalk dialects. The design and implementation will be detailed in the wiki.

ArbitraryPrecisionFloat has been implemented in Cincom Visualworks, Squeak/Pharo and Dolphin dialects, but port to other dialects shall not be too hard. You can contact the author if help is required for such a port.

Except for Dolphin, code is not directly hosted on github, but rather in dialect specific source code repositories. Also note that a fork of ArbitraryPrecisionFloat has been integrated in the SciSmalltalk project. An effort will be made to sync further developments with this project.

For links to reference work in the domain, and sources of inspiration of this library, please visit InspirationSources.

ArbitraryPrecisionFloat is licensed under MIT. See :

You can’t perform that action at this time.