
(FPCore (x y z) :precision binary64 (+ x (* (* (- y x) 6.0) z)))
double code(double x, double y, double z) {
return x + (((y - x) * 6.0) * 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 + (((y - x) * 6.0d0) * z)
end function
public static double code(double x, double y, double z) {
return x + (((y - x) * 6.0) * z);
}
def code(x, y, z): return x + (((y - x) * 6.0) * z)
function code(x, y, z) return Float64(x + Float64(Float64(Float64(y - x) * 6.0) * z)) end
function tmp = code(x, y, z) tmp = x + (((y - x) * 6.0) * z); end
code[x_, y_, z_] := N[(x + N[(N[(N[(y - x), $MachinePrecision] * 6.0), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(\left(y - x\right) \cdot 6\right) \cdot z
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 8 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z) :precision binary64 (+ x (* (* (- y x) 6.0) z)))
double code(double x, double y, double z) {
return x + (((y - x) * 6.0) * 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 + (((y - x) * 6.0d0) * z)
end function
public static double code(double x, double y, double z) {
return x + (((y - x) * 6.0) * z);
}
def code(x, y, z): return x + (((y - x) * 6.0) * z)
function code(x, y, z) return Float64(x + Float64(Float64(Float64(y - x) * 6.0) * z)) end
function tmp = code(x, y, z) tmp = x + (((y - x) * 6.0) * z); end
code[x_, y_, z_] := N[(x + N[(N[(N[(y - x), $MachinePrecision] * 6.0), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(\left(y - x\right) \cdot 6\right) \cdot z
\end{array}
(FPCore (x y z) :precision binary64 (fma (* (- y x) z) 6.0 x))
double code(double x, double y, double z) {
return fma(((y - x) * z), 6.0, x);
}
function code(x, y, z) return fma(Float64(Float64(y - x) * z), 6.0, x) end
code[x_, y_, z_] := N[(N[(N[(y - x), $MachinePrecision] * z), $MachinePrecision] * 6.0 + x), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(\left(y - x\right) \cdot z, 6, x\right)
\end{array}
Initial program 99.5%
+-commutativeN/A
associate-*l*N/A
*-commutativeN/A
associate-*r*N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
--lowering--.f6499.8
Applied egg-rr99.8%
(FPCore (x y z)
:precision binary64
(if (<= z -3.5e-38)
(* 6.0 (* y z))
(if (<= z 2.2e-127)
x
(if (<= z 1.2e+78) (* z (* y 6.0)) (* x (* z -6.0))))))
double code(double x, double y, double z) {
double tmp;
if (z <= -3.5e-38) {
tmp = 6.0 * (y * z);
} else if (z <= 2.2e-127) {
tmp = x;
} else if (z <= 1.2e+78) {
tmp = z * (y * 6.0);
} else {
tmp = x * (z * -6.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 <= (-3.5d-38)) then
tmp = 6.0d0 * (y * z)
else if (z <= 2.2d-127) then
tmp = x
else if (z <= 1.2d+78) then
tmp = z * (y * 6.0d0)
else
tmp = x * (z * (-6.0d0))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -3.5e-38) {
tmp = 6.0 * (y * z);
} else if (z <= 2.2e-127) {
tmp = x;
} else if (z <= 1.2e+78) {
tmp = z * (y * 6.0);
} else {
tmp = x * (z * -6.0);
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -3.5e-38: tmp = 6.0 * (y * z) elif z <= 2.2e-127: tmp = x elif z <= 1.2e+78: tmp = z * (y * 6.0) else: tmp = x * (z * -6.0) return tmp
function code(x, y, z) tmp = 0.0 if (z <= -3.5e-38) tmp = Float64(6.0 * Float64(y * z)); elseif (z <= 2.2e-127) tmp = x; elseif (z <= 1.2e+78) tmp = Float64(z * Float64(y * 6.0)); else tmp = Float64(x * Float64(z * -6.0)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -3.5e-38) tmp = 6.0 * (y * z); elseif (z <= 2.2e-127) tmp = x; elseif (z <= 1.2e+78) tmp = z * (y * 6.0); else tmp = x * (z * -6.0); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -3.5e-38], N[(6.0 * N[(y * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.2e-127], x, If[LessEqual[z, 1.2e+78], N[(z * N[(y * 6.0), $MachinePrecision]), $MachinePrecision], N[(x * N[(z * -6.0), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.5 \cdot 10^{-38}:\\
\;\;\;\;6 \cdot \left(y \cdot z\right)\\
\mathbf{elif}\;z \leq 2.2 \cdot 10^{-127}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 1.2 \cdot 10^{+78}:\\
\;\;\;\;z \cdot \left(y \cdot 6\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(z \cdot -6\right)\\
\end{array}
\end{array}
if z < -3.5000000000000001e-38Initial program 98.5%
Taylor expanded in x around 0
*-lowering-*.f64N/A
*-lowering-*.f6462.6
Simplified62.6%
if -3.5000000000000001e-38 < z < 2.2000000000000001e-127Initial program 99.9%
Taylor expanded in z around 0
Simplified83.5%
if 2.2000000000000001e-127 < z < 1.1999999999999999e78Initial program 99.8%
+-commutativeN/A
associate-*l*N/A
*-commutativeN/A
associate-*r*N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
--lowering--.f6499.7
Applied egg-rr99.7%
Taylor expanded in y around inf
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f6458.9
Simplified58.9%
if 1.1999999999999999e78 < z Initial program 99.7%
Taylor expanded in x around inf
+-commutativeN/A
distribute-rgt-inN/A
*-commutativeN/A
associate-*l*N/A
*-lft-identityN/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
*-lowering-*.f6470.9
Simplified70.9%
Taylor expanded in z around inf
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f6471.0
Simplified71.0%
Final simplification71.6%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* 6.0 (* y z))))
(if (<= z -5.8e-43)
t_0
(if (<= z 2.2e-127) x (if (<= z 1.6e+77) t_0 (* x (* z -6.0)))))))
double code(double x, double y, double z) {
double t_0 = 6.0 * (y * z);
double tmp;
if (z <= -5.8e-43) {
tmp = t_0;
} else if (z <= 2.2e-127) {
tmp = x;
} else if (z <= 1.6e+77) {
tmp = t_0;
} else {
tmp = x * (z * -6.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) :: tmp
t_0 = 6.0d0 * (y * z)
if (z <= (-5.8d-43)) then
tmp = t_0
else if (z <= 2.2d-127) then
tmp = x
else if (z <= 1.6d+77) then
tmp = t_0
else
tmp = x * (z * (-6.0d0))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = 6.0 * (y * z);
double tmp;
if (z <= -5.8e-43) {
tmp = t_0;
} else if (z <= 2.2e-127) {
tmp = x;
} else if (z <= 1.6e+77) {
tmp = t_0;
} else {
tmp = x * (z * -6.0);
}
return tmp;
}
def code(x, y, z): t_0 = 6.0 * (y * z) tmp = 0 if z <= -5.8e-43: tmp = t_0 elif z <= 2.2e-127: tmp = x elif z <= 1.6e+77: tmp = t_0 else: tmp = x * (z * -6.0) return tmp
function code(x, y, z) t_0 = Float64(6.0 * Float64(y * z)) tmp = 0.0 if (z <= -5.8e-43) tmp = t_0; elseif (z <= 2.2e-127) tmp = x; elseif (z <= 1.6e+77) tmp = t_0; else tmp = Float64(x * Float64(z * -6.0)); end return tmp end
function tmp_2 = code(x, y, z) t_0 = 6.0 * (y * z); tmp = 0.0; if (z <= -5.8e-43) tmp = t_0; elseif (z <= 2.2e-127) tmp = x; elseif (z <= 1.6e+77) tmp = t_0; else tmp = x * (z * -6.0); end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(6.0 * N[(y * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -5.8e-43], t$95$0, If[LessEqual[z, 2.2e-127], x, If[LessEqual[z, 1.6e+77], t$95$0, N[(x * N[(z * -6.0), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 6 \cdot \left(y \cdot z\right)\\
\mathbf{if}\;z \leq -5.8 \cdot 10^{-43}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;z \leq 2.2 \cdot 10^{-127}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 1.6 \cdot 10^{+77}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(z \cdot -6\right)\\
\end{array}
\end{array}
if z < -5.8000000000000003e-43 or 2.2000000000000001e-127 < z < 1.6000000000000001e77Initial program 99.0%
Taylor expanded in x around 0
*-lowering-*.f64N/A
*-lowering-*.f6461.2
Simplified61.2%
if -5.8000000000000003e-43 < z < 2.2000000000000001e-127Initial program 99.9%
Taylor expanded in z around 0
Simplified83.5%
if 1.6000000000000001e77 < z Initial program 99.7%
Taylor expanded in x around inf
+-commutativeN/A
distribute-rgt-inN/A
*-commutativeN/A
associate-*l*N/A
*-lft-identityN/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
*-lowering-*.f6470.9
Simplified70.9%
Taylor expanded in z around inf
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f6471.0
Simplified71.0%
Final simplification71.6%
(FPCore (x y z) :precision binary64 (let* ((t_0 (* (- x y) (* z -6.0)))) (if (<= z -0.17) t_0 (if (<= z 1.95e-11) (fma (* z 6.0) y x) t_0))))
double code(double x, double y, double z) {
double t_0 = (x - y) * (z * -6.0);
double tmp;
if (z <= -0.17) {
tmp = t_0;
} else if (z <= 1.95e-11) {
tmp = fma((z * 6.0), y, x);
} else {
tmp = t_0;
}
return tmp;
}
function code(x, y, z) t_0 = Float64(Float64(x - y) * Float64(z * -6.0)) tmp = 0.0 if (z <= -0.17) tmp = t_0; elseif (z <= 1.95e-11) tmp = fma(Float64(z * 6.0), y, x); else tmp = t_0; end return tmp end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(x - y), $MachinePrecision] * N[(z * -6.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -0.17], t$95$0, If[LessEqual[z, 1.95e-11], N[(N[(z * 6.0), $MachinePrecision] * y + x), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(x - y\right) \cdot \left(z \cdot -6\right)\\
\mathbf{if}\;z \leq -0.17:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;z \leq 1.95 \cdot 10^{-11}:\\
\;\;\;\;\mathsf{fma}\left(z \cdot 6, y, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if z < -0.170000000000000012 or 1.95000000000000005e-11 < z Initial program 99.8%
Taylor expanded in z around inf
associate-*r*N/A
distribute-lft-out--N/A
associate-*r*N/A
*-commutativeN/A
metadata-evalN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
metadata-evalN/A
distribute-lft-neg-inN/A
distribute-rgt-neg-inN/A
distribute-lft-neg-inN/A
mul-1-negN/A
distribute-rgt-out--N/A
distribute-lft-out--N/A
neg-mul-1N/A
neg-sub0N/A
associate-+l-N/A
neg-sub0N/A
mul-1-negN/A
*-lft-identityN/A
*-inversesN/A
associate-*l/N/A
associate-*r/N/A
associate-*r/N/A
*-rgt-identityN/A
Simplified99.1%
if -0.170000000000000012 < z < 1.95000000000000005e-11Initial program 99.2%
Taylor expanded in y around inf
Simplified99.1%
+-commutativeN/A
associate-*l*N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
*-lowering-*.f6499.8
Applied egg-rr99.8%
Final simplification99.4%
(FPCore (x y z) :precision binary64 (if (<= x -6100.0) (fma z (* x -6.0) x) (if (<= x 3.25e-38) (fma (* z 6.0) y x) (fma (* x z) -6.0 x))))
double code(double x, double y, double z) {
double tmp;
if (x <= -6100.0) {
tmp = fma(z, (x * -6.0), x);
} else if (x <= 3.25e-38) {
tmp = fma((z * 6.0), y, x);
} else {
tmp = fma((x * z), -6.0, x);
}
return tmp;
}
function code(x, y, z) tmp = 0.0 if (x <= -6100.0) tmp = fma(z, Float64(x * -6.0), x); elseif (x <= 3.25e-38) tmp = fma(Float64(z * 6.0), y, x); else tmp = fma(Float64(x * z), -6.0, x); end return tmp end
code[x_, y_, z_] := If[LessEqual[x, -6100.0], N[(z * N[(x * -6.0), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[x, 3.25e-38], N[(N[(z * 6.0), $MachinePrecision] * y + x), $MachinePrecision], N[(N[(x * z), $MachinePrecision] * -6.0 + x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -6100:\\
\;\;\;\;\mathsf{fma}\left(z, x \cdot -6, x\right)\\
\mathbf{elif}\;x \leq 3.25 \cdot 10^{-38}:\\
\;\;\;\;\mathsf{fma}\left(z \cdot 6, y, x\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(x \cdot z, -6, x\right)\\
\end{array}
\end{array}
if x < -6100Initial program 100.0%
Taylor expanded in x around inf
+-commutativeN/A
distribute-rgt-inN/A
*-commutativeN/A
associate-*l*N/A
*-lft-identityN/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
*-lowering-*.f6491.5
Simplified91.5%
if -6100 < x < 3.24999999999999975e-38Initial program 99.0%
Taylor expanded in y around inf
Simplified90.2%
+-commutativeN/A
associate-*l*N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
*-lowering-*.f6491.0
Applied egg-rr91.0%
if 3.24999999999999975e-38 < x Initial program 99.9%
Taylor expanded in x around inf
+-commutativeN/A
distribute-rgt-inN/A
*-commutativeN/A
associate-*l*N/A
*-lft-identityN/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
*-lowering-*.f6487.5
Simplified87.5%
associate-*r*N/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
*-lowering-*.f6487.5
Applied egg-rr87.5%
(FPCore (x y z) :precision binary64 (if (<= y -1.6e+72) (* y (* z 6.0)) (if (<= y 1.02e+86) (fma z (* x -6.0) x) (* 6.0 (* y z)))))
double code(double x, double y, double z) {
double tmp;
if (y <= -1.6e+72) {
tmp = y * (z * 6.0);
} else if (y <= 1.02e+86) {
tmp = fma(z, (x * -6.0), x);
} else {
tmp = 6.0 * (y * z);
}
return tmp;
}
function code(x, y, z) tmp = 0.0 if (y <= -1.6e+72) tmp = Float64(y * Float64(z * 6.0)); elseif (y <= 1.02e+86) tmp = fma(z, Float64(x * -6.0), x); else tmp = Float64(6.0 * Float64(y * z)); end return tmp end
code[x_, y_, z_] := If[LessEqual[y, -1.6e+72], N[(y * N[(z * 6.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.02e+86], N[(z * N[(x * -6.0), $MachinePrecision] + x), $MachinePrecision], N[(6.0 * N[(y * z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.6 \cdot 10^{+72}:\\
\;\;\;\;y \cdot \left(z \cdot 6\right)\\
\mathbf{elif}\;y \leq 1.02 \cdot 10^{+86}:\\
\;\;\;\;\mathsf{fma}\left(z, x \cdot -6, x\right)\\
\mathbf{else}:\\
\;\;\;\;6 \cdot \left(y \cdot z\right)\\
\end{array}
\end{array}
if y < -1.6000000000000001e72Initial program 97.1%
Taylor expanded in x around 0
*-lowering-*.f64N/A
*-lowering-*.f6480.4
Simplified80.4%
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6480.5
Applied egg-rr80.5%
if -1.6000000000000001e72 < y < 1.01999999999999996e86Initial program 99.9%
Taylor expanded in x around inf
+-commutativeN/A
distribute-rgt-inN/A
*-commutativeN/A
associate-*l*N/A
*-lft-identityN/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
*-lowering-*.f6482.4
Simplified82.4%
if 1.01999999999999996e86 < y Initial program 99.8%
Taylor expanded in x around 0
*-lowering-*.f64N/A
*-lowering-*.f6473.4
Simplified73.4%
Final simplification80.1%
(FPCore (x y z) :precision binary64 (let* ((t_0 (* 6.0 (* y z)))) (if (<= z -8.5e-45) t_0 (if (<= z 2.2e-127) x t_0))))
double code(double x, double y, double z) {
double t_0 = 6.0 * (y * z);
double tmp;
if (z <= -8.5e-45) {
tmp = t_0;
} else if (z <= 2.2e-127) {
tmp = x;
} 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) :: tmp
t_0 = 6.0d0 * (y * z)
if (z <= (-8.5d-45)) then
tmp = t_0
else if (z <= 2.2d-127) then
tmp = x
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = 6.0 * (y * z);
double tmp;
if (z <= -8.5e-45) {
tmp = t_0;
} else if (z <= 2.2e-127) {
tmp = x;
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y, z): t_0 = 6.0 * (y * z) tmp = 0 if z <= -8.5e-45: tmp = t_0 elif z <= 2.2e-127: tmp = x else: tmp = t_0 return tmp
function code(x, y, z) t_0 = Float64(6.0 * Float64(y * z)) tmp = 0.0 if (z <= -8.5e-45) tmp = t_0; elseif (z <= 2.2e-127) tmp = x; else tmp = t_0; end return tmp end
function tmp_2 = code(x, y, z) t_0 = 6.0 * (y * z); tmp = 0.0; if (z <= -8.5e-45) tmp = t_0; elseif (z <= 2.2e-127) tmp = x; else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(6.0 * N[(y * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -8.5e-45], t$95$0, If[LessEqual[z, 2.2e-127], x, t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 6 \cdot \left(y \cdot z\right)\\
\mathbf{if}\;z \leq -8.5 \cdot 10^{-45}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;z \leq 2.2 \cdot 10^{-127}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if z < -8.50000000000000041e-45 or 2.2000000000000001e-127 < z Initial program 99.2%
Taylor expanded in x around 0
*-lowering-*.f64N/A
*-lowering-*.f6453.3
Simplified53.3%
if -8.50000000000000041e-45 < z < 2.2000000000000001e-127Initial program 99.9%
Taylor expanded in z around 0
Simplified83.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 99.5%
Taylor expanded in z around 0
Simplified39.1%
(FPCore (x y z) :precision binary64 (- x (* (* 6.0 z) (- x y))))
double code(double x, double y, double z) {
return x - ((6.0 * z) * (x - y));
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = x - ((6.0d0 * z) * (x - y))
end function
public static double code(double x, double y, double z) {
return x - ((6.0 * z) * (x - y));
}
def code(x, y, z): return x - ((6.0 * z) * (x - y))
function code(x, y, z) return Float64(x - Float64(Float64(6.0 * z) * Float64(x - y))) end
function tmp = code(x, y, z) tmp = x - ((6.0 * z) * (x - y)); end
code[x_, y_, z_] := N[(x - N[(N[(6.0 * z), $MachinePrecision] * N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x - \left(6 \cdot z\right) \cdot \left(x - y\right)
\end{array}
herbie shell --seed 2024204
(FPCore (x y z)
:name "Data.Colour.RGBSpace.HSL:hsl from colour-2.3.3, E"
:precision binary64
:alt
(! :herbie-platform default (- x (* (* 6 z) (- x y))))
(+ x (* (* (- y x) 6.0) z)))