# Possible bug while calculating determinant?

**URL:** <https://discourse.julialang.org/t/possible-bug-while-calculating-determinant/35960>\
**Category:** Specific Domains\
**Tags:** linearalgebra\
**Created:** [March 14, 2020, 8:54am UTC](https://discourse.julialang.org/t/possible-bug-while-calculating-determinant/35960 "2020-03-14T08:54:38Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Post date:** [March 14, 2020, 9:15am UTC](https://discourse.julialang.org/t/possible-bug-while-calculating-determinant/35960/3 "2020-03-14T09:15:42Z")

</div>

Although (like @Sukera) I cannot replicate this using a recent Julia version, note that [floating point arithmetic has some special properties you should be aware of](https://discourse.julialang.org/t/psa-floating-point-arithmetic/8678).

If you are following along the calculations in a linear algebra text, you may want to convert to a type that is closed under the operations required for the determinant, eg

```julia
julia> det(Rational.(a))
0//1

```

(Incidentally, I would recommend [textbooks that place less emphasis on the determinant](http://linear.axler.net/)).

---

_[View the full topic](https://discourse.julialang.org/t/possible-bug-while-calculating-determinant/35960)._
