?

Average Error: 3.4 → 0.4
Time: 10.8s
Precision: binary64
Cost: 1480

?

\[x \cdot \left(1 - \left(1 - y\right) \cdot z\right) \]
\[\begin{array}{l} t_0 := \left(1 - y\right) \cdot z\\ \mathbf{if}\;t_0 \leq -5 \cdot 10^{+229}:\\ \;\;\;\;\frac{1}{\frac{\frac{\frac{1}{x}}{z}}{y + -1}}\\ \mathbf{elif}\;t_0 \leq 5 \cdot 10^{+83}:\\ \;\;\;\;x \cdot \left(y \cdot z\right) + x \cdot \left(1 - z\right)\\ \mathbf{else}:\\ \;\;\;\;\left(z \cdot x\right) \cdot \left(y + -1\right)\\ \end{array} \]
(FPCore (x y z) :precision binary64 (* x (- 1.0 (* (- 1.0 y) z))))
(FPCore (x y z)
 :precision binary64
 (let* ((t_0 (* (- 1.0 y) z)))
   (if (<= t_0 -5e+229)
     (/ 1.0 (/ (/ (/ 1.0 x) z) (+ y -1.0)))
     (if (<= t_0 5e+83)
       (+ (* x (* y z)) (* x (- 1.0 z)))
       (* (* z x) (+ y -1.0))))))
double code(double x, double y, double z) {
	return x * (1.0 - ((1.0 - y) * z));
}
double code(double x, double y, double z) {
	double t_0 = (1.0 - y) * z;
	double tmp;
	if (t_0 <= -5e+229) {
		tmp = 1.0 / (((1.0 / x) / z) / (y + -1.0));
	} else if (t_0 <= 5e+83) {
		tmp = (x * (y * z)) + (x * (1.0 - z));
	} else {
		tmp = (z * x) * (y + -1.0);
	}
	return tmp;
}
real(8) function code(x, y, z)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    code = x * (1.0d0 - ((1.0d0 - y) * z))
end function
real(8) function code(x, y, z)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8) :: t_0
    real(8) :: tmp
    t_0 = (1.0d0 - y) * z
    if (t_0 <= (-5d+229)) then
        tmp = 1.0d0 / (((1.0d0 / x) / z) / (y + (-1.0d0)))
    else if (t_0 <= 5d+83) then
        tmp = (x * (y * z)) + (x * (1.0d0 - z))
    else
        tmp = (z * x) * (y + (-1.0d0))
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	return x * (1.0 - ((1.0 - y) * z));
}
public static double code(double x, double y, double z) {
	double t_0 = (1.0 - y) * z;
	double tmp;
	if (t_0 <= -5e+229) {
		tmp = 1.0 / (((1.0 / x) / z) / (y + -1.0));
	} else if (t_0 <= 5e+83) {
		tmp = (x * (y * z)) + (x * (1.0 - z));
	} else {
		tmp = (z * x) * (y + -1.0);
	}
	return tmp;
}
def code(x, y, z):
	return x * (1.0 - ((1.0 - y) * z))
def code(x, y, z):
	t_0 = (1.0 - y) * z
	tmp = 0
	if t_0 <= -5e+229:
		tmp = 1.0 / (((1.0 / x) / z) / (y + -1.0))
	elif t_0 <= 5e+83:
		tmp = (x * (y * z)) + (x * (1.0 - z))
	else:
		tmp = (z * x) * (y + -1.0)
	return tmp
function code(x, y, z)
	return Float64(x * Float64(1.0 - Float64(Float64(1.0 - y) * z)))
end
function code(x, y, z)
	t_0 = Float64(Float64(1.0 - y) * z)
	tmp = 0.0
	if (t_0 <= -5e+229)
		tmp = Float64(1.0 / Float64(Float64(Float64(1.0 / x) / z) / Float64(y + -1.0)));
	elseif (t_0 <= 5e+83)
		tmp = Float64(Float64(x * Float64(y * z)) + Float64(x * Float64(1.0 - z)));
	else
		tmp = Float64(Float64(z * x) * Float64(y + -1.0));
	end
	return tmp
end
function tmp = code(x, y, z)
	tmp = x * (1.0 - ((1.0 - y) * z));
