---
title: "Discussion on \"Why 0.1+0.2 !== 0.3 in JavaScript?\" | Hashnode"
description: "Discussion on \"Why 0.1+0.2 !== 0.3 in JavaScript?\". Not just that, but why is 0.1*0.1 = 0.010000000000000002 and not 0.01? Why is 1.1-1.0 = 0.10000000000000009 and not 0.1?"
url: "https://hashnode.com/posts/why-float-doesnt-work-properly-in-js/64328cfe0d37d3ae65bffc15"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Why 0.1+0.2 !== 0.3 in JavaScript?](https://rishabhsinghcodes.hashnode.dev/why-float-doesnt-work-properly-in-js?utm_source=hashnode&utm_medium=feed)

Not just that, but why is 0.1\*0.1 = 0.010000000000000002 and not 0.01? Why is 1.1-1.0 = 0.10000000000000009 and not 0.1?

Apr 9, 2023 · 3 min read · rishabhsinghcodes.hashnode.dev  
Updated Oct 20, 2023  
Read the article

-   [#javascript](https://hashnode.com/tag/javascript)
-   [#floating-point-arithmetic](https://hashnode.com/tag/floating-point-arithmetic)
-   [#error-handling](https://hashnode.com/tag/error-handling)
-   [#binary](https://hashnode.com/tag/binary)
-   [#binary64](https://hashnode.com/tag/binary64)

## Written by

[Rishabh Singh](https://hashnode.com/@rishabhsinghcodes)

@rishabhsinghcodes

  
[View profile](https://hashnode.com/@rishabhsinghcodes)

Full Stack Developer

Full Stack Developer

## Responses 1

Markdown supported · ⌘↵ to post

[KOUNDINYA VALMIKAM](https://hashnode.com/@koundinya08)

[Apr 10, 2023](https://hashnode.com/posts/why-float-doesnt-work-properly-in-js/64328cfe0d37d3ae65bffc15/comment/6433ea2c94d1164842d9edd4)

Very useful. Keep Writing🔥
