Average Error: 0.0 → 0.3
Time: 1.7s
Precision: binary64
\[x \cdot e^{y \cdot y} \]
\[0.16666666666666666 \cdot \left({y}^{6} \cdot x\right) + \left(x \cdot {y}^{2} + \left(x + 0.5 \cdot \left(x \cdot {y}^{4}\right)\right)\right) \]
x \cdot e^{y \cdot y}
0.16666666666666666 \cdot \left({y}^{6} \cdot x\right) + \left(x \cdot {y}^{2} + \left(x + 0.5 \cdot \left(x \cdot {y}^{4}\right)\right)\right)
(FPCore (x y) :precision binary64 (* x (exp (* y y))))
(FPCore (x y)
 :precision binary64
 (+
  (* 0.16666666666666666 (* (pow y 6.0) x))
  (+ (* x (pow y 2.0)) (+ x (* 0.5 (* x (pow y 4.0)))))))
double code(double x, double y) {
	return x * exp(y * y);
}
double code(double x, double y) {
	return (0.16666666666666666 * (pow(y, 6.0) * x)) + ((x * pow(y, 2.0)) + (x + (0.5 * (x * pow(y, 4.0)))));
}

Error

Bits error versus x

Bits error versus y

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original0.0
Target0.0
Herbie0.3
\[x \cdot {\left(e^{y}\right)}^{y} \]

Derivation

  1. Initial program 0.0

    \[x \cdot e^{y \cdot y} \]
  2. Using strategy rm
  3. Applied *-un-lft-identity_binary640.0

    \[\leadsto \color{blue}{\left(1 \cdot x\right)} \cdot e^{y \cdot y} \]
  4. Applied associate-*l*_binary640.0

    \[\leadsto \color{blue}{1 \cdot \left(x \cdot e^{y \cdot y}\right)} \]
  5. Simplified0.0

    \[\leadsto 1 \cdot \color{blue}{\left(e^{y \cdot y} \cdot x\right)} \]
  6. Taylor expanded around 0 0.3

    \[\leadsto 1 \cdot \color{blue}{\left(0.16666666666666666 \cdot \left({y}^{6} \cdot x\right) + \left({y}^{2} \cdot x + \left(0.5 \cdot \left({y}^{4} \cdot x\right) + x\right)\right)\right)} \]
  7. Final simplification0.3

    \[\leadsto 0.16666666666666666 \cdot \left({y}^{6} \cdot x\right) + \left(x \cdot {y}^{2} + \left(x + 0.5 \cdot \left(x \cdot {y}^{4}\right)\right)\right) \]

Reproduce

herbie shell --seed 2021204 
(FPCore (x y)
  :name "Data.Number.Erf:$dmerfcx from erf-2.0.0.0"
  :precision binary64

  :herbie-target
  (* x (pow (exp y) y))

  (* x (exp (* y y))))