Average Error: 3.4 → 3.4
Time: 10.2s
Precision: 64
\[x \cdot \left(1 - y \cdot z\right)\]
\[x \cdot \left(1 - y \cdot z\right)\]
x \cdot \left(1 - y \cdot z\right)
x \cdot \left(1 - y \cdot z\right)
double f(double x, double y, double z) {
        double r168496 = x;
        double r168497 = 1.0;
        double r168498 = y;
        double r168499 = z;
        double r168500 = r168498 * r168499;
        double r168501 = r168497 - r168500;
        double r168502 = r168496 * r168501;
        return r168502;
}

double f(double x, double y, double z) {
        double r168503 = x;
        double r168504 = 1.0;
        double r168505 = y;
        double r168506 = z;
        double r168507 = r168505 * r168506;
        double r168508 = r168504 - r168507;
        double r168509 = r168503 * r168508;
        return r168509;
}

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. Split input into 2 regimes
  2. if (* y z) < 3.075011168316586e+284

    1. Initial program 1.6

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

    if 3.075011168316586e+284 < (* y z)

    1. Initial program 53.7

      \[x \cdot \left(1 - y \cdot z\right)\]
    2. Using strategy rm
    3. Applied sub-neg53.7

      \[\leadsto x \cdot \color{blue}{\left(1 + \left(-y \cdot z\right)\right)}\]
    4. Applied distribute-lft-in53.7

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

      \[\leadsto x \cdot 1 + \color{blue}{\left(-x \cdot y\right) \cdot z}\]
  3. Recombined 2 regimes into one program.
  4. Final simplification3.4

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

Reproduce

herbie shell --seed 2019291 
(FPCore (x y z)
  :name "Data.Colour.RGBSpace.HSV:hsv from colour-2.3.3, I"
  :precision binary64
  (* x (- 1 (* y z))))