0.1.2 • Published 5 years ago

q-exact v0.1.2

Weekly downloads
5
License
ISC
Repository
github
Last release
5 years ago

Q-exact

A library to make exact calculations with rational numbers without rounding errors.

Compare this:

1 / 49 * 49 ▶ 0.9999999999999999

with this:

Q(1).over(49).times(49) ▶ 1

Q-exact overcomes some of the classic limitations of floating-point arithmetic by requiring that all results be expressed exactly, or not at all. Rational numbers in Q-exact are stored as products of prime factors. For example, -75/28 is represented as -2-2⋅3⋅52⋅7-1. There is no way to represent irrational numbers, Infinity or NaN.

See the Q Class Reference for further informations.

This is a preliminary documentation and may be subject to change at any time.

0.1.2

5 years ago

0.1.2-alpha.1

9 years ago

0.1.1

9 years ago

0.1.0

9 years ago

0.0.0

9 years ago