# Mixture of Float32 and Float64

**URL:** https://discourse.julialang.org/t/mixture-of-float32-and-float64/95439
**Category:** General Usage
**Created:** [March 2, 2023, 12:17pm UTC](https://discourse.julialang.org/t/mixture-of-float32-and-float64/95439 "2023-03-02T12:17:52Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![erlebach](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/erlebach/32/12973_2.png) [@erlebach](https://discourse.julialang.org/u/erlebach)
#### Post date: [March 2, 2023, 12:17pm UTC](https://discourse.julialang.org/t/mixture-of-float32-and-float64/95439/1 "2023-03-02T12:17:52Z")

</div>

If a computational graph is a mixture of Float32 and Float64, will Zygote have issues? Or must one be careful about types? Are there any stated rules, best practices, etc?  
Clearly adding a Float32 and a Float64 should not be an issue. But what about many of the other operations and constructs? Thanks.

---

<div class="post-metadata">

### Author: ![josuagrw](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/josuagrw/32/1015_2.png) [@josuagrw](https://discourse.julialang.org/u/josuagrw)
#### Post date: [March 2, 2023, 12:26pm UTC](https://discourse.julialang.org/t/mixture-of-float32-and-float64/95439/2 "2023-03-02T12:26:19Z")

</div>

Generally, [type promotion](https://docs.julialang.org/en/v1/manual/conversion-and-promotion/#Promotion) will take care of those questions. Where types cannot be promoted, Julia will raise an [InexactError](http://web.mit.edu/julia_v0.6.0/julia/share/doc/julia/html/en/stdlib/base.html#Core.InexactError).
