Average Error: 3.3 → 1.8
Time: 2.7s
Precision: binary64
\[ \begin{array}{c}[y, z] = \mathsf{sort}([y, z])\\ \end{array} \]
\[x \cdot \left(1 - y \cdot z\right) \]
\[\begin{array}{l} \mathbf{if}\;y \cdot z \leq -5 \cdot 10^{+198}:\\ \;\;\;\;x - y \cdot \left(z \cdot x\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(1 - y \cdot z\right)\\ \end{array} \]
(FPCore (x y z) :precision binary64 (* x (- 1.0 (* y z))))
(FPCore (x y z)
 :precision binary64
 (if (<= (* y z) -5e+198) (- x (* y (* z x))) (* x (- 1.0 (* y z)))))
double code(double x, double y, double z) {
	return x * (1.0 - (y * z));
}
double code(double x, double y, double z) {
	double tmp;
	if ((y * z) <= -5e+198) {
		tmp = x - (y * (z * x));
	} else {
		tmp = x * (1.0 - (y * z));
	}
	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 - (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) :: tmp
    if ((y * z) <= (-5d+198)) then
        tmp = x - (y * (z * x))
    else
        tmp = x * (1.0d0 - (y * z))
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	return x * (1.0 - (y * z));
}
public static double code(double x, double y, double z) {
	double tmp;
	if ((y * z) <= -5e+198) {
		tmp = x - (y * (z * x));
	} else {
		tmp = x * (1.0 - (y * z));
	}
	return tmp;
}
def code(x, y, z):
	return x * (1.0 - (y * z))
def code(x, y, z):
	tmp = 0
	if (y * z) <= -5e+198:
		tmp = x - (y * (z * x))
	else:
		tmp = x * (1.0 - (y * z))
	return tmp
function code(x, y, z)
	return Float64(x * Float64(1.0 - Float64(y * z)))
end
function code(x, y, z)
	tmp = 0.0
	if (Float64(y * z) <= -5e+198)
		tmp = Float64(x - Float64(y * Float64(z * x)));
	else
		tmp = Float64(x * Float64(1.0 - Float64(y * z)));
	end
	return tmp
end
function tmp = code(x, y, z)
	tmp = x * (1.0 - (y * z));
end
function tmp_2 = code(x, y, z)
	tmp = 0.0;
	if ((y * z) <= -5e+198)
		tmp = x - (y * (z * x));
	else
		tmp = x * (1.0 - (y * z));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := N[(x * N[(1.0 - N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
code[x_, y_, z_] := If[LessEqual[N[(y * z), $MachinePrecision], -5e+198], N[(x - N[(y * N[(z * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(1.0 - N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
x \cdot \left(1 - y \cdot z\right)
\begin{array}{l}
\mathbf{if}\;y \cdot z \leq -5 \cdot 10^{+198}:\\
\;\;\;\;x - y \cdot \left(z \cdot x\right)\\

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


\end{array}

Error

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Split input into 2 regimes
  2. if (*.f64 y z) < -5.00000000000000049e198

    1. Initial program 27.1

      \[x \cdot \left(1 - y \cdot z\right) \]
    2. Applied egg-rr27.7

      \[\leadsto \color{blue}{{\left(\sqrt[3]{x \cdot \left(1 - y \cdot z\right)}\right)}^{3}} \]
    3. Applied egg-rr27.8

      \[\leadsto \color{blue}{{\left(\sqrt[3]{x}\right)}^{2} \cdot \left(\sqrt[3]{x} \cdot \left(1 - y \cdot z\right)\right)} \]
    4. Taylor expanded in y around 0 1.7

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

    if -5.00000000000000049e198 < (*.f64 y z)

    1. Initial program 1.8

      \[x \cdot \left(1 - y \cdot z\right) \]
  3. Recombined 2 regimes into one program.
  4. Final simplification1.8

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

Reproduce

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