# Strange nan errors when mutating immutable struct arrays

**URL:** <https://discourse.julialang.org/t/strange-nan-errors-when-mutating-immutable-struct-arrays/69084>\
**Category:** New to Julia\
**Tags:** mutable-structure\
**Created:** [October 2, 2021, 2:46am UTC](https://discourse.julialang.org/t/strange-nan-errors-when-mutating-immutable-struct-arrays/69084 "2021-10-02T02:46:51Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![Sukera](https://avatars.discourse-cdn.com/v4/letter/s/ce7236/32.png) [@Sukera](https://discourse.julialang.org/u/Sukera)\
**Post date:** [October 2, 2021, 9:55am UTC](https://discourse.julialang.org/t/strange-nan-errors-when-mutating-immutable-struct-arrays/69084/3 "2021-10-02T09:55:55Z")

</div>

Can you post the lines of code you’re showing as text instead of a screenshot? Would make it easier to debug. Also, having a small example that shows the problem would be helpful for debugging (i.e. a small reproducible example, see [here](https://discourse.julialang.org/t/please-read-make-it-easier-to-help-you/14757)).

Are you perhaps running with `--fast-math` (which can change floating point results depending on the exact code that’s run - such as using a broadcasted assignment loop vs. not using one)?

---

_[View the full topic](https://discourse.julialang.org/t/strange-nan-errors-when-mutating-immutable-struct-arrays/69084)._
