# Matrix multiplication precision issue

**URL:** https://discourse.julialang.org/t/matrix-multiplication-precision-issue/20172
**Category:** General Usage
**Created:** [January 28, 2019, 7:09am UTC](https://discourse.julialang.org/t/matrix-multiplication-precision-issue/20172 "2019-01-28T07:09:08Z")
**Posts on this page:** 1
**Showing post:** 2

<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: [January 28, 2019, 8:13am UTC](https://discourse.julialang.org/t/matrix-multiplication-precision-issue/20172/2 "2019-01-28T08:13:58Z")

</div>

> [@Caesar\_KG](#):
>
> mathematically, they should have the same results

> [@PSA: floating-point arithmetic](https://discourse.julialang.org/t/psa-floating-point-arithmetic/8678):
>
> Sometimes people are surprised by the results of floating-point calculations such as julia\> 5/6 0.8333333333333334 # shouldn't the last digit be 3? julia\> 2.6 - 0.7 - 1.9 2.220446049250313e-16 # shouldn't the answer be 0? These are not bugs in Julia. They’re consequences of the IEEE-standard 64-bit binary representation of floating-point numbers that is burned into computer hardware, which Julia and many other languages use by default. Brief explanation You can t…

Also, please quote code

> [@PSA: how to quote code with backticks](https://discourse.julialang.org/t/psa-how-to-quote-code-with-backticks/7530):
>
> This is a short post on how to use backticks (` and ```) to quote code, so it is easy to read. This post can be linked to new users who are confused by this feature. Why By quoting your code, you get a monospaced font (which preserves indentation) and syntax highlighting. This makes it easier to read your code and help you. Displayed code looks like this: function displayed\_code(x::Int, y::Int) if x \< y println("x is smaller") else println("or not") end end Inline…

---

_[View the full topic](https://discourse.julialang.org/t/matrix-multiplication-precision-issue/20172)._
