# Int / Float type inference in constructor

**URL:** <https://discourse.julialang.org/t/int-float-type-inference-in-constructor/62395>\
**Category:** General Usage\
**Created:** [June 4, 2021, 3:56pm UTC](https://discourse.julialang.org/t/int-float-type-inference-in-constructor/62395 "2021-06-04T15:56:00Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![gustaphe](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gustaphe/32/18174_2.png) [@gustaphe](https://discourse.julialang.org/u/gustaphe)\
**Post date:** [June 4, 2021, 5:06pm UTC](https://discourse.julialang.org/t/int-float-type-inference-in-constructor/62395/5 "2021-06-04T17:06:19Z")

</div>

Why do you want this? I’m very curious to hear a good reason for a numerical matrix inverse.

> [@Non-allocating matrix inversion](https://discourse.julialang.org/t/non-allocating-matrix-inversion/62264/8):
>
> using LinearAlgebra, BenchmarkTools, BenchmarkPlots, StatsPlots bg = BenchmarkGroup() bg[:inv] = @benchmarkable A\*inv(B)\*b setup=(A=rand(100,100);B=rand(100,100);b=rand(100)) bg[:backslash] = @benchmarkable A\*(B\b) setup=(A=rand(100,100);B=rand(100,100);b=rand(100)) bg[:slash] = @benchmarkable (A/B)\*b setup=(A=rand(100,100);B=rand(100,100);b=rand(100)) bg[:qr] = @benchmarkable A\*(qr(B)\b) setup=(A=rand(100,100);B=rand(100,100);b=rand(100)) bg[:lu] = @benchmarkable A\*(lu(B)\b) setup=(A=rand(100,1…

---

_[View the full topic](https://discourse.julialang.org/t/int-float-type-inference-in-constructor/62395)._