end
function tmp_2 = code(x, y, z)
	t_0 = (1.0 - y) * z;
	tmp = 0.0;
	if (t_0 <= -5e+229)
		tmp = 1.0 / (((1.0 / x) / z) / (y + -1.0));
	elseif (t_0 <= 5e+83)
		tmp = (x * (y * z)) + (x * (1.0 - z));
	else
		tmp = (z * x) * (y + -1.0);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := N[(x * N[(1.0 - N[(N[(1.0 - y), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(1.0 - y), $MachinePrecision] * z), $MachinePrecision]}, If[LessEqual[t$95$0, -5e+229], N[(1.0 / N[(N[(N[(1.0 / x), $MachinePrecision] / z), $MachinePrecision] / N[(y + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 5e+83], N[(N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision] + N[(x * N[(1.0 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(z * x), $MachinePrecision] * N[(y + -1.0), $MachinePrecision]), $MachinePrecision]]]]
x \cdot \left(1 - \left(1 - y\right) \cdot z\right)
\begin{array}{l}
t_0 := \left(1 - y\right) \cdot z\\
\mathbf{if}\;t_0 \leq -5 \cdot 10^{+229}:\\
\;\;\;\;\frac{1}{\frac{\frac{\frac{1}{x}}{z}}{y + -1}}\\

\mathbf{elif}\;t_0 \leq 5 \cdot 10^{+83}:\\
\;\;\;\;x \cdot \left(y \cdot z\right) + x \cdot \left(1 - z\right)\\

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


\end{array}

Error?

Try it out?

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original3.4
Target0.3
Herbie0.4
\[\begin{array}{l} \mathbf{if}\;x \cdot \left(1 - \left(1 - y\right) \cdot z\right) < -1.618195973607049 \cdot 10^{+50}:\\ \;\;\;\;x + \left(1 - y\right) \cdot \left(\left(-z\right) \cdot x\right)\\ \mathbf{elif}\;x \cdot \left(1 - \left(1 - y\right) \cdot z\right) < 3.892237649663903 \cdot 10^{+134}:\\ \;\;\;\;\left(x \cdot y\right) \cdot z - \left(x \cdot z - x\right)\\ \mathbf{else}:\\ \;\;\;\;x + \left(1 - y\right) \cdot \left(\left(-z\right) \cdot x\right)\\ \end{array} \]

Derivation?

  1. Split input into 3 regimes
  2. if (*.f64 (-.f64 1 y) z) < -5.0000000000000005e229

    1. Initial program 24.9

      \[x \cdot \left(1 - \left(1 - y\right) \cdot z\right) \]
    2. Simplified24.9

      \[\leadsto \color{blue}{x \cdot \left(\mathsf{fma}\left(y, z, 1\right) - z\right)} \]
      Proof

      [Start]24.9

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

      *-commutative [=>]24.9

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

      sub-neg [=>]24.9

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

      distribute-rgt-in [=>]24.9

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

      associate--r+ [=>]24.9

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

      *-lft-identity [=>]24.9

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

      sub-neg [=>]24.9

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

      distribute-lft-out-- [<=]24.9

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

      distribute-lft-in [=>]24.9

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

      *-rgt-identity [=>]24.9

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

      +-commutative [=>]24.9

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

      associate-+r- [<=]24.9

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

      *-commutative [=>]24.9

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

      cancel-sign-sub-inv [=>]24.9

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

      distribute-rgt-neg-in [=>]24.9

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

      distribute-rgt1-in [=>]24.9

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

      *-commutative [=>]24.9

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

      +-commutative [=>]24.9

      \[ \color{blue}{x \cdot \left(\left(-y\right) \cdot \left(-z\right) + 1\right) + x \cdot \left(-z\right)} \]
    3. Applied egg-rr24.9

      \[\leadsto \color{blue}{\left(y \cdot z\right) \cdot x + \left(1 - z\right) \cdot x} \]
    4. Applied egg-rr25.0

      \[\leadsto \color{blue}{\frac{1}{\frac{1}{x \cdot \mathsf{fma}\left(y, z, 1 - z\right)}}} \]
    5. Taylor expanded in z around inf 0.3

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

      \[\leadsto \frac{1}{\color{blue}{\frac{\frac{\frac{1}{x}}{z}}{y + -1}}} \]
      Proof

      [Start]0.3

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

      associate-/r* [=>]0.4

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

      *-commutative [=>]0.4

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

      associate-/r* [=>]0.7

      \[ \frac{1}{\color{blue}{\frac{\frac{\frac{1}{z}}{x}}{y - 1}}} \]

      associate-/l/ [=>]0.7

      \[ \frac{1}{\frac{\color{blue}{\frac{1}{x \cdot z}}}{y - 1}} \]

      associate-/r* [=>]0.7

      \[ \frac{1}{\frac{\color{blue}{\frac{\frac{1}{x}}{z}}}{y - 1}} \]

      sub-neg [=>]0.7

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

      metadata-eval [=>]0.7

      \[ \frac{1}{\frac{\frac{\frac{1}{x}}{z}}{y + \color{blue}{-1}}} \]

    if -5.0000000000000005e229 < (*.f64 (-.f64 1 y) z) < 5.00000000000000029e83

    1. Initial program 0.1

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

      \[\leadsto \color{blue}{x \cdot \left(\mathsf{fma}\left(y, z, 1\right) - z\right)} \]
      Proof

      [Start]0.1

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

      *-commutative [=>]0.1

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

      sub-neg [=>]0.1

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

      distribute-rgt-in [=>]0.1

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

      associate--r+ [=>]0.1

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

      *-lft-identity [=>]0.1

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

      sub-neg [=>]0.1

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

      distribute-lft-out-- [<=]0.1

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

      distribute-lft-in [=>]0.1

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

      *-rgt-identity [=>]0.1

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

      +-commutative [=>]0.1

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

      associate-+r- [<=]0.1

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

      *-commutative [=>]0.1

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

      cancel-sign-sub-inv [=>]0.1

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

      distribute-rgt-neg-in [=>]0.1

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

      distribute-rgt1-in [=>]0.1

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

      *-commutative [=>]0.1

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

      +-commutative [=>]0.1

      \[ \color{blue}{x \cdot \left(\left(-y\right) \cdot \left(-z\right) + 1\right) + x \cdot \left(-z\right)} \]
    3. Applied egg-rr0.1

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

    if 5.00000000000000029e83 < (*.f64 (-.f64 1 y) z)

    1. Initial program 8.8

      \[x \cdot \left(1 - \left(1 - y\right) \cdot z\right) \]
    2. Simplified8.8

      \[\leadsto \color{blue}{x \cdot \left(\mathsf{fma}\left(y, z, 1\right) - z\right)} \]
      Proof

      [Start]8.8

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

      *-commutative [=>]8.8

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

      sub-neg [=>]8.8

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

      distribute-rgt-in [=>]8.8

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

      associate--r+ [=>]8.8

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

      *-lft-identity [=>]8.8

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

      sub-neg [=>]8.8

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

      distribute-lft-out-- [<=]8.8

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

      distribute-lft-in [=>]8.8

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

      *-rgt-identity [=>]8.8

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

      +-commutative [=>]8.8

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

      associate-+r- [<=]8.8

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

      *-commutative [=>]8.8

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

      cancel-sign-sub-inv [=>]8.8

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

      distribute-rgt-neg-in [=>]8.8

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

      distribute-rgt1-in [=>]8.8

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

      *-commutative [=>]8.8

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

      +-commutative [=>]8.8

      \[ \color{blue}{x \cdot \left(\left(-y\right) \cdot \left(-z\right) + 1\right) + x \cdot \left(-z\right)} \]
    3. Taylor expanded in z around -inf 1.5

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

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

      [Start]1.5

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

      associate-*r* [=>]1.5

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

      *-commutative [=>]1.5

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

      mul-1-neg [=>]1.5

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

      mul-1-neg [=>]1.5

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

      unsub-neg [=>]1.5

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\left(1 - y\right) \cdot z \leq -5 \cdot 10^{+229}:\\ \;\;\;\;\frac{1}{\frac{\frac{\frac{1}{x}}{z}}{y + -1}}\\ \mathbf{elif}\;\left(1 - y\right) \cdot z \leq 5 \cdot 10^{+83}:\\ \;\;\;\;x \cdot \left(y \cdot z\right) + x \cdot \left(1 - z\right)\\ \mathbf{else}:\\ \;\;\;\;\left(z \cdot x\right) \cdot \left(y + -1\right)\\ \end{array} \]

Alternatives

Alternative 1
Error0.5
Cost1480
\[\begin{array}{l} t_0 := \left(1 - y\right) \cdot z\\ \mathbf{if}\;t_0 \leq -1 \cdot 10^{+133}:\\ \;\;\;\;\frac{z \cdot x}{\frac{1}{y + -1}}\\ \mathbf{elif}\;t_0 \leq 5 \cdot 10^{+83}:\\ \;\;\;\;x \cdot \left(y \cdot z\right) + x \cdot \left(1 - z\right)\\ \mathbf{else}:\\ \;\;\;\;\left(z \cdot x\right) \cdot \left(y + -1\right)\\ \end{array} \]
Alternative 2
Error0.5
Cost1353
\[\begin{array}{l} t_0 := \left(1 - y\right) \cdot z\\ \mathbf{if}\;t_0 \leq -4 \cdot 10^{+108} \lor \neg \left(t_0 \leq 5 \cdot 10^{+83}\right):\\ \;\;\;\;\left(z \cdot x\right) \cdot \left(y + -1\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(1 + z \cdot \left(y + -1\right)\right)\\ \end{array} \]
Alternative 3
Error0.5
Cost1353
\[\begin{array}{l} t_0 := \left(1 - y\right) \cdot z\\ \mathbf{if}\;t_0 \leq -4 \cdot 10^{+108} \lor \neg \left(t_0 \leq 5 \cdot 10^{+83}\right):\\ \;\;\;\;\left(z \cdot x\right) \cdot \left(y + -1\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(\left(1 + y \cdot z\right) - z\right)\\ \end{array} \]
Alternative 4
Error0.5
Cost1352
\[\begin{array}{l} t_0 := \left(1 - y\right) \cdot z\\ \mathbf{if}\;t_0 \leq -1 \cdot 10^{+133}:\\ \;\;\;\;\frac{z \cdot x}{\frac{1}{y + -1}}\\ \mathbf{elif}\;t_0 \leq 5 \cdot 10^{+83}:\\ \;\;\;\;x \cdot \left(\left(1 + y \cdot z\right) - z\right)\\ \mathbf{else}:\\ \;\;\;\;\left(z \cdot x\right) \cdot \left(y + -1\right)\\ \end{array} \]
Alternative 5
Error21.1
Cost784
\[\begin{array}{l} t_0 := y \cdot \left(z \cdot x\right)\\ t_1 := z \cdot \left(-x\right)\\ \mathbf{if}\;z \leq -1.65 \cdot 10^{+106}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;z \leq -620:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -2.4 \cdot 10^{-49}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;z \leq 1:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 6
Error21.2
Cost784
\[\begin{array}{l} t_0 := z \cdot \left(-x\right)\\ \mathbf{if}\;z \leq -6.2 \cdot 10^{+105}:\\ \;\;\;\;y \cdot \left(z \cdot x\right)\\ \mathbf{elif}\;z \leq -680:\\ \;\;\;\;t_0\\ \mathbf{elif}\;z \leq -7 \cdot 10^{-50}:\\ \;\;\;\;z \cdot \left(y \cdot x\right)\\ \mathbf{elif}\;z \leq 1:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 7
Error3.5
Cost713
\[\begin{array}{l} \mathbf{if}\;y \leq -2.2 \cdot 10^{+52} \lor \neg \left(y \leq 1\right):\\ \;\;\;\;x + y \cdot \left(z \cdot x\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(1 - z\right)\\ \end{array} \]
Alternative 8
Error1.0
Cost713
\[\begin{array}{l} \mathbf{if}\;z \leq -0.245 \lor \neg \left(z \leq 1\right):\\ \;\;\;\;\left(z \cdot x\right) \cdot \left(y + -1\right)\\ \mathbf{else}:\\ \;\;\;\;x + x \cdot \left(y \cdot z\right)\\ \end{array} \]
Alternative 9
Error19.9
Cost652
\[\begin{array}{l} t_0 := z \cdot \left(-x\right)\\ \mathbf{if}\;z \leq -720:\\ \;\;\;\;t_0\\ \mathbf{elif}\;z \leq -6.7 \cdot 10^{-49}:\\ \;\;\;\;x \cdot \left(y \cdot z\right)\\ \mathbf{elif}\;z \leq 1:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 10
Error12.2
Cost584
\[\begin{array}{l} \mathbf{if}\;y \leq -8.6 \cdot 10^{+91}:\\ \;\;\;\;y \cdot \left(z \cdot x\right)\\ \mathbf{elif}\;y \leq 3.2 \cdot 10^{+134}:\\ \;\;\;\;x \cdot \left(1 - z\right)\\ \mathbf{else}:\\ \;\;\;\;z \cdot \left(y \cdot x\right)\\ \end{array} \]
Alternative 11
Error19.5
Cost521
\[\begin{array}{l} \mathbf{if}\;z \leq -0.39 \lor \neg \left(z \leq 1\right):\\ \;\;\;\;z \cdot \left(-x\right)\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
Alternative 12
Error32.9
Cost64
\[x \]

Error

Reproduce?

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

  :herbie-target
  (if (< (* x (- 1.0 (* (- 1.0 y) z))) -1.618195973607049e+50) (+ x (* (- 1.0 y) (* (- z) x))) (if (< (* x (- 1.0 (* (- 1.0 y) z))) 3.892237649663903e+134) (- (* (* x y) z) (- (* x z) x)) (+ x (* (- 1.0 y) (* (- z) x)))))

  (* x (- 1.0 (* (- 1.0 y) z))))