
(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 9 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 z (* (- x y) -6.0) x))
double code(double x, double y, double z) {
return fma(z, ((x - y) * -6.0), x);
}
function code(x, y, z) return fma(z, Float64(Float64(x - y) * -6.0), x) end
code[x_, y_, z_] := N[(z * N[(N[(x - y), $MachinePrecision] * -6.0), $MachinePrecision] + x), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(z, \left(x - y\right) \cdot -6, x\right)
\end{array}
Initial program 99.9%
+-commutative99.9%
*-commutative99.9%
fma-def99.9%
remove-double-neg99.9%
distribute-lft-neg-in99.9%
distribute-rgt-neg-in99.9%
sub-neg99.9%
distribute-neg-in99.9%
remove-double-neg99.9%
+-commutative99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Final simplification99.9%
(FPCore (x y z) :precision binary64 (if (or (<= z -4.5e-5) (not (<= z 6.4e-68))) (* -6.0 (* z (- x y))) x))
double code(double x, double y, double z) {
double tmp;
if ((z <= -4.5e-5) || !(z <= 6.4e-68)) {
tmp = -6.0 * (z * (x - y));
} 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 <= (-4.5d-5)) .or. (.not. (z <= 6.4d-68))) then
tmp = (-6.0d0) * (z * (x - y))
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((z <= -4.5e-5) || !(z <= 6.4e-68)) {
tmp = -6.0 * (z * (x - y));
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -4.5e-5) or not (z <= 6.4e-68): tmp = -6.0 * (z * (x - y)) else: tmp = x return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -4.5e-5) || !(z <= 6.4e-68)) tmp = Float64(-6.0 * Float64(z * Float64(x - y))); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -4.5e-5) || ~((z <= 6.4e-68))) tmp = -6.0 * (z * (x - y)); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -4.5e-5], N[Not[LessEqual[z, 6.4e-68]], $MachinePrecision]], N[(-6.0 * N[(z * N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.5 \cdot 10^{-5} \lor \neg \left(z \leq 6.4 \cdot 10^{-68}\right):\\
\;\;\;\;-6 \cdot \left(z \cdot \left(x - y\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -4.50000000000000028e-5 or 6.3999999999999998e-68 < z Initial program 99.8%
+-commutative99.8%
*-commutative99.8%
fma-def99.8%
remove-double-neg99.8%
distribute-lft-neg-in99.8%
distribute-rgt-neg-in99.8%
sub-neg99.8%
distribute-neg-in99.8%
remove-double-neg99.8%
+-commutative99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in z around inf 96.0%
if -4.50000000000000028e-5 < z < 6.3999999999999998e-68Initial program 99.9%
Taylor expanded in z around 0 78.2%
Final simplification87.6%
(FPCore (x y z) :precision binary64 (if (or (<= z -47000.0) (not (<= z 3.05e-69))) (* -6.0 (* z (- x y))) (* x (+ 1.0 (* z -6.0)))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -47000.0) || !(z <= 3.05e-69)) {
tmp = -6.0 * (z * (x - y));
} else {
tmp = x * (1.0 + (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 <= (-47000.0d0)) .or. (.not. (z <= 3.05d-69))) then
tmp = (-6.0d0) * (z * (x - y))
else
tmp = x * (1.0d0 + (z * (-6.0d0)))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((z <= -47000.0) || !(z <= 3.05e-69)) {
tmp = -6.0 * (z * (x - y));
} else {
tmp = x * (1.0 + (z * -6.0));
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -47000.0) or not (z <= 3.05e-69): tmp = -6.0 * (z * (x - y)) else: tmp = x * (1.0 + (z * -6.0)) return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -47000.0) || !(z <= 3.05e-69)) tmp = Float64(-6.0 * Float64(z * Float64(x - y))); else tmp = Float64(x * Float64(1.0 + Float64(z * -6.0))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -47000.0) || ~((z <= 3.05e-69))) tmp = -6.0 * (z * (x - y)); else tmp = x * (1.0 + (z * -6.0)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -47000.0], N[Not[LessEqual[z, 3.05e-69]], $MachinePrecision]], N[(-6.0 * N[(z * N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(1.0 + N[(z * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -47000 \lor \neg \left(z \leq 3.05 \cdot 10^{-69}\right):\\
\;\;\;\;-6 \cdot \left(z \cdot \left(x - y\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(1 + z \cdot -6\right)\\
\end{array}
\end{array}
if z < -47000 or 3.0500000000000002e-69 < z Initial program 99.8%
+-commutative99.8%
*-commutative99.8%
fma-def99.8%
remove-double-neg99.8%
distribute-lft-neg-in99.8%
distribute-rgt-neg-in99.8%
sub-neg99.8%
distribute-neg-in99.8%
remove-double-neg99.8%
+-commutative99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in z around inf 96.9%
if -47000 < z < 3.0500000000000002e-69Initial program 99.9%
Taylor expanded in x around inf 79.1%
Final simplification88.3%
(FPCore (x y z) :precision binary64 (if (or (<= z -0.18) (not (<= z 0.17))) (* -6.0 (* z (- x y))) (+ x (* z (* y 6.0)))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -0.18) || !(z <= 0.17)) {
tmp = -6.0 * (z * (x - y));
} else {
tmp = x + (z * (y * 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 <= (-0.18d0)) .or. (.not. (z <= 0.17d0))) then
tmp = (-6.0d0) * (z * (x - y))
else
tmp = x + (z * (y * 6.0d0))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((z <= -0.18) || !(z <= 0.17)) {
tmp = -6.0 * (z * (x - y));
} else {
tmp = x + (z * (y * 6.0));
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -0.18) or not (z <= 0.17): tmp = -6.0 * (z * (x - y)) else: tmp = x + (z * (y * 6.0)) return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -0.18) || !(z <= 0.17)) tmp = Float64(-6.0 * Float64(z * Float64(x - y))); else tmp = Float64(x + Float64(z * Float64(y * 6.0))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -0.18) || ~((z <= 0.17))) tmp = -6.0 * (z * (x - y)); else tmp = x + (z * (y * 6.0)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -0.18], N[Not[LessEqual[z, 0.17]], $MachinePrecision]], N[(-6.0 * N[(z * N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(z * N[(y * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.18 \lor \neg \left(z \leq 0.17\right):\\
\;\;\;\;-6 \cdot \left(z \cdot \left(x - y\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x + z \cdot \left(y \cdot 6\right)\\
\end{array}
\end{array}
if z < -0.17999999999999999 or 0.170000000000000012 < z Initial program 99.8%
+-commutative99.8%
*-commutative99.8%
fma-def99.8%
remove-double-neg99.8%
distribute-lft-neg-in99.8%
distribute-rgt-neg-in99.8%
sub-neg99.8%
distribute-neg-in99.8%
remove-double-neg99.8%
+-commutative99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in z around inf 97.3%
if -0.17999999999999999 < z < 0.170000000000000012Initial program 99.9%
Taylor expanded in y around inf 98.9%
Final simplification98.1%
(FPCore (x y z) :precision binary64 (if (or (<= z -0.165) (not (<= z 5.6e-18))) (* -6.0 (* z x)) x))
double code(double x, double y, double z) {
double tmp;
if ((z <= -0.165) || !(z <= 5.6e-18)) {
tmp = -6.0 * (z * x);
} 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 <= (-0.165d0)) .or. (.not. (z <= 5.6d-18))) then
tmp = (-6.0d0) * (z * x)
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((z <= -0.165) || !(z <= 5.6e-18)) {
tmp = -6.0 * (z * x);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -0.165) or not (z <= 5.6e-18): tmp = -6.0 * (z * x) else: tmp = x return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -0.165) || !(z <= 5.6e-18)) tmp = Float64(-6.0 * Float64(z * x)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -0.165) || ~((z <= 5.6e-18))) tmp = -6.0 * (z * x); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -0.165], N[Not[LessEqual[z, 5.6e-18]], $MachinePrecision]], N[(-6.0 * N[(z * x), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.165 \lor \neg \left(z \leq 5.6 \cdot 10^{-18}\right):\\
\;\;\;\;-6 \cdot \left(z \cdot x\right)\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -0.165000000000000008 or 5.60000000000000025e-18 < z Initial program 99.8%
+-commutative99.8%
*-commutative99.8%
fma-def99.8%
remove-double-neg99.8%
distribute-lft-neg-in99.8%
distribute-rgt-neg-in99.8%
sub-neg99.8%
distribute-neg-in99.8%
remove-double-neg99.8%
+-commutative99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in z around inf 97.4%
Taylor expanded in x around inf 53.9%
if -0.165000000000000008 < z < 5.60000000000000025e-18Initial program 99.9%
Taylor expanded in z around 0 75.7%
Final simplification64.8%
(FPCore (x y z) :precision binary64 (if (<= z -0.165) (* x (* z -6.0)) (if (<= z 5.6e-18) x (* -6.0 (* z x)))))
double code(double x, double y, double z) {
double tmp;
if (z <= -0.165) {
tmp = x * (z * -6.0);
} else if (z <= 5.6e-18) {
tmp = x;
} else {
tmp = -6.0 * (z * 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 <= (-0.165d0)) then
tmp = x * (z * (-6.0d0))
else if (z <= 5.6d-18) then
tmp = x
else
tmp = (-6.0d0) * (z * x)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -0.165) {
tmp = x * (z * -6.0);
} else if (z <= 5.6e-18) {
tmp = x;
} else {
tmp = -6.0 * (z * x);
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -0.165: tmp = x * (z * -6.0) elif z <= 5.6e-18: tmp = x else: tmp = -6.0 * (z * x) return tmp
function code(x, y, z) tmp = 0.0 if (z <= -0.165) tmp = Float64(x * Float64(z * -6.0)); elseif (z <= 5.6e-18) tmp = x; else tmp = Float64(-6.0 * Float64(z * x)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -0.165) tmp = x * (z * -6.0); elseif (z <= 5.6e-18) tmp = x; else tmp = -6.0 * (z * x); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -0.165], N[(x * N[(z * -6.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.6e-18], x, N[(-6.0 * N[(z * x), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.165:\\
\;\;\;\;x \cdot \left(z \cdot -6\right)\\
\mathbf{elif}\;z \leq 5.6 \cdot 10^{-18}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;-6 \cdot \left(z \cdot x\right)\\
\end{array}
\end{array}
if z < -0.165000000000000008Initial program 99.8%
Taylor expanded in x around inf 51.2%
Taylor expanded in z around inf 48.8%
*-commutative48.8%
Simplified48.8%
if -0.165000000000000008 < z < 5.60000000000000025e-18Initial program 99.9%
Taylor expanded in z around 0 75.7%
if 5.60000000000000025e-18 < z Initial program 99.8%
+-commutative99.8%
*-commutative99.8%
fma-def99.8%
remove-double-neg99.8%
distribute-lft-neg-in99.8%
distribute-rgt-neg-in99.8%
sub-neg99.8%
distribute-neg-in99.8%
remove-double-neg99.8%
+-commutative99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in z around inf 98.3%
Taylor expanded in x around inf 60.4%
Final simplification64.8%
(FPCore (x y z) :precision binary64 (if (<= z -0.16) (* z (* x -6.0)) (if (<= z 5.6e-18) x (* -6.0 (* z x)))))
double code(double x, double y, double z) {
double tmp;
if (z <= -0.16) {
tmp = z * (x * -6.0);
} else if (z <= 5.6e-18) {
tmp = x;
} else {
tmp = -6.0 * (z * 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 <= (-0.16d0)) then
tmp = z * (x * (-6.0d0))
else if (z <= 5.6d-18) then
tmp = x
else
tmp = (-6.0d0) * (z * x)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -0.16) {
tmp = z * (x * -6.0);
} else if (z <= 5.6e-18) {
tmp = x;
} else {
tmp = -6.0 * (z * x);
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -0.16: tmp = z * (x * -6.0) elif z <= 5.6e-18: tmp = x else: tmp = -6.0 * (z * x) return tmp
function code(x, y, z) tmp = 0.0 if (z <= -0.16) tmp = Float64(z * Float64(x * -6.0)); elseif (z <= 5.6e-18) tmp = x; else tmp = Float64(-6.0 * Float64(z * x)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -0.16) tmp = z * (x * -6.0); elseif (z <= 5.6e-18) tmp = x; else tmp = -6.0 * (z * x); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -0.16], N[(z * N[(x * -6.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.6e-18], x, N[(-6.0 * N[(z * x), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.16:\\
\;\;\;\;z \cdot \left(x \cdot -6\right)\\
\mathbf{elif}\;z \leq 5.6 \cdot 10^{-18}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;-6 \cdot \left(z \cdot x\right)\\
\end{array}
\end{array}
if z < -0.160000000000000003Initial program 99.8%
+-commutative99.8%
*-commutative99.8%
fma-def99.8%
remove-double-neg99.8%
distribute-lft-neg-in99.8%
distribute-rgt-neg-in99.8%
sub-neg99.8%
distribute-neg-in99.8%
remove-double-neg99.8%
+-commutative99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in z around inf 96.6%
Taylor expanded in x around inf 48.7%
associate-*r*48.9%
*-commutative48.9%
Simplified48.9%
if -0.160000000000000003 < z < 5.60000000000000025e-18Initial program 99.9%
Taylor expanded in z around 0 75.7%
if 5.60000000000000025e-18 < z Initial program 99.8%
+-commutative99.8%
*-commutative99.8%
fma-def99.8%
remove-double-neg99.8%
distribute-lft-neg-in99.8%
distribute-rgt-neg-in99.8%
sub-neg99.8%
distribute-neg-in99.8%
remove-double-neg99.8%
+-commutative99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in z around inf 98.3%
Taylor expanded in x around inf 60.4%
Final simplification64.8%
(FPCore (x y z) :precision binary64 (+ x (* z (* (- y x) 6.0))))
double code(double x, double y, double z) {
return x + (z * ((y - x) * 6.0));
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = x + (z * ((y - x) * 6.0d0))
end function
public static double code(double x, double y, double z) {
return x + (z * ((y - x) * 6.0));
}
def code(x, y, z): return x + (z * ((y - x) * 6.0))
function code(x, y, z) return Float64(x + Float64(z * Float64(Float64(y - x) * 6.0))) end
function tmp = code(x, y, z) tmp = x + (z * ((y - x) * 6.0)); end
code[x_, y_, z_] := N[(x + N[(z * N[(N[(y - x), $MachinePrecision] * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + z \cdot \left(\left(y - x\right) \cdot 6\right)
\end{array}
Initial program 99.9%
Final simplification99.9%
(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.9%
Taylor expanded in z around 0 39.5%
Final simplification39.5%
(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 2024021
(FPCore (x y z)
:name "Data.Colour.RGBSpace.HSL:hsl from colour-2.3.3, E"
:precision binary64
:herbie-target
(- x (* (* 6.0 z) (- x y)))
(+ x (* (* (- y x) 6.0) z)))