Average Error: 0.0 → 0.0
Time: 5.5s
Precision: binary64
\[\left(\frac{1}{8} \cdot x - \frac{y \cdot z}{2}\right) + t\]
\[\left(z \cdot y\right) \cdot -0.5 + \left(0.125 \cdot x + t\right)\]
\left(\frac{1}{8} \cdot x - \frac{y \cdot z}{2}\right) + t
\left(z \cdot y\right) \cdot -0.5 + \left(0.125 \cdot x + t\right)
(FPCore (x y z t)
 :precision binary64
 (+ (- (* (/ 1.0 8.0) x) (/ (* y z) 2.0)) t))
(FPCore (x y z t) :precision binary64 (+ (* (* z y) -0.5) (+ (* 0.125 x) t)))
double code(double x, double y, double z, double t) {
	return (((1.0 / 8.0) * x) - ((y * z) / 2.0)) + t;
}
double code(double x, double y, double z, double t) {
	return ((z * y) * -0.5) + ((0.125 * x) + t);
}

Error

Bits error versus x

Bits error versus y

Bits error versus z

Bits error versus t

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original0.0
Target0.0
Herbie0.0
\[\left(\frac{x}{8} + t\right) - \frac{z}{2} \cdot y\]

Derivation

  1. Initial program 0.0

    \[\left(\frac{1}{8} \cdot x - \frac{y \cdot z}{2}\right) + t\]
  2. Simplified0.0

    \[\leadsto \color{blue}{\left(0.125 \cdot x - \frac{y \cdot z}{2}\right) + t}\]
  3. Taylor expanded around 0 0.0

    \[\leadsto \color{blue}{\left(t + 0.125 \cdot x\right) - 0.5 \cdot \left(z \cdot y\right)}\]
  4. Simplified0.0

    \[\leadsto \color{blue}{-0.5 \cdot \left(z \cdot y\right) + \left(0.125 \cdot x + t\right)}\]
  5. Using strategy rm
  6. Applied add-sqr-sqrt_binary6427.8

    \[\leadsto \color{blue}{\sqrt{-0.5 \cdot \left(z \cdot y\right)} \cdot \sqrt{-0.5 \cdot \left(z \cdot y\right)}} + \left(0.125 \cdot x + t\right)\]
  7. Simplified27.8

    \[\leadsto \color{blue}{\sqrt{\left(z \cdot y\right) \cdot -0.5}} \cdot \sqrt{-0.5 \cdot \left(z \cdot y\right)} + \left(0.125 \cdot x + t\right)\]
  8. Simplified27.8

    \[\leadsto \sqrt{\left(z \cdot y\right) \cdot -0.5} \cdot \color{blue}{\sqrt{\left(z \cdot y\right) \cdot -0.5}} + \left(0.125 \cdot x + t\right)\]
  9. Using strategy rm
  10. Applied pow1/2_binary6427.8

    \[\leadsto \sqrt{\left(z \cdot y\right) \cdot -0.5} \cdot \color{blue}{{\left(\left(z \cdot y\right) \cdot -0.5\right)}^{0.5}} + \left(0.125 \cdot x + t\right)\]
  11. Applied pow1/2_binary6427.8

    \[\leadsto \color{blue}{{\left(\left(z \cdot y\right) \cdot -0.5\right)}^{0.5}} \cdot {\left(\left(z \cdot y\right) \cdot -0.5\right)}^{0.5} + \left(0.125 \cdot x + t\right)\]
  12. Applied pow-prod-up_binary640.0

    \[\leadsto \color{blue}{{\left(\left(z \cdot y\right) \cdot -0.5\right)}^{\left(0.5 + 0.5\right)}} + \left(0.125 \cdot x + t\right)\]
  13. Final simplification0.0

    \[\leadsto \left(z \cdot y\right) \cdot -0.5 + \left(0.125 \cdot x + t\right)\]

Alternatives

Reproduce

herbie shell --seed 2021118 
(FPCore (x y z t)
  :name "Diagrams.Solve.Polynomial:quartForm  from diagrams-solve-0.1, B"
  :precision binary64

  :herbie-target
  (- (+ (/ x 8.0) t) (* (/ z 2.0) y))

  (+ (- (* (/ 1.0 8.0) x) (/ (* y z) 2.0)) t))