
(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 12 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) (* 6.0 z) x))
double code(double x, double y, double z) {
return fma((y - x), (6.0 * z), x);
}
function code(x, y, z) return fma(Float64(y - x), Float64(6.0 * z), x) end
code[x_, y_, z_] := N[(N[(y - x), $MachinePrecision] * N[(6.0 * z), $MachinePrecision] + x), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(y - x, 6 \cdot z, x\right)
\end{array}
Initial program 99.7%
+-commutative99.7%
associate-*l*99.8%
fma-define99.8%
Simplified99.8%
Final simplification99.8%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* 6.0 (* y z))) (t_1 (* -6.0 (* x z))))
(if (<= z -4.8e+125)
t_0
(if (<= z -1.35e+95)
t_1
(if (<= z -3e+70)
t_0
(if (<= z -5.8)
t_1
(if (<= z -2.55e-6)
t_0
(if (<= z 1.8e-69)
x
(if (or (<= z 6.2e+23)
(and (not (<= z 1.1e+127)) (<= z 2.6e+188)))
t_0
t_1)))))))))
double code(double x, double y, double z) {
double t_0 = 6.0 * (y * z);
double t_1 = -6.0 * (x * z);
double tmp;
if (z <= -4.8e+125) {
tmp = t_0;
} else if (z <= -1.35e+95) {
tmp = t_1;
} else if (z <= -3e+70) {
tmp = t_0;
} else if (z <= -5.8) {
tmp = t_1;
} else if (z <= -2.55e-6) {
tmp = t_0;
} else if (z <= 1.8e-69) {
tmp = x;
} else if ((z <= 6.2e+23) || (!(z <= 1.1e+127) && (z <= 2.6e+188))) {
tmp = t_0;
} 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 = 6.0d0 * (y * z)
t_1 = (-6.0d0) * (x * z)
if (z <= (-4.8d+125)) then
tmp = t_0
else if (z <= (-1.35d+95)) then
tmp = t_1
else if (z <= (-3d+70)) then
tmp = t_0
else if (z <= (-5.8d0)) then
tmp = t_1
else if (z <= (-2.55d-6)) then
tmp = t_0
else if (z <= 1.8d-69) then
tmp = x
else if ((z <= 6.2d+23) .or. (.not. (z <= 1.1d+127)) .and. (z <= 2.6d+188)) then
tmp = t_0
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = 6.0 * (y * z);
double t_1 = -6.0 * (x * z);
double tmp;
if (z <= -4.8e+125) {
tmp = t_0;
} else if (z <= -1.35e+95) {
tmp = t_1;
} else if (z <= -3e+70) {
tmp = t_0;
} else if (z <= -5.8) {
tmp = t_1;
} else if (z <= -2.55e-6) {
tmp = t_0;
} else if (z <= 1.8e-69) {
tmp = x;
} else if ((z <= 6.2e+23) || (!(z <= 1.1e+127) && (z <= 2.6e+188))) {
tmp = t_0;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z): t_0 = 6.0 * (y * z) t_1 = -6.0 * (x * z) tmp = 0 if z <= -4.8e+125: tmp = t_0 elif z <= -1.35e+95: tmp = t_1 elif z <= -3e+70: tmp = t_0 elif z <= -5.8: tmp = t_1 elif z <= -2.55e-6: tmp = t_0 elif z <= 1.8e-69: tmp = x elif (z <= 6.2e+23) or (not (z <= 1.1e+127) and (z <= 2.6e+188)): tmp = t_0 else: tmp = t_1 return tmp
function code(x, y, z) t_0 = Float64(6.0 * Float64(y * z)) t_1 = Float64(-6.0 * Float64(x * z)) tmp = 0.0 if (z <= -4.8e+125) tmp = t_0; elseif (z <= -1.35e+95) tmp = t_1; elseif (z <= -3e+70) tmp = t_0; elseif (z <= -5.8) tmp = t_1; elseif (z <= -2.55e-6) tmp = t_0; elseif (z <= 1.8e-69) tmp = x; elseif ((z <= 6.2e+23) || (!(z <= 1.1e+127) && (z <= 2.6e+188))) tmp = t_0; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z) t_0 = 6.0 * (y * z); t_1 = -6.0 * (x * z); tmp = 0.0; if (z <= -4.8e+125) tmp = t_0; elseif (z <= -1.35e+95) tmp = t_1; elseif (z <= -3e+70) tmp = t_0; elseif (z <= -5.8) tmp = t_1; elseif (z <= -2.55e-6) tmp = t_0; elseif (z <= 1.8e-69) tmp = x; elseif ((z <= 6.2e+23) || (~((z <= 1.1e+127)) && (z <= 2.6e+188))) tmp = t_0; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(6.0 * N[(y * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(-6.0 * N[(x * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -4.8e+125], t$95$0, If[LessEqual[z, -1.35e+95], t$95$1, If[LessEqual[z, -3e+70], t$95$0, If[LessEqual[z, -5.8], t$95$1, If[LessEqual[z, -2.55e-6], t$95$0, If[LessEqual[z, 1.8e-69], x, If[Or[LessEqual[z, 6.2e+23], And[N[Not[LessEqual[z, 1.1e+127]], $MachinePrecision], LessEqual[z, 2.6e+188]]], t$95$0, t$95$1]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 6 \cdot \left(y \cdot z\right)\\
t_1 := -6 \cdot \left(x \cdot z\right)\\
\mathbf{if}\;z \leq -4.8 \cdot 10^{+125}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;z \leq -1.35 \cdot 10^{+95}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -3 \cdot 10^{+70}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;z \leq -5.8:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -2.55 \cdot 10^{-6}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;z \leq 1.8 \cdot 10^{-69}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 6.2 \cdot 10^{+23} \lor \neg \left(z \leq 1.1 \cdot 10^{+127}\right) \land z \leq 2.6 \cdot 10^{+188}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -4.7999999999999999e125 or -1.35e95 < z < -2.99999999999999976e70 or -5.79999999999999982 < z < -2.5500000000000001e-6 or 1.80000000000000009e-69 < z < 6.19999999999999941e23 or 1.1000000000000001e127 < z < 2.59999999999999987e188Initial program 99.7%
associate-*r*99.8%
+-commutative99.8%
*-commutative99.8%
associate-*r*99.8%
fma-define99.8%
Applied egg-rr99.8%
Taylor expanded in y around inf 76.0%
*-commutative76.0%
Simplified76.0%
if -4.7999999999999999e125 < z < -1.35e95 or -2.99999999999999976e70 < z < -5.79999999999999982 or 6.19999999999999941e23 < z < 1.1000000000000001e127 or 2.59999999999999987e188 < z Initial program 99.6%
associate-*r*99.7%
+-commutative99.7%
*-commutative99.7%
associate-*r*99.6%
fma-define99.6%
Applied egg-rr99.6%
Taylor expanded in z around inf 97.7%
Taylor expanded in y around 0 68.1%
if -2.5500000000000001e-6 < z < 1.80000000000000009e-69Initial program 99.8%
Taylor expanded in z around 0 69.2%
Final simplification70.6%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* 6.0 (* y z))) (t_1 (* -6.0 (* x z))) (t_2 (* x (* z -6.0))))
(if (<= z -5.5e+125)
t_0
(if (<= z -6.6e+96)
t_2
(if (<= z -3e+70)
t_0
(if (<= z -5.8)
t_1
(if (<= z -2.55e-6)
t_0
(if (<= z 6.5e-69)
x
(if (<= z 8.8e+23)
t_0
(if (<= z 4.1e+132) t_1 (if (<= z 3.7e+189) t_0 t_2)))))))))))
double code(double x, double y, double z) {
double t_0 = 6.0 * (y * z);
double t_1 = -6.0 * (x * z);
double t_2 = x * (z * -6.0);
double tmp;
if (z <= -5.5e+125) {
tmp = t_0;
} else if (z <= -6.6e+96) {
tmp = t_2;
} else if (z <= -3e+70) {
tmp = t_0;
} else if (z <= -5.8) {
tmp = t_1;
} else if (z <= -2.55e-6) {
tmp = t_0;
} else if (z <= 6.5e-69) {
tmp = x;
} else if (z <= 8.8e+23) {
tmp = t_0;
} else if (z <= 4.1e+132) {
tmp = t_1;
} else if (z <= 3.7e+189) {
tmp = t_0;
} else {
tmp = t_2;
}
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) :: t_2
real(8) :: tmp
t_0 = 6.0d0 * (y * z)
t_1 = (-6.0d0) * (x * z)
t_2 = x * (z * (-6.0d0))
if (z <= (-5.5d+125)) then
tmp = t_0
else if (z <= (-6.6d+96)) then
tmp = t_2
else if (z <= (-3d+70)) then
tmp = t_0
else if (z <= (-5.8d0)) then
tmp = t_1
else if (z <= (-2.55d-6)) then
tmp = t_0
else if (z <= 6.5d-69) then
tmp = x
else if (z <= 8.8d+23) then
tmp = t_0
else if (z <= 4.1d+132) then
tmp = t_1
else if (z <= 3.7d+189) then
tmp = t_0
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = 6.0 * (y * z);
double t_1 = -6.0 * (x * z);
double t_2 = x * (z * -6.0);
double tmp;
if (z <= -5.5e+125) {
tmp = t_0;
} else if (z <= -6.6e+96) {
tmp = t_2;
} else if (z <= -3e+70) {
tmp = t_0;
} else if (z <= -5.8) {
tmp = t_1;
} else if (z <= -2.55e-6) {
tmp = t_0;
} else if (z <= 6.5e-69) {
tmp = x;
} else if (z <= 8.8e+23) {
tmp = t_0;
} else if (z <= 4.1e+132) {
tmp = t_1;
} else if (z <= 3.7e+189) {
tmp = t_0;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z): t_0 = 6.0 * (y * z) t_1 = -6.0 * (x * z) t_2 = x * (z * -6.0) tmp = 0 if z <= -5.5e+125: tmp = t_0 elif z <= -6.6e+96: tmp = t_2 elif z <= -3e+70: tmp = t_0 elif z <= -5.8: tmp = t_1 elif z <= -2.55e-6: tmp = t_0 elif z <= 6.5e-69: tmp = x elif z <= 8.8e+23: tmp = t_0 elif z <= 4.1e+132: tmp = t_1 elif z <= 3.7e+189: tmp = t_0 else: tmp = t_2 return tmp
function code(x, y, z) t_0 = Float64(6.0 * Float64(y * z)) t_1 = Float64(-6.0 * Float64(x * z)) t_2 = Float64(x * Float64(z * -6.0)) tmp = 0.0 if (z <= -5.5e+125) tmp = t_0; elseif (z <= -6.6e+96) tmp = t_2; elseif (z <= -3e+70) tmp = t_0; elseif (z <= -5.8) tmp = t_1; elseif (z <= -2.55e-6) tmp = t_0; elseif (z <= 6.5e-69) tmp = x; elseif (z <= 8.8e+23) tmp = t_0; elseif (z <= 4.1e+132) tmp = t_1; elseif (z <= 3.7e+189) tmp = t_0; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z) t_0 = 6.0 * (y * z); t_1 = -6.0 * (x * z); t_2 = x * (z * -6.0); tmp = 0.0; if (z <= -5.5e+125) tmp = t_0; elseif (z <= -6.6e+96) tmp = t_2; elseif (z <= -3e+70) tmp = t_0; elseif (z <= -5.8) tmp = t_1; elseif (z <= -2.55e-6) tmp = t_0; elseif (z <= 6.5e-69) tmp = x; elseif (z <= 8.8e+23) tmp = t_0; elseif (z <= 4.1e+132) tmp = t_1; elseif (z <= 3.7e+189) tmp = t_0; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(6.0 * N[(y * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(-6.0 * N[(x * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(z * -6.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -5.5e+125], t$95$0, If[LessEqual[z, -6.6e+96], t$95$2, If[LessEqual[z, -3e+70], t$95$0, If[LessEqual[z, -5.8], t$95$1, If[LessEqual[z, -2.55e-6], t$95$0, If[LessEqual[z, 6.5e-69], x, If[LessEqual[z, 8.8e+23], t$95$0, If[LessEqual[z, 4.1e+132], t$95$1, If[LessEqual[z, 3.7e+189], t$95$0, t$95$2]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 6 \cdot \left(y \cdot z\right)\\
t_1 := -6 \cdot \left(x \cdot z\right)\\
t_2 := x \cdot \left(z \cdot -6\right)\\
\mathbf{if}\;z \leq -5.5 \cdot 10^{+125}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;z \leq -6.6 \cdot 10^{+96}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq -3 \cdot 10^{+70}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;z \leq -5.8:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -2.55 \cdot 10^{-6}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;z \leq 6.5 \cdot 10^{-69}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 8.8 \cdot 10^{+23}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;z \leq 4.1 \cdot 10^{+132}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 3.7 \cdot 10^{+189}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if z < -5.49999999999999996e125 or -6.59999999999999969e96 < z < -2.99999999999999976e70 or -5.79999999999999982 < z < -2.5500000000000001e-6 or 6.49999999999999951e-69 < z < 8.80000000000000034e23 or 4.09999999999999992e132 < z < 3.70000000000000021e189Initial program 99.7%
associate-*r*99.8%
+-commutative99.8%
*-commutative99.8%
associate-*r*99.8%
fma-define99.8%
Applied egg-rr99.8%
Taylor expanded in y around inf 76.0%
*-commutative76.0%
Simplified76.0%
if -5.49999999999999996e125 < z < -6.59999999999999969e96 or 3.70000000000000021e189 < z Initial program 99.8%
associate-*r*99.8%
+-commutative99.8%
*-commutative99.8%
associate-*r*99.6%
fma-define99.7%
Applied egg-rr99.7%
Taylor expanded in z around inf 99.6%
Taylor expanded in y around 0 70.4%
*-commutative70.4%
associate-*l*70.5%
Simplified70.5%
if -2.99999999999999976e70 < z < -5.79999999999999982 or 8.80000000000000034e23 < z < 4.09999999999999992e132Initial program 99.3%
associate-*r*99.6%
+-commutative99.6%
*-commutative99.6%
associate-*r*99.6%
fma-define99.4%
Applied egg-rr99.4%
Taylor expanded in z around inf 94.8%
Taylor expanded in y around 0 64.6%
if -2.5500000000000001e-6 < z < 6.49999999999999951e-69Initial program 99.8%
Taylor expanded in z around 0 69.2%
Final simplification70.6%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* y (* 6.0 z)))
(t_1 (* 6.0 (* y z)))
(t_2 (* -6.0 (* x z)))
(t_3 (* x (* z -6.0))))
(if (<= z -4.8e+125)
t_1
(if (<= z -3.8e+95)
t_3
(if (<= z -3e+70)
t_1
(if (<= z -5.8)
t_2
(if (<= z -6.2e-6)
t_1
(if (<= z 5e-69)
x
(if (<= z 4.8e+20)
t_0
(if (<= z 3.4e+126)
t_2
(if (<= z 1.25e+189) t_0 t_3)))))))))))
double code(double x, double y, double z) {
double t_0 = y * (6.0 * z);
double t_1 = 6.0 * (y * z);
double t_2 = -6.0 * (x * z);
double t_3 = x * (z * -6.0);
double tmp;
if (z <= -4.8e+125) {
tmp = t_1;
} else if (z <= -3.8e+95) {
tmp = t_3;
} else if (z <= -3e+70) {
tmp = t_1;
} else if (z <= -5.8) {
tmp = t_2;
} else if (z <= -6.2e-6) {
tmp = t_1;
} else if (z <= 5e-69) {
tmp = x;
} else if (z <= 4.8e+20) {
tmp = t_0;
} else if (z <= 3.4e+126) {
tmp = t_2;
} else if (z <= 1.25e+189) {
tmp = t_0;
} else {
tmp = t_3;
}
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) :: t_2
real(8) :: t_3
real(8) :: tmp
t_0 = y * (6.0d0 * z)
t_1 = 6.0d0 * (y * z)
t_2 = (-6.0d0) * (x * z)
t_3 = x * (z * (-6.0d0))
if (z <= (-4.8d+125)) then
tmp = t_1
else if (z <= (-3.8d+95)) then
tmp = t_3
else if (z <= (-3d+70)) then
tmp = t_1
else if (z <= (-5.8d0)) then
tmp = t_2
else if (z <= (-6.2d-6)) then
tmp = t_1
else if (z <= 5d-69) then
tmp = x
else if (z <= 4.8d+20) then
tmp = t_0
else if (z <= 3.4d+126) then
tmp = t_2
else if (z <= 1.25d+189) then
tmp = t_0
else
tmp = t_3
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = y * (6.0 * z);
double t_1 = 6.0 * (y * z);
double t_2 = -6.0 * (x * z);
double t_3 = x * (z * -6.0);
double tmp;
if (z <= -4.8e+125) {
tmp = t_1;
} else if (z <= -3.8e+95) {
tmp = t_3;
} else if (z <= -3e+70) {
tmp = t_1;
} else if (z <= -5.8) {
tmp = t_2;
} else if (z <= -6.2e-6) {
tmp = t_1;
} else if (z <= 5e-69) {
tmp = x;
} else if (z <= 4.8e+20) {
tmp = t_0;
} else if (z <= 3.4e+126) {
tmp = t_2;
} else if (z <= 1.25e+189) {
tmp = t_0;
} else {
tmp = t_3;
}
return tmp;
}
def code(x, y, z): t_0 = y * (6.0 * z) t_1 = 6.0 * (y * z) t_2 = -6.0 * (x * z) t_3 = x * (z * -6.0) tmp = 0 if z <= -4.8e+125: tmp = t_1 elif z <= -3.8e+95: tmp = t_3 elif z <= -3e+70: tmp = t_1 elif z <= -5.8: tmp = t_2 elif z <= -6.2e-6: tmp = t_1 elif z <= 5e-69: tmp = x elif z <= 4.8e+20: tmp = t_0 elif z <= 3.4e+126: tmp = t_2 elif z <= 1.25e+189: tmp = t_0 else: tmp = t_3 return tmp
function code(x, y, z) t_0 = Float64(y * Float64(6.0 * z)) t_1 = Float64(6.0 * Float64(y * z)) t_2 = Float64(-6.0 * Float64(x * z)) t_3 = Float64(x * Float64(z * -6.0)) tmp = 0.0 if (z <= -4.8e+125) tmp = t_1; elseif (z <= -3.8e+95) tmp = t_3; elseif (z <= -3e+70) tmp = t_1; elseif (z <= -5.8) tmp = t_2; elseif (z <= -6.2e-6) tmp = t_1; elseif (z <= 5e-69) tmp = x; elseif (z <= 4.8e+20) tmp = t_0; elseif (z <= 3.4e+126) tmp = t_2; elseif (z <= 1.25e+189) tmp = t_0; else tmp = t_3; end return tmp end
function tmp_2 = code(x, y, z) t_0 = y * (6.0 * z); t_1 = 6.0 * (y * z); t_2 = -6.0 * (x * z); t_3 = x * (z * -6.0); tmp = 0.0; if (z <= -4.8e+125) tmp = t_1; elseif (z <= -3.8e+95) tmp = t_3; elseif (z <= -3e+70) tmp = t_1; elseif (z <= -5.8) tmp = t_2; elseif (z <= -6.2e-6) tmp = t_1; elseif (z <= 5e-69) tmp = x; elseif (z <= 4.8e+20) tmp = t_0; elseif (z <= 3.4e+126) tmp = t_2; elseif (z <= 1.25e+189) tmp = t_0; else tmp = t_3; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(y * N[(6.0 * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(6.0 * N[(y * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(-6.0 * N[(x * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x * N[(z * -6.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -4.8e+125], t$95$1, If[LessEqual[z, -3.8e+95], t$95$3, If[LessEqual[z, -3e+70], t$95$1, If[LessEqual[z, -5.8], t$95$2, If[LessEqual[z, -6.2e-6], t$95$1, If[LessEqual[z, 5e-69], x, If[LessEqual[z, 4.8e+20], t$95$0, If[LessEqual[z, 3.4e+126], t$95$2, If[LessEqual[z, 1.25e+189], t$95$0, t$95$3]]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y \cdot \left(6 \cdot z\right)\\
t_1 := 6 \cdot \left(y \cdot z\right)\\
t_2 := -6 \cdot \left(x \cdot z\right)\\
t_3 := x \cdot \left(z \cdot -6\right)\\
\mathbf{if}\;z \leq -4.8 \cdot 10^{+125}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -3.8 \cdot 10^{+95}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;z \leq -3 \cdot 10^{+70}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -5.8:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq -6.2 \cdot 10^{-6}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 5 \cdot 10^{-69}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 4.8 \cdot 10^{+20}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;z \leq 3.4 \cdot 10^{+126}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq 1.25 \cdot 10^{+189}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;t\_3\\
\end{array}
\end{array}
if z < -4.7999999999999999e125 or -3.7999999999999999e95 < z < -2.99999999999999976e70 or -5.79999999999999982 < z < -6.1999999999999999e-6Initial program 99.8%
associate-*r*99.8%
+-commutative99.8%
*-commutative99.8%
associate-*r*100.0%
fma-define100.0%
Applied egg-rr100.0%
Taylor expanded in y around inf 73.6%
*-commutative73.6%
Simplified73.6%
if -4.7999999999999999e125 < z < -3.7999999999999999e95 or 1.2500000000000001e189 < z Initial program 99.8%
associate-*r*99.8%
+-commutative99.8%
*-commutative99.8%
associate-*r*99.6%
fma-define99.7%
Applied egg-rr99.7%
Taylor expanded in z around inf 99.6%
Taylor expanded in y around 0 70.4%
*-commutative70.4%
associate-*l*70.5%
Simplified70.5%
if -2.99999999999999976e70 < z < -5.79999999999999982 or 4.8e20 < z < 3.39999999999999989e126Initial program 99.3%
associate-*r*99.6%
+-commutative99.6%
*-commutative99.6%
associate-*r*99.6%
fma-define99.4%
Applied egg-rr99.4%
Taylor expanded in z around inf 94.8%
Taylor expanded in y around 0 64.6%
if -6.1999999999999999e-6 < z < 5.00000000000000033e-69Initial program 99.8%
Taylor expanded in z around 0 69.2%
if 5.00000000000000033e-69 < z < 4.8e20 or 3.39999999999999989e126 < z < 1.2500000000000001e189Initial program 99.6%
associate-*r*99.8%
+-commutative99.8%
*-commutative99.8%
associate-*r*99.5%
fma-define99.5%
Applied egg-rr99.5%
Taylor expanded in y around inf 83.2%
*-commutative83.2%
Simplified83.2%
Taylor expanded in z around inf 79.3%
associate-*r*79.3%
*-commutative79.3%
associate-*r*79.6%
Simplified79.6%
Final simplification70.6%
(FPCore (x y z) :precision binary64 (if (or (<= z -2.55e-6) (not (<= z 6.5e-69))) (* 6.0 (* (- y x) z)) x))
double code(double x, double y, double z) {
double tmp;
if ((z <= -2.55e-6) || !(z <= 6.5e-69)) {
tmp = 6.0 * ((y - 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 <= (-2.55d-6)) .or. (.not. (z <= 6.5d-69))) then
tmp = 6.0d0 * ((y - 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 <= -2.55e-6) || !(z <= 6.5e-69)) {
tmp = 6.0 * ((y - x) * z);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -2.55e-6) or not (z <= 6.5e-69): tmp = 6.0 * ((y - x) * z) else: tmp = x return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -2.55e-6) || !(z <= 6.5e-69)) tmp = Float64(6.0 * Float64(Float64(y - x) * z)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -2.55e-6) || ~((z <= 6.5e-69))) tmp = 6.0 * ((y - x) * z); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -2.55e-6], N[Not[LessEqual[z, 6.5e-69]], $MachinePrecision]], N[(6.0 * N[(N[(y - x), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.55 \cdot 10^{-6} \lor \neg \left(z \leq 6.5 \cdot 10^{-69}\right):\\
\;\;\;\;6 \cdot \left(\left(y - x\right) \cdot z\right)\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -2.5500000000000001e-6 or 6.49999999999999951e-69 < z Initial program 99.6%
associate-*r*99.8%
+-commutative99.8%
*-commutative99.8%
associate-*r*99.7%
fma-define99.7%
Applied egg-rr99.7%
Taylor expanded in z around inf 97.5%
if -2.5500000000000001e-6 < z < 6.49999999999999951e-69Initial program 99.8%
Taylor expanded in z around 0 69.2%
Final simplification84.1%
(FPCore (x y z) :precision binary64 (if (<= z -2.55e-6) (* 6.0 (* (- y x) z)) (if (<= z 5.2e-69) x (* (- y x) (* 6.0 z)))))
double code(double x, double y, double z) {
double tmp;
if (z <= -2.55e-6) {
tmp = 6.0 * ((y - x) * z);
} else if (z <= 5.2e-69) {
tmp = x;
} else {
tmp = (y - x) * (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 (z <= (-2.55d-6)) then
tmp = 6.0d0 * ((y - x) * z)
else if (z <= 5.2d-69) then
tmp = x
else
tmp = (y - x) * (6.0d0 * z)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -2.55e-6) {
tmp = 6.0 * ((y - x) * z);
} else if (z <= 5.2e-69) {
tmp = x;
} else {
tmp = (y - x) * (6.0 * z);
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -2.55e-6: tmp = 6.0 * ((y - x) * z) elif z <= 5.2e-69: tmp = x else: tmp = (y - x) * (6.0 * z) return tmp
function code(x, y, z) tmp = 0.0 if (z <= -2.55e-6) tmp = Float64(6.0 * Float64(Float64(y - x) * z)); elseif (z <= 5.2e-69) tmp = x; else tmp = Float64(Float64(y - x) * Float64(6.0 * z)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -2.55e-6) tmp = 6.0 * ((y - x) * z); elseif (z <= 5.2e-69) tmp = x; else tmp = (y - x) * (6.0 * z); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -2.55e-6], N[(6.0 * N[(N[(y - x), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.2e-69], x, N[(N[(y - x), $MachinePrecision] * N[(6.0 * z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.55 \cdot 10^{-6}:\\
\;\;\;\;6 \cdot \left(\left(y - x\right) \cdot z\right)\\
\mathbf{elif}\;z \leq 5.2 \cdot 10^{-69}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;\left(y - x\right) \cdot \left(6 \cdot z\right)\\
\end{array}
\end{array}
if z < -2.5500000000000001e-6Initial program 99.7%
associate-*r*99.8%
+-commutative99.8%
*-commutative99.8%
associate-*r*99.8%
fma-define99.8%
Applied egg-rr99.8%
Taylor expanded in z around inf 97.5%
if -2.5500000000000001e-6 < z < 5.2000000000000004e-69Initial program 99.8%
Taylor expanded in z around 0 69.2%
if 5.2000000000000004e-69 < z Initial program 99.6%
associate-*r*99.7%
+-commutative99.7%
*-commutative99.7%
associate-*r*99.6%
fma-define99.6%
Applied egg-rr99.6%
Taylor expanded in z around inf 97.5%
*-commutative97.5%
*-commutative97.5%
associate-*r*97.6%
Simplified97.6%
Final simplification84.2%
(FPCore (x y z) :precision binary64 (if (<= z -5.2e+20) (* 6.0 (* (- y x) z)) (if (<= z 1.8e-69) (+ x (* -6.0 (* x z))) (* (- y x) (* 6.0 z)))))
double code(double x, double y, double z) {
double tmp;
if (z <= -5.2e+20) {
tmp = 6.0 * ((y - x) * z);
} else if (z <= 1.8e-69) {
tmp = x + (-6.0 * (x * z));
} else {
tmp = (y - x) * (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 (z <= (-5.2d+20)) then
tmp = 6.0d0 * ((y - x) * z)
else if (z <= 1.8d-69) then
tmp = x + ((-6.0d0) * (x * z))
else
tmp = (y - x) * (6.0d0 * z)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -5.2e+20) {
tmp = 6.0 * ((y - x) * z);
} else if (z <= 1.8e-69) {
tmp = x + (-6.0 * (x * z));
} else {
tmp = (y - x) * (6.0 * z);
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -5.2e+20: tmp = 6.0 * ((y - x) * z) elif z <= 1.8e-69: tmp = x + (-6.0 * (x * z)) else: tmp = (y - x) * (6.0 * z) return tmp
function code(x, y, z) tmp = 0.0 if (z <= -5.2e+20) tmp = Float64(6.0 * Float64(Float64(y - x) * z)); elseif (z <= 1.8e-69) tmp = Float64(x + Float64(-6.0 * Float64(x * z))); else tmp = Float64(Float64(y - x) * Float64(6.0 * z)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -5.2e+20) tmp = 6.0 * ((y - x) * z); elseif (z <= 1.8e-69) tmp = x + (-6.0 * (x * z)); else tmp = (y - x) * (6.0 * z); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -5.2e+20], N[(6.0 * N[(N[(y - x), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.8e-69], N[(x + N[(-6.0 * N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y - x), $MachinePrecision] * N[(6.0 * z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.2 \cdot 10^{+20}:\\
\;\;\;\;6 \cdot \left(\left(y - x\right) \cdot z\right)\\
\mathbf{elif}\;z \leq 1.8 \cdot 10^{-69}:\\
\;\;\;\;x + -6 \cdot \left(x \cdot z\right)\\
\mathbf{else}:\\
\;\;\;\;\left(y - x\right) \cdot \left(6 \cdot z\right)\\
\end{array}
\end{array}
if z < -5.2e20Initial program 99.7%
associate-*r*99.8%
+-commutative99.8%
*-commutative99.8%
associate-*r*99.9%
fma-define99.8%
Applied egg-rr99.8%
Taylor expanded in z around inf 99.9%
if -5.2e20 < z < 1.80000000000000009e-69Initial program 99.8%
Taylor expanded in y around 0 70.8%
if 1.80000000000000009e-69 < z Initial program 99.6%
associate-*r*99.7%
+-commutative99.7%
*-commutative99.7%
associate-*r*99.6%
fma-define99.6%
Applied egg-rr99.6%
Taylor expanded in z around inf 97.5%
*-commutative97.5%
*-commutative97.5%
associate-*r*97.6%
Simplified97.6%
Final simplification84.8%
(FPCore (x y z) :precision binary64 (if (<= z -0.17) (* 6.0 (* (- y x) z)) (if (<= z 5.5e-9) (+ x (* 6.0 (* y z))) (* (- y x) (* 6.0 z)))))
double code(double x, double y, double z) {
double tmp;
if (z <= -0.17) {
tmp = 6.0 * ((y - x) * z);
} else if (z <= 5.5e-9) {
tmp = x + (6.0 * (y * z));
} else {
tmp = (y - x) * (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 (z <= (-0.17d0)) then
tmp = 6.0d0 * ((y - x) * z)
else if (z <= 5.5d-9) then
tmp = x + (6.0d0 * (y * z))
else
tmp = (y - x) * (6.0d0 * z)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -0.17) {
tmp = 6.0 * ((y - x) * z);
} else if (z <= 5.5e-9) {
tmp = x + (6.0 * (y * z));
} else {
tmp = (y - x) * (6.0 * z);
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -0.17: tmp = 6.0 * ((y - x) * z) elif z <= 5.5e-9: tmp = x + (6.0 * (y * z)) else: tmp = (y - x) * (6.0 * z) return tmp
function code(x, y, z) tmp = 0.0 if (z <= -0.17) tmp = Float64(6.0 * Float64(Float64(y - x) * z)); elseif (z <= 5.5e-9) tmp = Float64(x + Float64(6.0 * Float64(y * z))); else tmp = Float64(Float64(y - x) * Float64(6.0 * z)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -0.17) tmp = 6.0 * ((y - x) * z); elseif (z <= 5.5e-9) tmp = x + (6.0 * (y * z)); else tmp = (y - x) * (6.0 * z); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -0.17], N[(6.0 * N[(N[(y - x), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.5e-9], N[(x + N[(6.0 * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y - x), $MachinePrecision] * N[(6.0 * z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.17:\\
\;\;\;\;6 \cdot \left(\left(y - x\right) \cdot z\right)\\
\mathbf{elif}\;z \leq 5.5 \cdot 10^{-9}:\\
\;\;\;\;x + 6 \cdot \left(y \cdot z\right)\\
\mathbf{else}:\\
\;\;\;\;\left(y - x\right) \cdot \left(6 \cdot z\right)\\
\end{array}
\end{array}
if z < -0.170000000000000012Initial program 99.7%
associate-*r*99.8%
+-commutative99.8%
*-commutative99.8%
associate-*r*99.8%
fma-define99.8%
Applied egg-rr99.8%
Taylor expanded in z around inf 97.5%
if -0.170000000000000012 < z < 5.4999999999999996e-9Initial program 99.8%
Taylor expanded in y around inf 98.6%
*-commutative98.6%
Simplified98.6%
if 5.4999999999999996e-9 < z Initial program 99.7%
associate-*r*99.7%
+-commutative99.7%
*-commutative99.7%
associate-*r*99.6%
fma-define99.6%
Applied egg-rr99.6%
Taylor expanded in z around inf 99.6%
*-commutative99.6%
*-commutative99.6%
associate-*r*99.7%
Simplified99.7%
Final simplification98.6%
(FPCore (x y z) :precision binary64 (if (or (<= z -0.17) (not (<= z 5.5e-9))) (* -6.0 (* x z)) x))
double code(double x, double y, double z) {
double tmp;
if ((z <= -0.17) || !(z <= 5.5e-9)) {
tmp = -6.0 * (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 <= (-0.17d0)) .or. (.not. (z <= 5.5d-9))) then
tmp = (-6.0d0) * (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 <= -0.17) || !(z <= 5.5e-9)) {
tmp = -6.0 * (x * z);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -0.17) or not (z <= 5.5e-9): tmp = -6.0 * (x * z) else: tmp = x return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -0.17) || !(z <= 5.5e-9)) tmp = Float64(-6.0 * Float64(x * z)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -0.17) || ~((z <= 5.5e-9))) tmp = -6.0 * (x * z); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -0.17], N[Not[LessEqual[z, 5.5e-9]], $MachinePrecision]], N[(-6.0 * N[(x * z), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.17 \lor \neg \left(z \leq 5.5 \cdot 10^{-9}\right):\\
\;\;\;\;-6 \cdot \left(x \cdot z\right)\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -0.170000000000000012 or 5.4999999999999996e-9 < z Initial program 99.7%
associate-*r*99.8%
+-commutative99.8%
*-commutative99.8%
associate-*r*99.7%
fma-define99.7%
Applied egg-rr99.7%
Taylor expanded in z around inf 98.7%
Taylor expanded in y around 0 53.3%
if -0.170000000000000012 < z < 5.4999999999999996e-9Initial program 99.8%
Taylor expanded in z around 0 65.1%
Final simplification59.3%
(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.7%
Final simplification99.7%
(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(y - x) * Float64(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[(y - x), $MachinePrecision] * N[(6.0 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(y - x\right) \cdot \left(6 \cdot z\right)
\end{array}
Initial program 99.7%
associate-*l*99.8%
Simplified99.8%
Final simplification99.8%
(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.7%
Taylor expanded in z around 0 34.5%
Final simplification34.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 2024043
(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)))