The Right Way to Compare Floats in Python

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

InfluxDB - Power Real-Time Data Analytics at Scale
Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
www.influxdata.com
featured
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
  • NumPy

    The fundamental package for scientific computing with Python.

  • An explanation for the atol difference between numpy and math by the author of math.isclose():

    https://github.com/numpy/numpy/issues/10161#issuecomment-350...

    plus a ton of flogging/benchmarking common libraries (numpy, scipy, scikit-learn)

    and also this gem:

      import numpy as np

  • game-engine-2d

    Planimeter Game Engine 2D - LÖVE-based game engine for Lua

  • I remember having to write something similar for Lua, because there was no math.approximately() function and I was dealing with networking floats and comparing values over the wire to predicted movement in 2D space.

    https://github.com/Planimeter/grid-sdk/blob/master/engine/sh...

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
  • LogarithmicNumbers.jl

    A logarithmic number system for Julia.

  • DoubleFloats.jl

    math with more good bits

  • https://github.com/JuliaMath/DoubleFloats.jl

    Of course, if you are calling BLAS/LAPACK, you are constrained to use floats, but the recommendation on DoubleFloats is clear: if you know you algorithms, use the increased precision only in the parts that matter

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts

  • How to implement my own Vector2 class?

    2 projects | /r/pygame | 28 Feb 2021
  • Dot vs Matrix vs Element-wise multiplication in PyTorch

    2 projects | dev.to | 20 Mar 2024
  • NumPy 2.0.0 Beta1

    1 project | news.ycombinator.com | 18 Mar 2024
  • Element-wise vs Matrix vs Dot multiplication

    2 projects | dev.to | 14 Mar 2024
  • JSON dans les projets data science : Trucs & Astuces

    3 projects | dev.to | 7 Mar 2024