Average Error: 0.0 → 0.0
Time: 9.8s
Precision: 64
\[\left(\frac{1}{8} \cdot x - \frac{y \cdot z}{2}\right) + t\]
\[\left(t + 0.125 \cdot x\right) - 0.5 \cdot \left(z \cdot y\right)\]
\left(\frac{1}{8} \cdot x - \frac{y \cdot z}{2}\right) + t
\left(t + 0.125 \cdot x\right) - 0.5 \cdot \left(z \cdot y\right)
double f(double x, double y, double z, double t) {
        double r485635 = 1.0;
        double r485636 = 8.0;
        double r485637 = r485635 / r485636;
        double r485638 = x;
        double r485639 = r485637 * r485638;
        double r485640 = y;
        double r485641 = z;
        double r485642 = r485640 * r485641;
        double r485643 = 2.0;
        double r485644 = r485642 / r485643;
        double r485645 = r485639 - r485644;
        double r485646 = t;
        double r485647 = r485645 + r485646;
        return r485647;
}

double f(double x, double y, double z, double t) {
        double r485648 = t;
        double r485649 = 0.125;
        double r485650 = x;
        double r485651 = r485649 * r485650;
        double r485652 = r485648 + r485651;
        double r485653 = 0.5;
        double r485654 = z;
        double r485655 = y;
        double r485656 = r485654 * r485655;
        double r485657 = r485653 * r485656;
        double r485658 = r485652 - r485657;
        return r485658;
}

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. Taylor expanded around 0 0.0

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

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

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

Reproduce

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

  :herbie-target
  (- (+ (/ x 8) t) (* (/ z 2) y))

  (+ (- (* (/ 1 8) x) (/ (* y z) 2)) t))