# 0.30000000000000004: Floating Point Math Examples

> 0.30000000000000004.com is a small educational site explaining why decimal arithmetic can produce results such as 0.30000000000000004. It presents the issue through a static website structure, with CSS as its primary language and GPL-3.0 licensing.

**erikwiffin/0.30000000000000004** — Floating Point Math Examples

- Repository: https://github.com/erikwiffin/0.30000000000000004
- Website: https://0.30000000000000004.com/
- Stars: 1,531 · Forks: 175
- Language: CSS
- License: GPL-3.0
- Published: 2026-10-16 · Updated: 2026-10-16 · Language: en
- Canonical page: https://hysenlabs.com/projects/erikwiffin-0-30000000000000004

## What 0.30000000000000004.com Explains

This project addresses a specific source of confusion in programming: a calculation that looks wrong in a programming language but reflects the way computers represent decimal values. Its central example is `0.1 + 0.2 != 0.3`, with the familiar unexpected result `0.30000000000000004` providing the site's name. The intended reader is a programmer, student, or technically curious person who has encountered a surprising comparison involving decimal numbers.

The project does not present itself as a general mathematics package or a debugging service. Based on the repository layout, it is a website with Markdown content, includes, layouts, posts, a configuration file, and a `styles.css` file. The README describes examples of sending `.1 + .2` to standard output in several languages. That makes the repository useful as an educational collection of demonstrations rather than as code intended to become a dependency in another program.

The name is also a teaching device. It points directly to a result that many developers see when a value is printed after ordinary binary floating point arithmetic. The project treats that result as a window into representation, not as evidence that the language's addition operation failed. Its value comes from explaining the boundary between human decimal notation and computer storage.

## The Binary Representation Behind the Result

The README's explanation begins with the representational limits of decimal and binary systems. In base 10, the prime factors of the base are 2 and 5. Fractions whose denominators contain only those factors can be represented cleanly, while denominators containing 3 or 7 produce repeating decimals. Binary has a different limitation because its only prime factor is 2. Fractions such as `1/2`, `1/4`, and `1/8` can be represented exactly in binary, but `1/5` and `1/10` cannot.

The decimal values `0.1` and `0.2` correspond to `1/10` and `1/5`. They are terminating decimals in base 10, yet they become repeating representations in base 2. When a computer performs addition on those stored binary approximations, the result contains a remainder that becomes visible when the value is printed in a human-readable base-10 form. The site's example therefore concerns representation and conversion, not a broken implementation of the addition operation.

This explanation is useful because it separates arithmetic from display. The unexpected number is produced before a language formats a value for output. The README says that examples send `.1 + .2` to standard output in a variety of languages, but it does not claim that every language behaves identically or that every numeric type uses the same representation. The project therefore explains a common class of behavior, not a universal output contract.

## A Static Educational Repository

The repository layout indicates that the project is published as a small site rather than as an installable library. Its root contains `.htaccess`, `CNAME`, `Gemfile`, `Gemfile.lock`, `_config.yml`, `_includes`, `_layouts`, `_posts`, `styles.css`, `index.md`, and `README.md`. Those files point to a web publishing structure, with content and presentation separated into Markdown, configuration, templates, and CSS. The homepage listed for the project is `https://0.30000000000000004.com/`.

The repository description names CSS as the primary language, while the repository also includes Markdown content and GitHub-oriented project files. That combination supports a simple educational website with a stylesheet and multiple content pages or posts. The README does not document a public API, command-line interface, software architecture diagram, or programmatic integration layer. It also does not specify a build pipeline beyond the presence of the site files.

The absence of a documented API matters for adoption. A reader can visit the homepage or inspect the repository content, but the README does not provide an importable package interface. The project should therefore be judged as explanatory content with examples, not as a runtime component that can be added to an application. Its dependencies and deployment process are not explained in the README, so those details cannot be assumed from the presence of `Gemfile` or `Gemfile.lock`.

## Opening the Site and Reading the First Example

The README does not provide documented installation commands, a setup script, a container configuration, or a command-line example. It directs readers to `0.30000000000000004.com`, so the supported first use described by the project is to open that site. No installation block is included because the README states no exact local installation steps.

A first visit should begin with the site's floating point explanation and its examples that print `.1 + .2` in different languages. The reader should look for the distinction between a mathematically familiar decimal expression and the binary representation used by the demonstrating language. The README is the source for the explanation, while the homepage is the public destination linked by it.

If someone wants to study the examples locally, the repository files are available for inspection, but the README does not specify a local hosting procedure or a verified server command. It would be incorrect to invent a Ruby, GitHub Pages, or Jekyll command based only on filenames. The documented first step is navigation to the site, followed by reading its explanation and examples. The site itself is the deliverable here, not an executable package.

