Average Error: 0.0 → 0.0
Time: 3.1s
Precision: binary64
Cost: 13248
\[e^{\left(x + y \cdot \log y\right) - z}\]
\[e^{\left(y \cdot \log y + x\right) - z}\]
e^{\left(x + y \cdot \log y\right) - z}
e^{\left(y \cdot \log y + x\right) - z}
(FPCore (x y z) :precision binary64 (exp (- (+ x (* y (log y))) z)))
(FPCore (x y z) :precision binary64 (exp (- (+ (* y (log y)) x) z)))
double code(double x, double y, double z) {
	return exp((x + (y * log(y))) - z);
}
double code(double x, double y, double z) {
	return exp(((y * log(y)) + x) - z);
}

Error

Bits error versus x

Bits error versus y

Bits error versus z

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original0.0
Target0.0
Herbie0.0
\[e^{\left(x - z\right) + \log y \cdot y}\]

Alternatives

Alternative 1
Error0.6
Cost6592
\[e^{x - z}\]
Alternative 2
Error1.1
Cost6849
\[\begin{array}{l} \mathbf{if}\;z \leq 2.1403261626271705 \cdot 10^{-05}:\\ \;\;\;\;e^{x}\\ \mathbf{else}:\\ \;\;\;\;e^{-z}\\ \end{array}\]
Alternative 3
Error1.2
Cost6785
\[\begin{array}{l} \mathbf{if}\;z \leq 352.84262481624853:\\ \;\;\;\;e^{x}\\ \mathbf{else}:\\ \;\;\;\;0\\ \end{array}\]
Alternative 4
Error16.4
Cost1348
\[\begin{array}{l} \mathbf{if}\;x \leq -7.736133318897376 \cdot 10^{-44}:\\ \;\;\;\;0\\ \mathbf{elif}\;x \leq 1.995746950486534 \cdot 10^{-167}:\\ \;\;\;\;1\\ \mathbf{elif}\;x \leq 9.143979924130335 \cdot 10^{-127}:\\ \;\;\;\;0\\ \mathbf{elif}\;x \leq 7.793510965676542 \cdot 10^{-67}:\\ \;\;\;\;1\\ \mathbf{else}:\\ \;\;\;\;0\\ \end{array}\]
Alternative 5
Error45.2
Cost64
\[1\]

Error

Derivation

  1. Initial program 0.0

    \[e^{\left(x + y \cdot \log y\right) - z}\]
  2. Simplified0.0

    \[\leadsto \color{blue}{e^{\left(y \cdot \log y + x\right) - z}}\]
  3. Final simplification0.0

    \[\leadsto e^{\left(y \cdot \log y + x\right) - z}\]

Reproduce

herbie shell --seed 2021044 
(FPCore (x y z)
  :name "Statistics.Distribution.Poisson.Internal:probability from math-functions-0.1.5.2"
  :precision binary64

  :herbie-target
  (exp (+ (- x z) (* (log y) y)))

  (exp (- (+ x (* y (log y))) z)))