Skip to content
generated from donno2048/nothingness

A library for Python for fast math on floats

License

Notifications You must be signed in to change notification settings

donno2048/fmath

Repository files navigation

fmath

A library for Python for fast math on floats.

See the demo for Windows and the demo for Linux.

Installation

From PyPI

pip3 install fmath

From GitHub

pip3 install git+https://github.com/donno2048/fmath

Usage

Just replace

from math import sqrt, log2
pow = pow
abs = abs
min = min
max = max
sign = lambda x: x >= 0

with

from fmath import sqrt, pow, abs, sign, log2, min, max

and make sure the input is float