Average Error: 0.0 → 0.1
Time: 11.2s
Precision: 64
\[x \cdot x - \left(y \cdot 4\right) \cdot z\]
\[x \cdot x - y \cdot \left(4 \cdot z\right)\]
x \cdot x - \left(y \cdot 4\right) \cdot z
x \cdot x - y \cdot \left(4 \cdot z\right)
double f(double x, double y, double z) {
        double r130828 = x;
        double r130829 = r130828 * r130828;
        double r130830 = y;
        double r130831 = 4.0;
        double r130832 = r130830 * r130831;
        double r130833 = z;
        double r130834 = r130832 * r130833;
        double r130835 = r130829 - r130834;
        return r130835;
}

double f(double x, double y, double z) {
        double r130836 = x;
        double r130837 = r130836 * r130836;
        double r130838 = y;
        double r130839 = 4.0;
        double r130840 = z;
        double r130841 = r130839 * r130840;
        double r130842 = r130838 * r130841;
        double r130843 = r130837 - r130842;
        return r130843;
}

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

Derivation

  1. Initial program 0.0

    \[x \cdot x - \left(y \cdot 4\right) \cdot z\]
  2. Simplified0.0

    \[\leadsto \color{blue}{x \cdot x - \left(y \cdot z\right) \cdot 4}\]
  3. Using strategy rm
  4. Applied associate-*l*0.1

    \[\leadsto x \cdot x - \color{blue}{y \cdot \left(z \cdot 4\right)}\]
  5. Simplified0.1

    \[\leadsto x \cdot x - y \cdot \color{blue}{\left(4 \cdot z\right)}\]
  6. Final simplification0.1

    \[\leadsto x \cdot x - y \cdot \left(4 \cdot z\right)\]

Reproduce

herbie shell --seed 2019195 
(FPCore (x y z)
  :name "Graphics.Rasterific.QuadraticFormula:discriminant from Rasterific-0.6.1"
  (- (* x x) (* (* y 4.0) z)))