# Math Calculations

**URL:** <https://forum.dynamobim.com/t/math-calculations/112887>\
**Category:** Uncategorized\
**Created:** [October 30, 2025, 2:20pm UTC](https://forum.dynamobim.com/t/math-calculations/112887 "2025-10-30T14:20:51Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![UBDesign](https://avatars.discourse-cdn.com/v4/letter/u/cc9497/32.png) [@UBDesign](https://forum.dynamobim.com/u/UBDesign)\
**Post date:** [October 30, 2025, 2:20pm UTC](https://forum.dynamobim.com/t/math-calculations/112887/1 "2025-10-30T14:20:51Z")

</div>

I’m not sure if there is a setting that I have changed or need to change, but does anyone have any insight as to why my math equations are not only listing all of these decimal places, but also being off by 0.0000000000001? (or how ever many zeros)

 ![Screenshot 2025-10-30 062313](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/6/4/642b04055932c9b23dc4388d770401ee623d4343.png)

---

<div class="post-metadata">

**Author:** ![bvs1982](https://avatars.discourse-cdn.com/v4/letter/b/43a26b/32.png) [@bvs1982](https://forum.dynamobim.com/u/bvs1982)\
**Post date:** [October 30, 2025, 2:35pm UTC](https://forum.dynamobim.com/t/math-calculations/112887/2 "2025-10-30T14:35:01Z")

</div>

![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/5/6/56d668c3d4d326e81ab4fa397f7bcad3417934f8.png)

---

<div class="post-metadata">

**Author:** ![zachri.jensen](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/zachri.jensen/32/205331_2.png) [@zachri.jensen](https://forum.dynamobim.com/u/zachri.jensen)\
**Post date:** [October 30, 2025, 2:35pm UTC](https://forum.dynamobim.com/t/math-calculations/112887/3 "2025-10-30T14:35:38Z")

</div>

Welcome to floating-point math 🙂

> [@Wrong calculation lot's of digits](https://forum.dynamobim.com/t/wrong-calculation-lots-of-digits/64833):
>
> Hi all, I got a question. why does dynamo sometime calculate wrong. look at this example in thw last code block on index [7] the calculated number is wrong. how can i prevent dynamo in this. because later on in one of my processes i have to use list.containsitem with a different list which has the correct number of -0.08 in it but the answer wil be false due to the wrong number. hope someone can explain/solve this for me? this is my file: [Why these digits 0\_01.dyn](https://forum.dynamobim.com/uploads/short-url/bqh7Hj9t9EAW6IMZgp8Ty2Kcjo3.dyn) (3.2…

---

<div class="post-metadata">

**Author:** ![jacob.small](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jacob.small/32/161030_2.png) [@jacob.small](https://forum.dynamobim.com/u/jacob.small)\
**Post date:** [October 30, 2025, 2:35pm UTC](https://forum.dynamobim.com/t/math-calculations/112887/4 "2025-10-30T14:35:58Z")

</div>

This is a floating point error.

Any time you program math on a computer you need to account for these as the programmer. This includes even stuff like using Excel. As an example, start a new Excel file and enter the following values in cells A1:A3:

```
10.1  
-10
-0.1

```

Then in cell A4 type the formula `=SUM(A1:A3)`. The result will likely be similar to this:

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/d/4/d4990be3498eb1dc4fcc6520646cc5b60415a48f.png)

Floating point occurs as computers can only us the numbers 1 and 0 to do anything, including math. As such values like 0.1 get rounded off to something near enough for any functional work (remember there are 16 zeros before that -3). There are a lot of resources on the topic of floating point math that you can use to learn more, but the ‘quick’ answer as as the graph author you need to account for this, usually by rounding to something like 6 decimals (or whatever accuracy suits the task).

PS: The video in this thread is likely worth a quick watch for more entertaining view on the topic: [Appearing Decimals while filtering the Line Curve Lengths How To Avoid This error? - #2 by jacob.small](https://forum.dynamobim.com/t/appearing-decimals-while-filtering-the-line-curve-lengths-how-to-avoid-this-error/98275/2)
