Average Error: 0.1 → 0.1
Time: 1.4s
Precision: binary64
\[\left(\frac{1}{8} \cdot x - \frac{y \cdot z}{2}\right) + t\]
\[\left(0.125 \cdot x - \frac{y \cdot z}{2}\right) + t\]
\left(\frac{1}{8} \cdot x - \frac{y \cdot z}{2}\right) + t
\left(0.125 \cdot x - \frac{y \cdot z}{2}\right) + t
(FPCore (x y z t)
 :precision binary64
 (+ (- (* (/ 1.0 8.0) x) (/ (* y z) 2.0)) t))
(FPCore (x y z t) :precision binary64 (+ (- (* 0.125 x) (/ (* y z) 2.0)) 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 ((0.125 * x) - ((y * z) / 2.0)) + 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.1
Target0.0
Herbie0.1
\[\left(\frac{x}{8} + t\right) - \frac{z}{2} \cdot y\]

Derivation

  1. Initial program 0.1

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

    \[\leadsto \color{blue}{\left(0.125 \cdot x - \frac{y \cdot z}{2}\right) + t}\]
  3. Final simplification0.1

    \[\leadsto \left(0.125 \cdot x - \frac{y \cdot z}{2}\right) + t\]

Reproduce

herbie shell --seed 2020224 
(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))