# LinearAlgebraX Result Output Format

**URL:** <https://discourse.julialang.org/t/linearalgebrax-result-output-format/84669>\
**Category:** General Usage\
**Tags:** question, package\
**Created:** [July 23, 2022, 8:05am UTC](https://discourse.julialang.org/t/linearalgebrax-result-output-format/84669 "2022-07-23T08:05:24Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Freya\_the\_Goddess](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/freya_the_goddess/32/36835_2.png) [@Freya\_the\_Goddess](https://discourse.julialang.org/u/Freya_the_Goddess)\
**Post date:** [July 23, 2022, 8:05am UTC](https://discourse.julialang.org/t/linearalgebrax-result-output-format/84669/1 "2022-07-23T08:05:24Z")

</div>

Hi all,

I am trying LinearALgebraX package,

the result is quite funny, why there are //1 in all entries?  
 ![Capture d’écran_2022-07-23_15-02-57](https://global.discourse-cdn.com/julialang/original/3X/7/5/755642689ff08457f3e76a2c54ef7e617524af81.png)

How to discard all the //1? most people will be confused, unless you are already experienced with Julia and Linear Algebra.

---

<div class="post-metadata">

**Author:** ![sdanisch](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/sdanisch/32/1406_2.png) [@sdanisch](https://discourse.julialang.org/u/sdanisch)\
**Post date:** [July 23, 2022, 8:27am UTC](https://discourse.julialang.org/t/linearalgebrax-result-output-format/84669/2 "2022-07-23T08:27:36Z")

</div>

That’s how `Rational` values are printed and that seems to be the main point of LinearAlgebraX:

> This module implements basic linear algebra methods for matrices with exact entries (e.g., `Rational{Int}` values). The function names typically match the standard ones in Julia but with an `x` (for “exact”) appended.

I guess most people who don’t want those `//1` will just use `LinearAlgebra` without the X 😉

Anyways, you can always convert to Float with `convert(Matrix{Float64}, rrefx(A))` or `Float64.(rrefx(A))` - but that will lose the x factor 😉

---

<div class="post-metadata">

**Author:** ![Freya\_the\_Goddess](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/freya_the_goddess/32/36835_2.png) [@Freya\_the\_Goddess](https://discourse.julialang.org/u/Freya_the_Goddess)\
**Post date:** [July 23, 2022, 8:36am UTC](https://discourse.julialang.org/t/linearalgebrax-result-output-format/84669/3 "2022-07-23T08:36:30Z")

</div>

> [@sdanisch](#):
>
> convert(Matrix{Float64}, rrefx(A))

thanks a lot, I need LinearAlgebraX for its exact entries, just need to get rid of the `//1`

---

<div class="post-metadata">

**Author:** ![acxz](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/acxz/32/16759_2.png) [@acxz](https://discourse.julialang.org/u/acxz)\
**Post date:** [July 23, 2022, 2:29pm UTC](https://discourse.julialang.org/t/linearalgebrax-result-output-format/84669/4 "2022-07-23T14:29:30Z")

</div>

If you need to just get rid of the `//1`, it is more appropriate to write your own `Base.show` method, instead of changing the output type.

---

<div class="post-metadata">

**Author:** ![fredrikekre](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fredrikekre/32/1688_2.png) [@fredrikekre](https://discourse.julialang.org/u/fredrikekre)\
**Post date:** [July 23, 2022, 2:33pm UTC](https://discourse.julialang.org/t/linearalgebrax-result-output-format/84669/5 "2022-07-23T14:33:22Z")

</div>

See [JuliaLang/julia#45396](https://github.com/JuliaLang/julia/pull/45396).
