
(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 7 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 (+ 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}
Initial program 99.9%
Final simplification99.9%
(FPCore (x y z)
:precision binary64
(if (or (<= x -4.3e+109)
(not (or (<= x -2.8e+55) (and (not (<= x -0.17)) (<= x 4.6e+21)))))
(+ x (* -6.0 (* x z)))
(+ x (* 6.0 (* y z)))))
double code(double x, double y, double z) {
double tmp;
if ((x <= -4.3e+109) || !((x <= -2.8e+55) || (!(x <= -0.17) && (x <= 4.6e+21)))) {
tmp = x + (-6.0 * (x * z));
} else {
tmp = x + (6.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
real(8) :: tmp
if ((x <= (-4.3d+109)) .or. (.not. (x <= (-2.8d+55)) .or. (.not. (x <= (-0.17d0))) .and. (x <= 4.6d+21))) then
tmp = x + ((-6.0d0) * (x * z))
else
tmp = x + (6.0d0 * (y * z))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((x <= -4.3e+109) || !((x <= -2.8e+55) || (!(x <= -0.17) && (x <= 4.6e+21)))) {
tmp = x + (-6.0 * (x * z));
} else {
tmp = x + (6.0 * (y * z));
}
return tmp;
}
def code(x, y, z): tmp = 0 if (x <= -4.3e+109) or not ((x <= -2.8e+55) or (not (x <= -0.17) and (x <= 4.6e+21))): tmp = x + (-6.0 * (x * z)) else: tmp = x + (6.0 * (y * z)) return tmp
function code(x, y, z) tmp = 0.0 if ((x <= -4.3e+109) || !((x <= -2.8e+55) || (!(x <= -0.17) && (x <= 4.6e+21)))) tmp = Float64(x + Float64(-6.0 * Float64(x * z))); else tmp = Float64(x + Float64(6.0 * Float64(y * z))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((x <= -4.3e+109) || ~(((x <= -2.8e+55) || (~((x <= -0.17)) && (x <= 4.6e+21))))) tmp = x + (-6.0 * (x * z)); else tmp = x + (6.0 * (y * z)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[x, -4.3e+109], N[Not[Or[LessEqual[x, -2.8e+55], And[N[Not[LessEqual[x, -0.17]], $MachinePrecision], LessEqual[x, 4.6e+21]]]], $MachinePrecision]], N[(x + N[(-6.0 * N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(6.0 * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -4.3 \cdot 10^{+109} \lor \neg \left(x \leq -2.8 \cdot 10^{+55} \lor \neg \left(x \leq -0.17\right) \land x \leq 4.6 \cdot 10^{+21}\right):\\
\;\;\;\;x + -6 \cdot \left(x \cdot z\right)\\
\mathbf{else}:\\
\;\;\;\;x + 6 \cdot \left(y \cdot z\right)\\
\end{array}
\end{array}
if x < -4.3000000000000001e109 or -2.8000000000000001e55 < x < -0.170000000000000012 or 4.6e21 < x Initial program 99.9%
Taylor expanded in y around 0 94.0%
if -4.3000000000000001e109 < x < -2.8000000000000001e55 or -0.170000000000000012 < x < 4.6e21Initial program 99.8%
Taylor expanded in y around inf 89.5%
*-commutative89.5%
Simplified89.5%
Final simplification91.5%
(FPCore (x y z)
:precision binary64
(if (<= x -4.6e+109)
(+ x (* x (* z -6.0)))
(if (or (<= x -1.6e+57) (and (not (<= x -245.0)) (<= x 2.5e+19)))
(+ x (* 6.0 (* y z)))
(+ x (* -6.0 (* x z))))))
double code(double x, double y, double z) {
double tmp;
if (x <= -4.6e+109) {
tmp = x + (x * (z * -6.0));
} else if ((x <= -1.6e+57) || (!(x <= -245.0) && (x <= 2.5e+19))) {
tmp = x + (6.0 * (y * z));
} else {
tmp = x + (-6.0 * (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 (x <= (-4.6d+109)) then
tmp = x + (x * (z * (-6.0d0)))
else if ((x <= (-1.6d+57)) .or. (.not. (x <= (-245.0d0))) .and. (x <= 2.5d+19)) then
tmp = x + (6.0d0 * (y * z))
else
tmp = x + ((-6.0d0) * (x * z))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= -4.6e+109) {
tmp = x + (x * (z * -6.0));
} else if ((x <= -1.6e+57) || (!(x <= -245.0) && (x <= 2.5e+19))) {
tmp = x + (6.0 * (y * z));
} else {
tmp = x + (-6.0 * (x * z));
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -4.6e+109: tmp = x + (x * (z * -6.0)) elif (x <= -1.6e+57) or (not (x <= -245.0) and (x <= 2.5e+19)): tmp = x + (6.0 * (y * z)) else: tmp = x + (-6.0 * (x * z)) return tmp
function code(x, y, z) tmp = 0.0 if (x <= -4.6e+109) tmp = Float64(x + Float64(x * Float64(z * -6.0))); elseif ((x <= -1.6e+57) || (!(x <= -245.0) && (x <= 2.5e+19))) tmp = Float64(x + Float64(6.0 * Float64(y * z))); else tmp = Float64(x + Float64(-6.0 * Float64(x * z))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -4.6e+109) tmp = x + (x * (z * -6.0)); elseif ((x <= -1.6e+57) || (~((x <= -245.0)) && (x <= 2.5e+19))) tmp = x + (6.0 * (y * z)); else tmp = x + (-6.0 * (x * z)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -4.6e+109], N[(x + N[(x * N[(z * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[x, -1.6e+57], And[N[Not[LessEqual[x, -245.0]], $MachinePrecision], LessEqual[x, 2.5e+19]]], N[(x + N[(6.0 * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(-6.0 * N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -4.6 \cdot 10^{+109}:\\
\;\;\;\;x + x \cdot \left(z \cdot -6\right)\\
\mathbf{elif}\;x \leq -1.6 \cdot 10^{+57} \lor \neg \left(x \leq -245\right) \land x \leq 2.5 \cdot 10^{+19}:\\
\;\;\;\;x + 6 \cdot \left(y \cdot z\right)\\
\mathbf{else}:\\
\;\;\;\;x + -6 \cdot \left(x \cdot z\right)\\
\end{array}
\end{array}
if x < -4.60000000000000021e109Initial program 99.9%
Taylor expanded in y around 0 96.0%
*-commutative96.0%
associate-*r*96.0%
*-commutative96.0%
Simplified96.0%
if -4.60000000000000021e109 < x < -1.60000000000000015e57 or -245 < x < 2.5e19Initial program 99.8%
Taylor expanded in y around inf 89.5%
*-commutative89.5%
Simplified89.5%
if -1.60000000000000015e57 < x < -245 or 2.5e19 < x Initial program 99.9%
Taylor expanded in y around 0 92.7%
Final simplification91.5%
(FPCore (x y z)
:precision binary64
(if (<= x -5.5e+109)
(+ x (* x (* z -6.0)))
(if (<= x -6.1e+57)
(+ x (* 6.0 (* y z)))
(if (or (<= x -10.6) (not (<= x 1.1e+21)))
(+ x (* -6.0 (* x z)))
(+ x (* y (* 6.0 z)))))))
double code(double x, double y, double z) {
double tmp;
if (x <= -5.5e+109) {
tmp = x + (x * (z * -6.0));
} else if (x <= -6.1e+57) {
tmp = x + (6.0 * (y * z));
} else if ((x <= -10.6) || !(x <= 1.1e+21)) {
tmp = x + (-6.0 * (x * z));
} else {
tmp = x + (y * (6.0 * 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 (x <= (-5.5d+109)) then
tmp = x + (x * (z * (-6.0d0)))
else if (x <= (-6.1d+57)) then
tmp = x + (6.0d0 * (y * z))
else if ((x <= (-10.6d0)) .or. (.not. (x <= 1.1d+21))) then
tmp = x + ((-6.0d0) * (x * z))
else
tmp = x + (y * (6.0d0 * z))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= -5.5e+109) {
tmp = x + (x * (z * -6.0));
} else if (x <= -6.1e+57) {
tmp = x + (6.0 * (y * z));
} else if ((x <= -10.6) || !(x <= 1.1e+21)) {
tmp = x + (-6.0 * (x * z));
} else {
tmp = x + (y * (6.0 * z));
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -5.5e+109: tmp = x + (x * (z * -6.0)) elif x <= -6.1e+57: tmp = x + (6.0 * (y * z)) elif (x <= -10.6) or not (x <= 1.1e+21): tmp = x + (-6.0 * (x * z)) else: tmp = x + (y * (6.0 * z)) return tmp
function code(x, y, z) tmp = 0.0 if (x <= -5.5e+109) tmp = Float64(x + Float64(x * Float64(z * -6.0))); elseif (x <= -6.1e+57) tmp = Float64(x + Float64(6.0 * Float64(y * z))); elseif ((x <= -10.6) || !(x <= 1.1e+21)) tmp = Float64(x + Float64(-6.0 * Float64(x * z))); else tmp = Float64(x + Float64(y * Float64(6.0 * z))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -5.5e+109) tmp = x + (x * (z * -6.0)); elseif (x <= -6.1e+57) tmp = x + (6.0 * (y * z)); elseif ((x <= -10.6) || ~((x <= 1.1e+21))) tmp = x + (-6.0 * (x * z)); else tmp = x + (y * (6.0 * z)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -5.5e+109], N[(x + N[(x * N[(z * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -6.1e+57], N[(x + N[(6.0 * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[x, -10.6], N[Not[LessEqual[x, 1.1e+21]], $MachinePrecision]], N[(x + N[(-6.0 * N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(6.0 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -5.5 \cdot 10^{+109}:\\
\;\;\;\;x + x \cdot \left(z \cdot -6\right)\\
\mathbf{elif}\;x \leq -6.1 \cdot 10^{+57}:\\
\;\;\;\;x + 6 \cdot \left(y \cdot z\right)\\
\mathbf{elif}\;x \leq -10.6 \lor \neg \left(x \leq 1.1 \cdot 10^{+21}\right):\\
\;\;\;\;x + -6 \cdot \left(x \cdot z\right)\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \left(6 \cdot z\right)\\
\end{array}
\end{array}
if x < -5.4999999999999998e109Initial program 99.9%
Taylor expanded in y around 0 96.0%
*-commutative96.0%
associate-*r*96.0%
*-commutative96.0%
Simplified96.0%
if -5.4999999999999998e109 < x < -6.09999999999999975e57Initial program 100.0%
Taylor expanded in y around inf 92.9%
*-commutative92.9%
Simplified92.9%
if -6.09999999999999975e57 < x < -10.5999999999999996 or 1.1e21 < x Initial program 99.9%
Taylor expanded in y around 0 92.7%
if -10.5999999999999996 < x < 1.1e21Initial program 99.8%
Taylor expanded in y around inf 89.1%
*-commutative89.1%
associate-*r*89.2%
Simplified89.2%
Final simplification91.5%
(FPCore (x y z)
:precision binary64
(if (<= x -4.3e+109)
(+ x (* x (* z -6.0)))
(if (<= x -6.1e+57)
(+ x (* 6.0 (* y z)))
(if (or (<= x -75.0) (not (<= x 2.4e+21)))
(+ x (* -6.0 (* x z)))
(+ x (* z (* y 6.0)))))))
double code(double x, double y, double z) {
double tmp;
if (x <= -4.3e+109) {
tmp = x + (x * (z * -6.0));
} else if (x <= -6.1e+57) {
tmp = x + (6.0 * (y * z));
} else if ((x <= -75.0) || !(x <= 2.4e+21)) {
tmp = x + (-6.0 * (x * z));
} 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 (x <= (-4.3d+109)) then
tmp = x + (x * (z * (-6.0d0)))
else if (x <= (-6.1d+57)) then
tmp = x + (6.0d0 * (y * z))
else if ((x <= (-75.0d0)) .or. (.not. (x <= 2.4d+21))) then
tmp = x + ((-6.0d0) * (x * z))
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 (x <= -4.3e+109) {
tmp = x + (x * (z * -6.0));
} else if (x <= -6.1e+57) {
tmp = x + (6.0 * (y * z));
} else if ((x <= -75.0) || !(x <= 2.4e+21)) {
tmp = x + (-6.0 * (x * z));
} else {
tmp = x + (z * (y * 6.0));
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -4.3e+109: tmp = x + (x * (z * -6.0)) elif x <= -6.1e+57: tmp = x + (6.0 * (y * z)) elif (x <= -75.0) or not (x <= 2.4e+21): tmp = x + (-6.0 * (x * z)) else: tmp = x + (z * (y * 6.0)) return tmp
function code(x, y, z) tmp = 0.0 if (x <= -4.3e+109) tmp = Float64(x + Float64(x * Float64(z * -6.0))); elseif (x <= -6.1e+57) tmp = Float64(x + Float64(6.0 * Float64(y * z))); elseif ((x <= -75.0) || !(x <= 2.4e+21)) tmp = Float64(x + Float64(-6.0 * Float64(x * z))); 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 (x <= -4.3e+109) tmp = x + (x * (z * -6.0)); elseif (x <= -6.1e+57) tmp = x + (6.0 * (y * z)); elseif ((x <= -75.0) || ~((x <= 2.4e+21))) tmp = x + (-6.0 * (x * z)); else tmp = x + (z * (y * 6.0)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -4.3e+109], N[(x + N[(x * N[(z * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -6.1e+57], N[(x + N[(6.0 * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[x, -75.0], N[Not[LessEqual[x, 2.4e+21]], $MachinePrecision]], N[(x + N[(-6.0 * N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(z * N[(y * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -4.3 \cdot 10^{+109}:\\
\;\;\;\;x + x \cdot \left(z \cdot -6\right)\\
\mathbf{elif}\;x \leq -6.1 \cdot 10^{+57}:\\
\;\;\;\;x + 6 \cdot \left(y \cdot z\right)\\
\mathbf{elif}\;x \leq -75 \lor \neg \left(x \leq 2.4 \cdot 10^{+21}\right):\\
\;\;\;\;x + -6 \cdot \left(x \cdot z\right)\\
\mathbf{else}:\\
\;\;\;\;x + z \cdot \left(y \cdot 6\right)\\
\end{array}
\end{array}
if x < -4.3000000000000001e109Initial program 99.9%
Taylor expanded in y around 0 96.0%
*-commutative96.0%
associate-*r*96.0%
*-commutative96.0%
Simplified96.0%
if -4.3000000000000001e109 < x < -6.09999999999999975e57Initial program 100.0%
Taylor expanded in y around inf 92.9%
*-commutative92.9%
Simplified92.9%
if -6.09999999999999975e57 < x < -75 or 2.4e21 < x Initial program 99.9%
Taylor expanded in y around 0 92.7%
if -75 < x < 2.4e21Initial program 99.8%
Taylor expanded in y around inf 89.3%
Final simplification91.6%
(FPCore (x y z) :precision binary64 (+ x (* 6.0 (* (- y x) z))))
double code(double x, double y, double z) {
return x + (6.0 * ((y - x) * 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 + (6.0d0 * ((y - x) * z))
end function
public static double code(double x, double y, double z) {
return x + (6.0 * ((y - x) * z));
}
def code(x, y, z): return x + (6.0 * ((y - x) * z))
function code(x, y, z) return Float64(x + Float64(6.0 * Float64(Float64(y - x) * z))) end
function tmp = code(x, y, z) tmp = x + (6.0 * ((y - x) * z)); end
code[x_, y_, z_] := N[(x + N[(6.0 * N[(N[(y - x), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + 6 \cdot \left(\left(y - x\right) \cdot z\right)
\end{array}
Initial program 99.9%
Taylor expanded in y around 0 98.2%
+-commutative98.2%
associate-*r*98.3%
*-commutative98.3%
associate-*r*98.3%
metadata-eval98.3%
cancel-sign-sub-inv98.3%
*-commutative98.3%
associate-*r*98.3%
*-commutative98.3%
distribute-lft-out--99.8%
associate-*r*99.8%
Simplified99.8%
Final simplification99.8%
(FPCore (x y z) :precision binary64 (+ x (* -6.0 (* x z))))
double code(double x, double y, double z) {
return x + (-6.0 * (x * 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 + ((-6.0d0) * (x * z))
end function
public static double code(double x, double y, double z) {
return x + (-6.0 * (x * z));
}
def code(x, y, z): return x + (-6.0 * (x * z))
function code(x, y, z) return Float64(x + Float64(-6.0 * Float64(x * z))) end
function tmp = code(x, y, z) tmp = x + (-6.0 * (x * z)); end
code[x_, y_, z_] := N[(x + N[(-6.0 * N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + -6 \cdot \left(x \cdot z\right)
\end{array}
Initial program 99.9%
Taylor expanded in y around 0 65.8%
Final simplification65.8%
(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 2024115
(FPCore (x y z)
:name "Data.Colour.RGBSpace.HSL:hsl from colour-2.3.3, E"
:precision binary64
:alt
(- x (* (* 6.0 z) (- x y)))
(+ x (* (* (- y x) 6.0) z)))