---
title: "Discussion on \"Code Smell 71 - Magic Floats Disguised as Decimals\" | Hashnode"
description: "Discussion on \"Code Smell 71 - Magic Floats Disguised as Decimals\". JavaScript magic castings and wrong representations of decimal to floats yields a lot of programming errors"
url: "https://hashnode.com/posts/code-smell-71-magic-floats-disguised-as-decimals/60ab171920d1f45ceb7f091b"
---

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

Discussion

# [Code Smell 71 - Magic Floats Disguised as Decimals](https://maximilianocontieri.com/code-smell-71-magic-floats-disguised-as-decimals?utm_source=hashnode&utm_medium=feed)

JavaScript magic castings and wrong representations of decimal to floats yields a lot of programming errors

May 24, 2021 · 2 min read · maximilianocontieri.com  
Updated Dec 26, 2022  
Read the article

-   [#code-smell-1](https://hashnode.com/tag/code-smell-1)
-   [#2articles1week](https://hashnode.com/tag/2articles1week)
-   [#clean-code](https://hashnode.com/tag/clean-code)
-   [#programming](https://hashnode.com/tag/programming)
-   [#javascript](https://hashnode.com/tag/javascript)

## Written by

[Maxi Contieri](https://hashnode.com/@mcsee)

@mcsee · Buenos Aires

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

Software Engineer

I’m a senior software engineer loving clean code, and declarative designs. S.O.L.I.D. and agile methodologies fan.

## Responses 1

Markdown supported · ⌘↵ to post

[Pankaj Tanwar](https://hashnode.com/@pankajtanwar)

[May 25, 2021](https://hashnode.com/posts/code-smell-71-magic-floats-disguised-as-decimals/60ab171920d1f45ceb7f091b/comment/60ac994ff06aaf7b7c3e08d1)

Thanks for the mention [Maxi Contieri](https://hashnode.com/@mcsee). This series is so sick, in-depth and underrated. Keep up the good work. You earned a follower and a fan !!!