## Why the Result Is Not a Universal Fix

The main limitation is scope. The project explains why floating point arithmetic can produce a result such as `0.30000000000000004`, but the README does not document a method for controlling rounding, selecting a decimal type, performing arbitrary-precision arithmetic, or correcting an application's comparison logic. Those are different concerns, and the project does not claim to supply them.

The examples should not be treated as a universal rule for all numeric operations. The README refers to a variety of languages, but it does not enumerate them or document each language's numeric type, formatting behavior, or standard library. It also does not explain whether output formatting, precision limits, or implementation details affect a given result. The supported interpretation is limited to the representation problem described in the README.

For an engineer, this is the wrong tool when the requirement is exact decimal money handling, reproducible high-precision calculations, or application-specific rounding policy. Those needs require a solution selected for the language and domain. The site can explain the underlying reason for a mismatch, but it cannot replace that implementation decision. A developer should not cite the site's value as evidence that an application must always use floating point or that every precision problem has the same cause.

## GPL-3.0 Reuse and Maintenance Cost

The repository lists the `GPL-3.0` license. That identifies the license declared for the project, but this article does not interpret its legal requirements or provide legal advice. Anyone planning to copy substantial content, modify the site, or redistribute repository files should review the license text and determine how the terms apply to the intended use.

The repository is not archived, and its last push was on 2026-05-19. That date indicates recent repository activity for maintenance planning, but the project has no GitHub releases, so there is no documented release train or upgrade path. The upgrade cost for a deployed site also depends on its hosting and content workflow, neither of which is documented in the README. The repository's static layout keeps the visible content small, but it does not establish how deployments are performed or how updates are rolled back.

For engineers, the practical maintenance question is content and hosting ownership rather than API compatibility. The README documents no package version, dependency update procedure, migration guide, or compatibility matrix. Verify the license and hosting method before treating the repository as an internal asset. The last push date is evidence of repository activity, not evidence that the hosted site has a guaranteed deployment schedule.

## Direct Numeric-Type Documentation as an Alternative

A real alternative is to use the language implementation's own numeric-type documentation instead of relying on this standalone explanatory site. The two approaches differ in purpose. This project gives a direct, cross-language explanation of why decimal fractions can be inaccurate in binary, while language documentation describes the numeric types, precision, formatting, and conversion rules provided by that particular implementation.

For a reader who only needs to understand `0.1 + 0.2`, the site offers a shorter conceptual explanation. For an engineer choosing between floating point and decimal arithmetic in a specific program, the language documentation is the more relevant source because it can identify available types and their stated behavior. This repository does not document those language-specific choices, so it should not be presented as a replacement for them.

The comparison also clarifies where to use this project. It fits a README link, introductory lesson, or internal explanation of an unexpected result. It does not fit a production dependency, a rounding policy document, or a cross-language compatibility matrix. Keep that boundary in mind when deciding whether the repository is useful to your team.

## Conclusion

Adopt this project as a compact reference or teaching aid for developers who need a plain-language explanation of binary floating point, not as a numerical library, debugging tool, or replacement for application-level decimal handling. Review the site's published examples and its GPL-3.0 licensing terms before reusing repository content, then verify whether your language needs an arbitrary-precision or decimal-specific approach.

## FAQ

### Why does 0.1 + 0.2 sometimes display as 0.30000000000000004?

The README explains that 0.1 and 0.2 cannot be represented exactly in binary because their decimal denominators use factors other than 2. Addition leaves a binary approximation that becomes visible when the result is converted to a base-10 display.

### Is 0.30000000000000004.com a programming library?

No. The repository is described as floating point math examples and is laid out as a website, with Markdown files, layouts, configuration, and CSS. The README does not document an installable library API.

### How do I use 0.30000000000000004.com locally?

The README does not document local installation or hosting commands. It links readers to `http://0.30000000000000004.com/`, which is the documented place to view the examples.

## Sources

- [erikwiffin/0.30000000000000004 on GitHub](https://github.com/erikwiffin/0.30000000000000004)
- [Issues](https://github.com/erikwiffin/0.30000000000000004/issues)
- [License: GPL-3.0](https://github.com/erikwiffin/0.30000000000000004/blob/master/LICENSE)
- [Project website](https://0.30000000000000004.com/)
- [README](https://github.com/erikwiffin/0.30000000000000004/blob/master/README.md)

---

Hysen Labs editorial analysis, written from the project's own repository and release notes. Cite the canonical page: https://hysenlabs.com/projects/erikwiffin-0-30000000000000004
