Average Error: 3.4 → 0.2
Time: 3.0s
Precision: 64
\[x \cdot \left(1 - y \cdot z\right)\]
\[\begin{array}{l} \mathbf{if}\;y \cdot z \le -3.8196183741293825 \cdot 10^{232} \lor \neg \left(y \cdot z \le 2.30989123533282519 \cdot 10^{181}\right):\\ \;\;\;\;x \cdot 1 + \left(x \cdot y\right) \cdot \left(-z\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot 1 + x \cdot \left(-y \cdot z\right)\\ \end{array}\]
x \cdot \left(1 - y \cdot z\right)
\begin{array}{l}
\mathbf{if}\;y \cdot z \le -3.8196183741293825 \cdot 10^{232} \lor \neg \left(y \cdot z \le 2.30989123533282519 \cdot 10^{181}\right):\\
\;\;\;\;x \cdot 1 + \left(x \cdot y\right) \cdot \left(-z\right)\\

\mathbf{else}:\\
\;\;\;\;x \cdot 1 + x \cdot \left(-y \cdot z\right)\\

\end{array}
double f(double x, double y, double z) {
        double r272338 = x;
        double r272339 = 1.0;
        double r272340 = y;
        double r272341 = z;
        double r272342 = r272340 * r272341;
        double r272343 = r272339 - r272342;
        double r272344 = r272338 * r272343;
        return r272344;
}

double f(double x, double y, double z) {
        double r272345 = y;
        double r272346 = z;
        double r272347 = r272345 * r272346;
        double r272348 = -3.8196183741293825e+232;
        bool r272349 = r272347 <= r272348;
        double r272350 = 2.3098912353328252e+181;
        bool r272351 = r272347 <= r272350;
        double r272352 = !r272351;
        bool r272353 = r272349 || r272352;
        double r272354 = x;
        double r272355 = 1.0;
        double r272356 = r272354 * r272355;
        double r272357 = r272354 * r272345;
        double r272358 = -r272346;
        double r272359 = r272357 * r272358;
        double r272360 = r272356 + r272359;
        double r272361 = -r272347;
        double r272362 = r272354 * r272361;
        double r272363 = r272356 + r272362;
        double r272364 = r272353 ? r272360 : r272363;
        return r272364;
}

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.8196183741293825e+232 or 2.3098912353328252e+181 < (* y z)

    1. Initial program 26.7

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

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

      \[\leadsto \color{blue}{x \cdot 1 + x \cdot \left(-y \cdot z\right)}\]
    5. Using strategy rm
    6. Applied distribute-rgt-neg-in26.7

      \[\leadsto x \cdot 1 + x \cdot \color{blue}{\left(y \cdot \left(-z\right)\right)}\]
    7. Applied associate-*r*1.1

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

    if -3.8196183741293825e+232 < (* y z) < 2.3098912353328252e+181

    1. Initial program 0.1

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \cdot z \le -3.8196183741293825 \cdot 10^{232} \lor \neg \left(y \cdot z \le 2.30989123533282519 \cdot 10^{181}\right):\\ \;\;\;\;x \cdot 1 + \left(x \cdot y\right) \cdot \left(-z\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot 1 + x \cdot \left(-y \cdot z\right)\\ \end{array}\]

Reproduce

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