
(FPCore (x y z) :precision binary64 (* x (- 1.0 (* (- 1.0 y) z))))
double code(double x, double y, double z) {
return x * (1.0 - ((1.0 - y) * z));
}
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
public static double code(double x, double y, double z) {
return x * (1.0 - ((1.0 - y) * z));
}
def code(x, y, z): return x * (1.0 - ((1.0 - y) * z))
function code(x, y, z) return Float64(x * Float64(1.0 - Float64(Float64(1.0 - y) * z))) end
function tmp = code(x, y, z) tmp = x * (1.0 - ((1.0 - y) * z)); end
code[x_, y_, z_] := N[(x * N[(1.0 - N[(N[(1.0 - y), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x \cdot \left(1 - \left(1 - y\right) \cdot z\right)
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 7 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z) :precision binary64 (* x (- 1.0 (* (- 1.0 y) z))))
double code(double x, double y, double z) {
return x * (1.0 - ((1.0 - y) * z));
}
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
public static double code(double x, double y, double z) {
return x * (1.0 - ((1.0 - y) * z));
}
def code(x, y, z): return x * (1.0 - ((1.0 - y) * z))
function code(x, y, z) return Float64(x * Float64(1.0 - Float64(Float64(1.0 - y) * z))) end
function tmp = code(x, y, z) tmp = x * (1.0 - ((1.0 - y) * z)); end
code[x_, y_, z_] := N[(x * N[(1.0 - N[(N[(1.0 - y), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x \cdot \left(1 - \left(1 - y\right) \cdot z\right)
\end{array}
(FPCore (x y z) :precision binary64 (if (<= z -12000.0) (* z (- (* y x) x)) (if (<= z 1.0) (* x (+ 1.0 (* y z))) (* (* x z) (+ y -1.0)))))
double code(double x, double y, double z) {
double tmp;
if (z <= -12000.0) {
tmp = z * ((y * x) - x);
} else if (z <= 1.0) {
tmp = x * (1.0 + (y * z));
} else {
tmp = (x * z) * (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
real(8) :: tmp
if (z <= (-12000.0d0)) then
tmp = z * ((y * x) - x)
else if (z <= 1.0d0) then
tmp = x * (1.0d0 + (y * z))
else
tmp = (x * z) * (y + (-1.0d0))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -12000.0) {
tmp = z * ((y * x) - x);
} else if (z <= 1.0) {
tmp = x * (1.0 + (y * z));
} else {
tmp = (x * z) * (y + -1.0);
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -12000.0: tmp = z * ((y * x) - x) elif z <= 1.0: tmp = x * (1.0 + (y * z)) else: tmp = (x * z) * (y + -1.0) return tmp
function code(x, y, z) tmp = 0.0 if (z <= -12000.0) tmp = Float64(z * Float64(Float64(y * x) - x)); elseif (z <= 1.0) tmp = Float64(x * Float64(1.0 + Float64(y * z))); else tmp = Float64(Float64(x * z) * Float64(y + -1.0)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -12000.0) tmp = z * ((y * x) - x); elseif (z <= 1.0) tmp = x * (1.0 + (y * z)); else tmp = (x * z) * (y + -1.0); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -12000.0], N[(z * N[(N[(y * x), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.0], N[(x * N[(1.0 + N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * z), $MachinePrecision] * N[(y + -1.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -12000:\\
\;\;\;\;z \cdot \left(y \cdot x - x\right)\\
\mathbf{elif}\;z \leq 1:\\
\;\;\;\;x \cdot \left(1 + y \cdot z\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x \cdot z\right) \cdot \left(y + -1\right)\\
\end{array}
\end{array}
if z < -12000Initial program 94.1%
Taylor expanded in z around inf 100.0%
*-commutative100.0%
sub-neg100.0%
metadata-eval100.0%
distribute-rgt-in100.0%
neg-mul-1100.0%
unsub-neg100.0%
Simplified100.0%
if -12000 < z < 1Initial program 99.9%
distribute-rgt-out--99.9%
*-lft-identity99.9%
cancel-sign-sub-inv99.9%
+-commutative99.9%
distribute-lft-neg-in99.9%
associate-*l*97.0%
fma-def97.0%
neg-sub097.0%
associate--r-97.0%
metadata-eval97.0%
+-commutative97.0%
*-commutative97.0%
Simplified97.0%
fma-udef97.0%
associate-*r*91.3%
Applied egg-rr91.3%
Taylor expanded in y around inf 90.2%
Taylor expanded in x around 0 98.9%
if 1 < z Initial program 92.6%
Taylor expanded in z around inf 99.6%
*-commutative99.6%
associate-*l*99.7%
sub-neg99.7%
metadata-eval99.7%
*-commutative99.7%
Simplified99.7%
Final simplification99.3%
(FPCore (x y z) :precision binary64 (fma (+ y -1.0) (* x z) x))
double code(double x, double y, double z) {
return fma((y + -1.0), (x * z), x);
}
function code(x, y, z) return fma(Float64(y + -1.0), Float64(x * z), x) end
code[x_, y_, z_] := N[(N[(y + -1.0), $MachinePrecision] * N[(x * z), $MachinePrecision] + x), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(y + -1, x \cdot z, x\right)
\end{array}
Initial program 96.6%
distribute-rgt-out--96.6%
*-lft-identity96.6%
cancel-sign-sub-inv96.6%
+-commutative96.6%
distribute-lft-neg-in96.6%
associate-*l*98.5%
fma-def98.5%
neg-sub098.5%
associate--r-98.5%
metadata-eval98.5%
+-commutative98.5%
*-commutative98.5%
Simplified98.5%
Final simplification98.5%
(FPCore (x y z) :precision binary64 (let* ((t_0 (* x (+ 1.0 (* z (+ y -1.0)))))) (if (<= t_0 (- INFINITY)) (* (* x z) (+ y -1.0)) t_0)))
double code(double x, double y, double z) {
double t_0 = x * (1.0 + (z * (y + -1.0)));
double tmp;
if (t_0 <= -((double) INFINITY)) {
tmp = (x * z) * (y + -1.0);
} else {
tmp = t_0;
}
return tmp;
}
public static double code(double x, double y, double z) {
double t_0 = x * (1.0 + (z * (y + -1.0)));
double tmp;
if (t_0 <= -Double.POSITIVE_INFINITY) {
tmp = (x * z) * (y + -1.0);
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y, z): t_0 = x * (1.0 + (z * (y + -1.0))) tmp = 0 if t_0 <= -math.inf: tmp = (x * z) * (y + -1.0) else: tmp = t_0 return tmp
function code(x, y, z) t_0 = Float64(x * Float64(1.0 + Float64(z * Float64(y + -1.0)))) tmp = 0.0 if (t_0 <= Float64(-Inf)) tmp = Float64(Float64(x * z) * Float64(y + -1.0)); else tmp = t_0; end return tmp end
function tmp_2 = code(x, y, z) t_0 = x * (1.0 + (z * (y + -1.0))); tmp = 0.0; if (t_0 <= -Inf) tmp = (x * z) * (y + -1.0); else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(x * N[(1.0 + N[(z * N[(y + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, (-Infinity)], N[(N[(x * z), $MachinePrecision] * N[(y + -1.0), $MachinePrecision]), $MachinePrecision], t$95$0]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \left(1 + z \cdot \left(y + -1\right)\right)\\
\mathbf{if}\;t_0 \leq -\infty:\\
\;\;\;\;\left(x \cdot z\right) \cdot \left(y + -1\right)\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\end{array}
if (*.f64 x (-.f64 1 (*.f64 (-.f64 1 y) z))) < -inf.0Initial program 85.7%
Taylor expanded in z around inf 100.0%
*-commutative100.0%
associate-*l*100.0%
sub-neg100.0%
metadata-eval100.0%
*-commutative100.0%
Simplified100.0%
if -inf.0 < (*.f64 x (-.f64 1 (*.f64 (-.f64 1 y) z))) Initial program 98.6%
Final simplification98.8%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* x (- z))) (t_1 (* y (* x z))))
(if (<= z -7e+249)
t_0
(if (<= z -1.45e-48)
t_1
(if (<= z 2.9e-7) x (if (<= z 7.2e+208) t_1 t_0))))))
double code(double x, double y, double z) {
double t_0 = x * -z;
double t_1 = y * (x * z);
double tmp;
if (z <= -7e+249) {
tmp = t_0;
} else if (z <= -1.45e-48) {
tmp = t_1;
} else if (z <= 2.9e-7) {
tmp = x;
} else if (z <= 7.2e+208) {
tmp = t_1;
} else {
tmp = t_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
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = x * -z
t_1 = y * (x * z)
if (z <= (-7d+249)) then
tmp = t_0
else if (z <= (-1.45d-48)) then
tmp = t_1
else if (z <= 2.9d-7) then
tmp = x
else if (z <= 7.2d+208) then
tmp = t_1
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = x * -z;
double t_1 = y * (x * z);
double tmp;
if (z <= -7e+249) {
tmp = t_0;
} else if (z <= -1.45e-48) {
tmp = t_1;
} else if (z <= 2.9e-7) {
tmp = x;
} else if (z <= 7.2e+208) {
tmp = t_1;
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y, z): t_0 = x * -z t_1 = y * (x * z) tmp = 0 if z <= -7e+249: tmp = t_0 elif z <= -1.45e-48: tmp = t_1 elif z <= 2.9e-7: tmp = x elif z <= 7.2e+208: tmp = t_1 else: tmp = t_0 return tmp
function code(x, y, z) t_0 = Float64(x * Float64(-z)) t_1 = Float64(y * Float64(x * z)) tmp = 0.0 if (z <= -7e+249) tmp = t_0; elseif (z <= -1.45e-48) tmp = t_1; elseif (z <= 2.9e-7) tmp = x; elseif (z <= 7.2e+208) tmp = t_1; else tmp = t_0; end return tmp end
function tmp_2 = code(x, y, z) t_0 = x * -z; t_1 = y * (x * z); tmp = 0.0; if (z <= -7e+249) tmp = t_0; elseif (z <= -1.45e-48) tmp = t_1; elseif (z <= 2.9e-7) tmp = x; elseif (z <= 7.2e+208) tmp = t_1; else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(x * (-z)), $MachinePrecision]}, Block[{t$95$1 = N[(y * N[(x * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -7e+249], t$95$0, If[LessEqual[z, -1.45e-48], t$95$1, If[LessEqual[z, 2.9e-7], x, If[LessEqual[z, 7.2e+208], t$95$1, t$95$0]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \left(-z\right)\\
t_1 := y \cdot \left(x \cdot z\right)\\
\mathbf{if}\;z \leq -7 \cdot 10^{+249}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq -1.45 \cdot 10^{-48}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 2.9 \cdot 10^{-7}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 7.2 \cdot 10^{+208}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\end{array}
if z < -7.00000000000000024e249 or 7.20000000000000005e208 < z Initial program 96.9%
Taylor expanded in z around inf 99.9%
*-commutative99.9%
associate-*l*99.9%
sub-neg99.9%
metadata-eval99.9%
*-commutative99.9%
Simplified99.9%
Taylor expanded in y around 0 75.8%
mul-1-neg75.8%
distribute-rgt-neg-in75.8%
Simplified75.8%
if -7.00000000000000024e249 < z < -1.4500000000000001e-48 or 2.8999999999999998e-7 < z < 7.20000000000000005e208Initial program 93.2%
Taylor expanded in y around inf 64.3%
if -1.4500000000000001e-48 < z < 2.8999999999999998e-7Initial program 99.9%
Taylor expanded in z around 0 85.4%
Final simplification75.1%
(FPCore (x y z) :precision binary64 (if (<= y -1.5e+68) (* z (* y x)) (if (<= y 1.35e+21) (- x (* x z)) (* y (* x z)))))
double code(double x, double y, double z) {
double tmp;
if (y <= -1.5e+68) {
tmp = z * (y * x);
} else if (y <= 1.35e+21) {
tmp = x - (x * z);
} else {
tmp = y * (x * 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
real(8) :: tmp
if (y <= (-1.5d+68)) then
tmp = z * (y * x)
else if (y <= 1.35d+21) then
tmp = x - (x * z)
else
tmp = y * (x * z)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (y <= -1.5e+68) {
tmp = z * (y * x);
} else if (y <= 1.35e+21) {
tmp = x - (x * z);
} else {
tmp = y * (x * z);
}
return tmp;
}
def code(x, y, z): tmp = 0 if y <= -1.5e+68: tmp = z * (y * x) elif y <= 1.35e+21: tmp = x - (x * z) else: tmp = y * (x * z) return tmp
function code(x, y, z) tmp = 0.0 if (y <= -1.5e+68) tmp = Float64(z * Float64(y * x)); elseif (y <= 1.35e+21) tmp = Float64(x - Float64(x * z)); else tmp = Float64(y * Float64(x * z)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (y <= -1.5e+68) tmp = z * (y * x); elseif (y <= 1.35e+21) tmp = x - (x * z); else tmp = y * (x * z); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[y, -1.5e+68], N[(z * N[(y * x), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.35e+21], N[(x - N[(x * z), $MachinePrecision]), $MachinePrecision], N[(y * N[(x * z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.5 \cdot 10^{+68}:\\
\;\;\;\;z \cdot \left(y \cdot x\right)\\
\mathbf{elif}\;y \leq 1.35 \cdot 10^{+21}:\\
\;\;\;\;x - x \cdot z\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(x \cdot z\right)\\
\end{array}
\end{array}
if y < -1.5000000000000001e68Initial program 92.7%
Taylor expanded in y around inf 86.4%
associate-*r*86.3%
*-commutative86.3%
associate-*l*88.7%
Simplified88.7%
if -1.5000000000000001e68 < y < 1.35e21Initial program 100.0%
Taylor expanded in y around 0 97.0%
*-commutative97.0%
distribute-rgt-out--97.0%
*-lft-identity97.0%
Simplified97.0%
if 1.35e21 < y Initial program 89.8%
Taylor expanded in y around inf 83.5%
Final simplification92.8%
(FPCore (x y z) :precision binary64 (if (or (<= z -9e-5) (not (<= z 1.0))) (* x (- z)) x))
double code(double x, double y, double z) {
double tmp;
if ((z <= -9e-5) || !(z <= 1.0)) {
tmp = x * -z;
} else {
tmp = x;
}
return tmp;
}
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 ((z <= (-9d-5)) .or. (.not. (z <= 1.0d0))) then
tmp = x * -z
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((z <= -9e-5) || !(z <= 1.0)) {
tmp = x * -z;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -9e-5) or not (z <= 1.0): tmp = x * -z else: tmp = x return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -9e-5) || !(z <= 1.0)) tmp = Float64(x * Float64(-z)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -9e-5) || ~((z <= 1.0))) tmp = x * -z; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -9e-5], N[Not[LessEqual[z, 1.0]], $MachinePrecision]], N[(x * (-z)), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -9 \cdot 10^{-5} \lor \neg \left(z \leq 1\right):\\
\;\;\;\;x \cdot \left(-z\right)\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -9.00000000000000057e-5 or 1 < z Initial program 93.5%
Taylor expanded in z around inf 99.8%
*-commutative99.8%
associate-*l*99.8%
sub-neg99.8%
metadata-eval99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in y around 0 54.2%
mul-1-neg54.2%
distribute-rgt-neg-in54.2%
Simplified54.2%
if -9.00000000000000057e-5 < z < 1Initial program 99.9%
Taylor expanded in z around 0 81.2%
Final simplification67.5%
(FPCore (x y z) :precision binary64 x)
double code(double x, double y, double z) {
return x;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = x
end function
public static double code(double x, double y, double z) {
return x;
}
def code(x, y, z): return x
function code(x, y, z) return x end
function tmp = code(x, y, z) tmp = x; end
code[x_, y_, z_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 96.6%
Taylor expanded in z around 0 41.5%
Final simplification41.5%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* x (- 1.0 (* (- 1.0 y) z))))
(t_1 (+ x (* (- 1.0 y) (* (- z) x)))))
(if (< t_0 -1.618195973607049e+50)
t_1
(if (< t_0 3.892237649663903e+134) (- (* (* x y) z) (- (* x z) x)) t_1))))
double code(double x, double y, double z) {
double t_0 = x * (1.0 - ((1.0 - y) * z));
double t_1 = x + ((1.0 - y) * (-z * x));
double tmp;
if (t_0 < -1.618195973607049e+50) {
tmp = t_1;
} else if (t_0 < 3.892237649663903e+134) {
tmp = ((x * y) * z) - ((x * z) - x);
} else {
tmp = t_1;
}
return tmp;
}
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) :: t_1
real(8) :: tmp
t_0 = x * (1.0d0 - ((1.0d0 - y) * z))
t_1 = x + ((1.0d0 - y) * (-z * x))
if (t_0 < (-1.618195973607049d+50)) then
tmp = t_1
else if (t_0 < 3.892237649663903d+134) then
tmp = ((x * y) * z) - ((x * z) - x)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = x * (1.0 - ((1.0 - y) * z));
double t_1 = x + ((1.0 - y) * (-z * x));
double tmp;
if (t_0 < -1.618195973607049e+50) {
tmp = t_1;
} else if (t_0 < 3.892237649663903e+134) {
tmp = ((x * y) * z) - ((x * z) - x);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z): t_0 = x * (1.0 - ((1.0 - y) * z)) t_1 = x + ((1.0 - y) * (-z * x)) tmp = 0 if t_0 < -1.618195973607049e+50: tmp = t_1 elif t_0 < 3.892237649663903e+134: tmp = ((x * y) * z) - ((x * z) - x) else: tmp = t_1 return tmp
function code(x, y, z) t_0 = Float64(x * Float64(1.0 - Float64(Float64(1.0 - y) * z))) t_1 = Float64(x + Float64(Float64(1.0 - y) * Float64(Float64(-z) * x))) tmp = 0.0 if (t_0 < -1.618195973607049e+50) tmp = t_1; elseif (t_0 < 3.892237649663903e+134) tmp = Float64(Float64(Float64(x * y) * z) - Float64(Float64(x * z) - x)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z) t_0 = x * (1.0 - ((1.0 - y) * z)); t_1 = x + ((1.0 - y) * (-z * x)); tmp = 0.0; if (t_0 < -1.618195973607049e+50) tmp = t_1; elseif (t_0 < 3.892237649663903e+134) tmp = ((x * y) * z) - ((x * z) - x); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(x * N[(1.0 - N[(N[(1.0 - y), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x + N[(N[(1.0 - y), $MachinePrecision] * N[((-z) * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[t$95$0, -1.618195973607049e+50], t$95$1, If[Less[t$95$0, 3.892237649663903e+134], N[(N[(N[(x * y), $MachinePrecision] * z), $MachinePrecision] - N[(N[(x * z), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \left(1 - \left(1 - y\right) \cdot z\right)\\
t_1 := x + \left(1 - y\right) \cdot \left(\left(-z\right) \cdot x\right)\\
\mathbf{if}\;t_0 < -1.618195973607049 \cdot 10^{+50}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t_0 < 3.892237649663903 \cdot 10^{+134}:\\
\;\;\;\;\left(x \cdot y\right) \cdot z - \left(x \cdot z - x\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
herbie shell --seed 2023224
(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))))