gitwtfhub

wtf is floating-point-gui.de?

gaearon/floating-point-gui.de — explained in plain English

Analysis updated 2026-07-17 · repo last pushed 2020-01-23

2Audience · developerComplexity · 1/5DormantLicenseSetup · easy

TL;DR

An educational static website explaining why floating-point math gives surprising results like 0.1+0.2=0.30000000000000004, and how to handle it.

Mindmap

mindmap
  root((repo))
    What it does
      Explains float quirks
      Quick answers
      Deep dive material
    Tech stack
      nanoc
      Static HTML
    Use cases
      Debug rounding errors
      Choose a number type
      Learn binary decimals
    Audience
      Beginner coders
      Intermediate coders
    Details
      Static site generator
      Creative Commons license

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Why would anyone build with this?

REASON 1

Look up why a calculation like 0.1 + 0.2 doesn't equal exactly 0.3 in your code.

REASON 2

Read the deeper material to understand how computers store decimals in binary.

REASON 3

Decide whether floating-point, fixed-point, or decimal representation fits your use case.

What's in the stack?

nanoc

How it stacks up

gaearon/floating-point-gui.de0-bingwu-0/live-interpreter0xkaz/llm-governance-dashboard
Stars222
LanguagePythonPython
Last pushed2020-01-23
MaintenanceDormant
Setup difficultyeasymoderatehard
Complexity1/52/54/5
Audiencedevelopergeneralops devops

Figures from each repo's GitHub metadata at analysis time.

How do you spin it up?

Difficulty · easy Time to first run · 5min

Built with nanoc and published under a Creative Commons license.

Yoink these prompts

Prompt 1
Explain why my code produced 0.30000000000000004 instead of 0.3 and how floating-point storage causes it.
Prompt 2
Help me decide whether to use floating-point or a decimal type for a financial calculation in my app.
Prompt 3
Show me a simple way to safely compare floating-point numbers for equality in my code.

Frequently asked questions

wtf is floating-point-gui.de?

An educational static website explaining why floating-point math gives surprising results like 0.1+0.2=0.30000000000000004, and how to handle it.

Is floating-point-gui.de actively maintained?

Dormant — no commits in 2+ years (last push 2020-01-23).

How hard is floating-point-gui.de to set up?

Setup difficulty is rated easy, with roughly 5min to a first successful run.

Who is floating-point-gui.de for?

Mainly developer.

View the repo → Decode another repo

This repo across BitVibe Labs

Don't trust strangers blindly. Verify against the repo.