# Why is \`muladd\` not consistent even though it has the effect?

**URL:** <https://discourse.julialang.org/t/why-is-muladd-not-consistent-even-though-it-has-the-effect/140455>\
**Category:** General Usage\
**Tags:** question\
**Created:** [November 1, 2026, 12:27am UTC](https://discourse.julialang.org/t/why-is-muladd-not-consistent-even-though-it-has-the-effect/140455 "2026-11-01T00:27:37Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![nhz2](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nhz2/32/44428_2.png) [@nhz2](https://discourse.julialang.org/u/nhz2)\
**Post date:** [November 1, 2026, 12:27am UTC](https://discourse.julialang.org/t/why-is-muladd-not-consistent-even-though-it-has-the-effect/140455/1 "2026-11-01T00:27:37Z")

</div>

This inconsistency also seems to infect functions that call `muladd` like `evalpoly`. This means that currently [PhiloxRNG.jl](https://github.com/medyan-dev/PhiloxRNG.jl)’s `randn_f32` which calls `evalpoly` is also impacted and returns different random numbers even if the seed is exactly the same and the function is running on the exact same computer. Is this a bug in the compiler, or should I just replace `evalpoly` and such with versions that use `fma` directly?

Here is an example:

```julia
using PhiloxRNG
@inline g(k) = randn_f32(UInt64(k), UInt64(0), UInt64(0))

@noinline full(k) = g(k)
@noinline first_only(k) = g(k)[1]

k = 93

full(k)[1] - first_only(k)
# -1.1920929f-7

Base.infer_effects(randn_f32)
# (+c,+e,+n,+t,+s,+m,+u,+o,+r)

```

```julia-repl
julia> versioninfo()
Julia Version 1.13.1
Commit 96ca370cf0e (2026-09-25 19:34 UTC)
Build Info:
  Official https://julialang.org release
Platform Info:
  OS: Linux (x86_64-linux-gnu)
  CPU: 16 × AMD Ryzen 7 9800X3D 8-Core Processor
  WORD_SIZE: 64
  LLVM: libLLVM-20.1.8 (ORCJIT, znver5)
  GC: Built with stock GC
Threads: 4 default, 1 interactive, 4 GC (on 16 virtual cores)

```
