
(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 16 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.5%
+-commutative99.5%
associate-*l*99.8%
fma-define99.8%
Simplified99.8%
Final simplification99.8%
(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%
associate-*r*99.8%
+-commutative99.8%
*-commutative99.8%
associate-*r*99.7%
fma-define99.8%
Applied egg-rr99.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 -3.7e+235)
t_0
(if (<= z -1.55e+73)
t_1
(if (<= z -1.1e-79)
t_0
(if (<= z 1e-23)
x
(if (or (<= z 1.95e+73)
(and (not (<= z 1.45e+138)) (<= z 5.5e+289)))
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 <= -3.7e+235) {
tmp = t_0;
} else if (z <= -1.55e+73) {
tmp = t_1;
} else if (z <= -1.1e-79) {
tmp = t_0;
} else if (z <= 1e-23) {
tmp = x;
} else if ((z <= 1.95e+73) || (!(z <= 1.45e+138) && (z <= 5.5e+289))) {
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 <= (-3.7d+235)) then
tmp = t_0
else if (z <= (-1.55d+73)) then
tmp = t_1
else if (z <= (-1.1d-79)) then
tmp = t_0
else if (z <= 1d-23) then
tmp = x
else if ((z <= 1.95d+73) .or. (.not. (z <= 1.45d+138)) .and. (z <= 5.5d+289)) 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 <= -3.7e+235) {
tmp = t_0;
} else if (z <= -1.55e+73) {
tmp = t_1;
} else if (z <= -1.1e-79) {
tmp = t_0;
} else if (z <= 1e-23) {
tmp = x;
} else if ((z <= 1.95e+73) || (!(z <= 1.45e+138) && (z <= 5.5e+289))) {
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 <= -3.7e+235: tmp = t_0 elif z <= -1.55e+73: tmp = t_1 elif z <= -1.1e-79: tmp = t_0 elif z <= 1e-23: tmp = x elif (z <= 1.95e+73) or (not (z <= 1.45e+138) and (z <= 5.5e+289)): 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 <= -3.7e+235) tmp = t_0; elseif (z <= -1.55e+73) tmp = t_1; elseif (z <= -1.1e-79) tmp = t_0; elseif (z <= 1e-23) tmp = x; elseif ((z <= 1.95e+73) || (!(z <= 1.45e+138) && (z <= 5.5e+289))) 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 <= -3.7e+235) tmp = t_0; elseif (z <= -1.55e+73) tmp = t_1; elseif (z <= -1.1e-79) tmp = t_0; elseif (z <= 1e-23) tmp = x; elseif ((z <= 1.95e+73) || (~((z <= 1.45e+138)) && (z <= 5.5e+289))) 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, -3.7e+235], t$95$0, If[LessEqual[z, -1.55e+73], t$95$1, If[LessEqual[z, -1.1e-79], t$95$0, If[LessEqual[z, 1e-23], x, If[Or[LessEqual[z, 1.95e+73], And[N[Not[LessEqual[z, 1.45e+138]], $MachinePrecision], LessEqual[z, 5.5e+289]]], 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 -3.7 \cdot 10^{+235}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;z \leq -1.55 \cdot 10^{+73}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -1.1 \cdot 10^{-79}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;z \leq 10^{-23}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 1.95 \cdot 10^{+73} \lor \neg \left(z \leq 1.45 \cdot 10^{+138}\right) \land z \leq 5.5 \cdot 10^{+289}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -3.6999999999999998e235 or -1.55e73 < z < -1.0999999999999999e-79 or 9.9999999999999996e-24 < z < 1.95e73 or 1.45000000000000005e138 < z < 5.4999999999999999e289Initial program 99.8%
associate-*r*99.7%
+-commutative99.7%
*-commutative99.7%
associate-*r*99.6%
fma-define99.7%
Applied egg-rr99.7%
Taylor expanded in y around inf 64.0%
*-commutative64.0%
Simplified64.0%
if -3.6999999999999998e235 < z < -1.55e73 or 1.95e73 < z < 1.45000000000000005e138 or 5.4999999999999999e289 < z Initial program 99.8%
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 99.7%
Taylor expanded in y around 0 68.6%
if -1.0999999999999999e-79 < z < 9.9999999999999996e-24Initial program 99.1%
Taylor expanded in z around 0 79.2%
Final simplification70.9%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* 6.0 (* y z))))
(if (<= z -3.4e+233)
t_0
(if (<= z -1.45e+66)
(* x (* z -6.0))
(if (<= z -9e-80)
t_0
(if (<= z 3.3e-25)
x
(if (or (<= z 1.45e+73) (and (not (<= z 3.8e+133)) (<= z 3.7e+287)))
t_0
(* -6.0 (* x z)))))))))
double code(double x, double y, double z) {
double t_0 = 6.0 * (y * z);
double tmp;
if (z <= -3.4e+233) {
tmp = t_0;
} else if (z <= -1.45e+66) {
tmp = x * (z * -6.0);
} else if (z <= -9e-80) {
tmp = t_0;
} else if (z <= 3.3e-25) {
tmp = x;
} else if ((z <= 1.45e+73) || (!(z <= 3.8e+133) && (z <= 3.7e+287))) {
tmp = t_0;
} else {
tmp = -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) :: t_0
real(8) :: tmp
t_0 = 6.0d0 * (y * z)
if (z <= (-3.4d+233)) then
tmp = t_0
else if (z <= (-1.45d+66)) then
tmp = x * (z * (-6.0d0))
else if (z <= (-9d-80)) then
tmp = t_0
else if (z <= 3.3d-25) then
tmp = x
else if ((z <= 1.45d+73) .or. (.not. (z <= 3.8d+133)) .and. (z <= 3.7d+287)) then
tmp = t_0
else
tmp = (-6.0d0) * (x * z)
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 <= -3.4e+233) {
tmp = t_0;
} else if (z <= -1.45e+66) {
tmp = x * (z * -6.0);
} else if (z <= -9e-80) {
tmp = t_0;
} else if (z <= 3.3e-25) {
tmp = x;
} else if ((z <= 1.45e+73) || (!(z <= 3.8e+133) && (z <= 3.7e+287))) {
tmp = t_0;
} else {
tmp = -6.0 * (x * z);
}
return tmp;
}
def code(x, y, z): t_0 = 6.0 * (y * z) tmp = 0 if z <= -3.4e+233: tmp = t_0 elif z <= -1.45e+66: tmp = x * (z * -6.0) elif z <= -9e-80: tmp = t_0 elif z <= 3.3e-25: tmp = x elif (z <= 1.45e+73) or (not (z <= 3.8e+133) and (z <= 3.7e+287)): tmp = t_0 else: tmp = -6.0 * (x * z) return tmp
function code(x, y, z) t_0 = Float64(6.0 * Float64(y * z)) tmp = 0.0 if (z <= -3.4e+233) tmp = t_0; elseif (z <= -1.45e+66) tmp = Float64(x * Float64(z * -6.0)); elseif (z <= -9e-80) tmp = t_0; elseif (z <= 3.3e-25) tmp = x; elseif ((z <= 1.45e+73) || (!(z <= 3.8e+133) && (z <= 3.7e+287))) tmp = t_0; else tmp = Float64(-6.0 * Float64(x * z)); end return tmp end
function tmp_2 = code(x, y, z) t_0 = 6.0 * (y * z); tmp = 0.0; if (z <= -3.4e+233) tmp = t_0; elseif (z <= -1.45e+66) tmp = x * (z * -6.0); elseif (z <= -9e-80) tmp = t_0; elseif (z <= 3.3e-25) tmp = x; elseif ((z <= 1.45e+73) || (~((z <= 3.8e+133)) && (z <= 3.7e+287))) tmp = t_0; else tmp = -6.0 * (x * z); end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(6.0 * N[(y * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.4e+233], t$95$0, If[LessEqual[z, -1.45e+66], N[(x * N[(z * -6.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -9e-80], t$95$0, If[LessEqual[z, 3.3e-25], x, If[Or[LessEqual[z, 1.45e+73], And[N[Not[LessEqual[z, 3.8e+133]], $MachinePrecision], LessEqual[z, 3.7e+287]]], t$95$0, N[(-6.0 * N[(x * z), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 6 \cdot \left(y \cdot z\right)\\
\mathbf{if}\;z \leq -3.4 \cdot 10^{+233}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;z \leq -1.45 \cdot 10^{+66}:\\
\;\;\;\;x \cdot \left(z \cdot -6\right)\\
\mathbf{elif}\;z \leq -9 \cdot 10^{-80}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;z \leq 3.3 \cdot 10^{-25}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 1.45 \cdot 10^{+73} \lor \neg \left(z \leq 3.8 \cdot 10^{+133}\right) \land z \leq 3.7 \cdot 10^{+287}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;-6 \cdot \left(x \cdot z\right)\\
\end{array}
\end{array}
if z < -3.40000000000000022e233 or -1.44999999999999993e66 < z < -9.0000000000000006e-80 or 3.2999999999999998e-25 < z < 1.4500000000000001e73 or 3.8000000000000002e133 < z < 3.69999999999999997e287Initial program 99.8%
associate-*r*99.7%
+-commutative99.7%
*-commutative99.7%
associate-*r*99.7%
fma-define99.7%
Applied egg-rr99.7%
Taylor expanded in y around inf 64.3%
*-commutative64.3%
Simplified64.3%
if -3.40000000000000022e233 < z < -1.44999999999999993e66Initial program 99.8%
associate-*r*99.8%
+-commutative99.8%
*-commutative99.8%
associate-*r*99.6%
fma-define99.5%
Applied egg-rr99.5%
Taylor expanded in z around inf 99.6%
Taylor expanded in y around 0 62.7%
*-commutative62.7%
associate-*l*63.0%
Simplified63.0%
if -9.0000000000000006e-80 < z < 3.2999999999999998e-25Initial program 99.1%
Taylor expanded in z around 0 79.2%
if 1.4500000000000001e73 < z < 3.8000000000000002e133 or 3.69999999999999997e287 < z Initial program 99.9%
associate-*r*99.7%
+-commutative99.7%
*-commutative99.7%
associate-*r*99.7%
fma-define99.8%
Applied egg-rr99.8%
Taylor expanded in z around inf 99.7%
Taylor expanded in y around 0 74.5%
Final simplification70.9%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* 6.0 (* y z))))
(if (<= z -5e+232)
t_0
(if (<= z -7.5e+70)
(* x (* z -6.0))
(if (<= z -1.1e-79)
(* y (* 6.0 z))
(if (<= z 6e-23)
x
(if (or (<= z 6.8e+72)
(and (not (<= z 1.85e+146)) (<= z 1.05e+286)))
t_0
(* -6.0 (* x z)))))))))
double code(double x, double y, double z) {
double t_0 = 6.0 * (y * z);
double tmp;
if (z <= -5e+232) {
tmp = t_0;
} else if (z <= -7.5e+70) {
tmp = x * (z * -6.0);
} else if (z <= -1.1e-79) {
tmp = y * (6.0 * z);
} else if (z <= 6e-23) {
tmp = x;
} else if ((z <= 6.8e+72) || (!(z <= 1.85e+146) && (z <= 1.05e+286))) {
tmp = t_0;
} else {
tmp = -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) :: t_0
real(8) :: tmp
t_0 = 6.0d0 * (y * z)
if (z <= (-5d+232)) then
tmp = t_0
else if (z <= (-7.5d+70)) then
tmp = x * (z * (-6.0d0))
else if (z <= (-1.1d-79)) then
tmp = y * (6.0d0 * z)
else if (z <= 6d-23) then
tmp = x
else if ((z <= 6.8d+72) .or. (.not. (z <= 1.85d+146)) .and. (z <= 1.05d+286)) then
tmp = t_0
else
tmp = (-6.0d0) * (x * z)
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 <= -5e+232) {
tmp = t_0;
} else if (z <= -7.5e+70) {
tmp = x * (z * -6.0);
} else if (z <= -1.1e-79) {
tmp = y * (6.0 * z);
} else if (z <= 6e-23) {
tmp = x;
} else if ((z <= 6.8e+72) || (!(z <= 1.85e+146) && (z <= 1.05e+286))) {
tmp = t_0;
} else {
tmp = -6.0 * (x * z);
}
return tmp;
}
def code(x, y, z): t_0 = 6.0 * (y * z) tmp = 0 if z <= -5e+232: tmp = t_0 elif z <= -7.5e+70: tmp = x * (z * -6.0) elif z <= -1.1e-79: tmp = y * (6.0 * z) elif z <= 6e-23: tmp = x elif (z <= 6.8e+72) or (not (z <= 1.85e+146) and (z <= 1.05e+286)): tmp = t_0 else: tmp = -6.0 * (x * z) return tmp
function code(x, y, z) t_0 = Float64(6.0 * Float64(y * z)) tmp = 0.0 if (z <= -5e+232) tmp = t_0; elseif (z <= -7.5e+70) tmp = Float64(x * Float64(z * -6.0)); elseif (z <= -1.1e-79) tmp = Float64(y * Float64(6.0 * z)); elseif (z <= 6e-23) tmp = x; elseif ((z <= 6.8e+72) || (!(z <= 1.85e+146) && (z <= 1.05e+286))) tmp = t_0; else tmp = Float64(-6.0 * Float64(x * z)); end return tmp end
function tmp_2 = code(x, y, z) t_0 = 6.0 * (y * z); tmp = 0.0; if (z <= -5e+232) tmp = t_0; elseif (z <= -7.5e+70) tmp = x * (z * -6.0); elseif (z <= -1.1e-79) tmp = y * (6.0 * z); elseif (z <= 6e-23) tmp = x; elseif ((z <= 6.8e+72) || (~((z <= 1.85e+146)) && (z <= 1.05e+286))) tmp = t_0; else tmp = -6.0 * (x * z); end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(6.0 * N[(y * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -5e+232], t$95$0, If[LessEqual[z, -7.5e+70], N[(x * N[(z * -6.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.1e-79], N[(y * N[(6.0 * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6e-23], x, If[Or[LessEqual[z, 6.8e+72], And[N[Not[LessEqual[z, 1.85e+146]], $MachinePrecision], LessEqual[z, 1.05e+286]]], t$95$0, N[(-6.0 * N[(x * z), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 6 \cdot \left(y \cdot z\right)\\
\mathbf{if}\;z \leq -5 \cdot 10^{+232}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;z \leq -7.5 \cdot 10^{+70}:\\
\;\;\;\;x \cdot \left(z \cdot -6\right)\\
\mathbf{elif}\;z \leq -1.1 \cdot 10^{-79}:\\
\;\;\;\;y \cdot \left(6 \cdot z\right)\\
\mathbf{elif}\;z \leq 6 \cdot 10^{-23}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 6.8 \cdot 10^{+72} \lor \neg \left(z \leq 1.85 \cdot 10^{+146}\right) \land z \leq 1.05 \cdot 10^{+286}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;-6 \cdot \left(x \cdot z\right)\\
\end{array}
\end{array}
if z < -4.99999999999999987e232 or 6.00000000000000006e-23 < z < 6.7999999999999997e72 or 1.85000000000000002e146 < z < 1.05e286Initial program 99.7%
associate-*r*99.8%
+-commutative99.8%
*-commutative99.8%
associate-*r*99.7%
fma-define99.8%
Applied egg-rr99.8%
Taylor expanded in y around inf 63.9%
*-commutative63.9%
Simplified63.9%
if -4.99999999999999987e232 < z < -7.50000000000000031e70Initial program 99.8%
associate-*r*99.8%
+-commutative99.8%
*-commutative99.8%
associate-*r*99.7%
fma-define99.5%
Applied egg-rr99.5%
Taylor expanded in z around inf 99.7%
Taylor expanded in y around 0 63.7%
*-commutative63.7%
associate-*l*63.8%
Simplified63.8%
if -7.50000000000000031e70 < z < -1.0999999999999999e-79Initial program 99.8%
associate-*r*99.7%
+-commutative99.7%
*-commutative99.7%
associate-*r*99.4%
fma-define99.6%
Applied egg-rr99.6%
Taylor expanded in y around inf 64.3%
*-commutative64.3%
associate-*r*64.4%
Simplified64.4%
if -1.0999999999999999e-79 < z < 6.00000000000000006e-23Initial program 99.1%
Taylor expanded in z around 0 79.2%
if 6.7999999999999997e72 < z < 1.85000000000000002e146 or 1.05e286 < z Initial program 99.9%
associate-*r*99.7%
+-commutative99.7%
*-commutative99.7%
associate-*r*99.7%
fma-define99.8%
Applied egg-rr99.8%
Taylor expanded in z around inf 99.7%
Taylor expanded in y around 0 74.5%
Final simplification71.0%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* 6.0 (* y z))))
(if (<= z -1.7e+232)
t_0
(if (<= z -2.75e+69)
(* x (* z -6.0))
(if (<= z -1e-79)
(* y (* 6.0 z))
(if (<= z 2.7e-23)
x
(if (<= z 1.9e+73)
t_0
(if (<= z 7.5e+143)
(* z (* x -6.0))
(if (<= z 1.05e+291) t_0 (* -6.0 (* x z)))))))))))
double code(double x, double y, double z) {
double t_0 = 6.0 * (y * z);
double tmp;
if (z <= -1.7e+232) {
tmp = t_0;
} else if (z <= -2.75e+69) {
tmp = x * (z * -6.0);
} else if (z <= -1e-79) {
tmp = y * (6.0 * z);
} else if (z <= 2.7e-23) {
tmp = x;
} else if (z <= 1.9e+73) {
tmp = t_0;
} else if (z <= 7.5e+143) {
tmp = z * (x * -6.0);
} else if (z <= 1.05e+291) {
tmp = t_0;
} else {
tmp = -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) :: t_0
real(8) :: tmp
t_0 = 6.0d0 * (y * z)
if (z <= (-1.7d+232)) then
tmp = t_0
else if (z <= (-2.75d+69)) then
tmp = x * (z * (-6.0d0))
else if (z <= (-1d-79)) then
tmp = y * (6.0d0 * z)
else if (z <= 2.7d-23) then
tmp = x
else if (z <= 1.9d+73) then
tmp = t_0
else if (z <= 7.5d+143) then
tmp = z * (x * (-6.0d0))
else if (z <= 1.05d+291) then
tmp = t_0
else
tmp = (-6.0d0) * (x * z)
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 <= -1.7e+232) {
tmp = t_0;
} else if (z <= -2.75e+69) {
tmp = x * (z * -6.0);
} else if (z <= -1e-79) {
tmp = y * (6.0 * z);
} else if (z <= 2.7e-23) {
tmp = x;
} else if (z <= 1.9e+73) {
tmp = t_0;
} else if (z <= 7.5e+143) {
tmp = z * (x * -6.0);
} else if (z <= 1.05e+291) {
tmp = t_0;
} else {
tmp = -6.0 * (x * z);
}
return tmp;
}
def code(x, y, z): t_0 = 6.0 * (y * z) tmp = 0 if z <= -1.7e+232: tmp = t_0 elif z <= -2.75e+69: tmp = x * (z * -6.0) elif z <= -1e-79: tmp = y * (6.0 * z) elif z <= 2.7e-23: tmp = x elif z <= 1.9e+73: tmp = t_0 elif z <= 7.5e+143: tmp = z * (x * -6.0) elif z <= 1.05e+291: tmp = t_0 else: tmp = -6.0 * (x * z) return tmp
function code(x, y, z) t_0 = Float64(6.0 * Float64(y * z)) tmp = 0.0 if (z <= -1.7e+232) tmp = t_0; elseif (z <= -2.75e+69) tmp = Float64(x * Float64(z * -6.0)); elseif (z <= -1e-79) tmp = Float64(y * Float64(6.0 * z)); elseif (z <= 2.7e-23) tmp = x; elseif (z <= 1.9e+73) tmp = t_0; elseif (z <= 7.5e+143) tmp = Float64(z * Float64(x * -6.0)); elseif (z <= 1.05e+291) tmp = t_0; else tmp = Float64(-6.0 * Float64(x * z)); end return tmp end
function tmp_2 = code(x, y, z) t_0 = 6.0 * (y * z); tmp = 0.0; if (z <= -1.7e+232) tmp = t_0; elseif (z <= -2.75e+69) tmp = x * (z * -6.0); elseif (z <= -1e-79) tmp = y * (6.0 * z); elseif (z <= 2.7e-23) tmp = x; elseif (z <= 1.9e+73) tmp = t_0; elseif (z <= 7.5e+143) tmp = z * (x * -6.0); elseif (z <= 1.05e+291) tmp = t_0; else tmp = -6.0 * (x * z); end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(6.0 * N[(y * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.7e+232], t$95$0, If[LessEqual[z, -2.75e+69], N[(x * N[(z * -6.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1e-79], N[(y * N[(6.0 * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.7e-23], x, If[LessEqual[z, 1.9e+73], t$95$0, If[LessEqual[z, 7.5e+143], N[(z * N[(x * -6.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.05e+291], t$95$0, N[(-6.0 * N[(x * z), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 6 \cdot \left(y \cdot z\right)\\
\mathbf{if}\;z \leq -1.7 \cdot 10^{+232}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;z \leq -2.75 \cdot 10^{+69}:\\
\;\;\;\;x \cdot \left(z \cdot -6\right)\\
\mathbf{elif}\;z \leq -1 \cdot 10^{-79}:\\
\;\;\;\;y \cdot \left(6 \cdot z\right)\\
\mathbf{elif}\;z \leq 2.7 \cdot 10^{-23}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 1.9 \cdot 10^{+73}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;z \leq 7.5 \cdot 10^{+143}:\\
\;\;\;\;z \cdot \left(x \cdot -6\right)\\
\mathbf{elif}\;z \leq 1.05 \cdot 10^{+291}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;-6 \cdot \left(x \cdot z\right)\\
\end{array}
\end{array}
if z < -1.6999999999999999e232 or 2.69999999999999985e-23 < z < 1.90000000000000011e73 or 7.49999999999999974e143 < z < 1.05e291Initial program 99.7%
associate-*r*99.8%
+-commutative99.8%
*-commutative99.8%
associate-*r*99.7%
fma-define99.8%
Applied egg-rr99.8%
Taylor expanded in y around inf 63.9%
*-commutative63.9%
Simplified63.9%
if -1.6999999999999999e232 < z < -2.75000000000000001e69Initial program 99.8%
associate-*r*99.8%
+-commutative99.8%
*-commutative99.8%
associate-*r*99.7%
fma-define99.5%
Applied egg-rr99.5%
Taylor expanded in z around inf 99.7%
Taylor expanded in y around 0 63.7%
*-commutative63.7%
associate-*l*63.8%
Simplified63.8%
if -2.75000000000000001e69 < z < -1e-79Initial program 99.8%
associate-*r*99.7%
+-commutative99.7%
*-commutative99.7%
associate-*r*99.4%
fma-define99.6%
Applied egg-rr99.6%
Taylor expanded in y around inf 64.3%
*-commutative64.3%
associate-*r*64.4%
Simplified64.4%
if -1e-79 < z < 2.69999999999999985e-23Initial program 99.1%
Taylor expanded in z around 0 79.2%
if 1.90000000000000011e73 < z < 7.49999999999999974e143Initial program 99.8%
associate-*r*99.6%
+-commutative99.6%
*-commutative99.6%
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 65.5%
*-commutative65.5%
associate-*l*65.5%
Simplified65.5%
Taylor expanded in x around 0 65.5%
associate-*r*65.5%
*-commutative65.5%
Simplified65.5%
if 1.05e291 < z Initial program 100.0%
associate-*r*100.0%
+-commutative100.0%
*-commutative100.0%
associate-*r*100.0%
fma-define100.0%
Applied egg-rr100.0%
Taylor expanded in z around inf 100.0%
Taylor expanded in y around 0 100.0%
Final simplification71.0%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* 6.0 (* y z))))
(if (<= z -1.22e+232)
t_0
(if (<= z -2.65e+73)
(* x (* z -6.0))
(if (<= z -1.1e-79)
(* z (* y 6.0))
(if (<= z 2.75e-24)
x
(if (<= z 7e+72)
t_0
(if (<= z 3.4e+133)
(* z (* x -6.0))
(if (<= z 2e+291) t_0 (* -6.0 (* x z)))))))))))
double code(double x, double y, double z) {
double t_0 = 6.0 * (y * z);
double tmp;
if (z <= -1.22e+232) {
tmp = t_0;
} else if (z <= -2.65e+73) {
tmp = x * (z * -6.0);
} else if (z <= -1.1e-79) {
tmp = z * (y * 6.0);
} else if (z <= 2.75e-24) {
tmp = x;
} else if (z <= 7e+72) {
tmp = t_0;
} else if (z <= 3.4e+133) {
tmp = z * (x * -6.0);
} else if (z <= 2e+291) {
tmp = t_0;
} else {
tmp = -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) :: t_0
real(8) :: tmp
t_0 = 6.0d0 * (y * z)
if (z <= (-1.22d+232)) then
tmp = t_0
else if (z <= (-2.65d+73)) then
tmp = x * (z * (-6.0d0))
else if (z <= (-1.1d-79)) then
tmp = z * (y * 6.0d0)
else if (z <= 2.75d-24) then
tmp = x
else if (z <= 7d+72) then
tmp = t_0
else if (z <= 3.4d+133) then
tmp = z * (x * (-6.0d0))
else if (z <= 2d+291) then
tmp = t_0
else
tmp = (-6.0d0) * (x * z)
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 <= -1.22e+232) {
tmp = t_0;
} else if (z <= -2.65e+73) {
tmp = x * (z * -6.0);
} else if (z <= -1.1e-79) {
tmp = z * (y * 6.0);
} else if (z <= 2.75e-24) {
tmp = x;
} else if (z <= 7e+72) {
tmp = t_0;
} else if (z <= 3.4e+133) {
tmp = z * (x * -6.0);
} else if (z <= 2e+291) {
tmp = t_0;
} else {
tmp = -6.0 * (x * z);
}
return tmp;
}
def code(x, y, z): t_0 = 6.0 * (y * z) tmp = 0 if z <= -1.22e+232: tmp = t_0 elif z <= -2.65e+73: tmp = x * (z * -6.0) elif z <= -1.1e-79: tmp = z * (y * 6.0) elif z <= 2.75e-24: tmp = x elif z <= 7e+72: tmp = t_0 elif z <= 3.4e+133: tmp = z * (x * -6.0) elif z <= 2e+291: tmp = t_0 else: tmp = -6.0 * (x * z) return tmp
function code(x, y, z) t_0 = Float64(6.0 * Float64(y * z)) tmp = 0.0 if (z <= -1.22e+232) tmp = t_0; elseif (z <= -2.65e+73) tmp = Float64(x * Float64(z * -6.0)); elseif (z <= -1.1e-79) tmp = Float64(z * Float64(y * 6.0)); elseif (z <= 2.75e-24) tmp = x; elseif (z <= 7e+72) tmp = t_0; elseif (z <= 3.4e+133) tmp = Float64(z * Float64(x * -6.0)); elseif (z <= 2e+291) tmp = t_0; else tmp = Float64(-6.0 * Float64(x * z)); end return tmp end
function tmp_2 = code(x, y, z) t_0 = 6.0 * (y * z); tmp = 0.0; if (z <= -1.22e+232) tmp = t_0; elseif (z <= -2.65e+73) tmp = x * (z * -6.0); elseif (z <= -1.1e-79) tmp = z * (y * 6.0); elseif (z <= 2.75e-24) tmp = x; elseif (z <= 7e+72) tmp = t_0; elseif (z <= 3.4e+133) tmp = z * (x * -6.0); elseif (z <= 2e+291) tmp = t_0; else tmp = -6.0 * (x * z); end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(6.0 * N[(y * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.22e+232], t$95$0, If[LessEqual[z, -2.65e+73], N[(x * N[(z * -6.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.1e-79], N[(z * N[(y * 6.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.75e-24], x, If[LessEqual[z, 7e+72], t$95$0, If[LessEqual[z, 3.4e+133], N[(z * N[(x * -6.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2e+291], t$95$0, N[(-6.0 * N[(x * z), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 6 \cdot \left(y \cdot z\right)\\
\mathbf{if}\;z \leq -1.22 \cdot 10^{+232}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;z \leq -2.65 \cdot 10^{+73}:\\
\;\;\;\;x \cdot \left(z \cdot -6\right)\\
\mathbf{elif}\;z \leq -1.1 \cdot 10^{-79}:\\
\;\;\;\;z \cdot \left(y \cdot 6\right)\\
\mathbf{elif}\;z \leq 2.75 \cdot 10^{-24}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 7 \cdot 10^{+72}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;z \leq 3.4 \cdot 10^{+133}:\\
\;\;\;\;z \cdot \left(x \cdot -6\right)\\
\mathbf{elif}\;z \leq 2 \cdot 10^{+291}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;-6 \cdot \left(x \cdot z\right)\\
\end{array}
\end{array}
if z < -1.21999999999999994e232 or 2.7499999999999999e-24 < z < 7.0000000000000002e72 or 3.39999999999999987e133 < z < 1.9999999999999999e291Initial program 99.7%
associate-*r*99.8%
+-commutative99.8%
*-commutative99.8%
associate-*r*99.7%
fma-define99.8%
Applied egg-rr99.8%
Taylor expanded in y around inf 63.9%
*-commutative63.9%
Simplified63.9%
if -1.21999999999999994e232 < z < -2.64999999999999998e73Initial program 99.8%
associate-*r*99.8%
+-commutative99.8%
*-commutative99.8%
associate-*r*99.7%
fma-define99.5%
Applied egg-rr99.5%
Taylor expanded in z around inf 99.7%
Taylor expanded in y around 0 63.7%
*-commutative63.7%
associate-*l*63.8%
Simplified63.8%
if -2.64999999999999998e73 < z < -1.0999999999999999e-79Initial program 99.8%
associate-*r*99.7%
+-commutative99.7%
*-commutative99.7%
associate-*r*99.4%
fma-define99.6%
Applied egg-rr99.6%
Taylor expanded in y around inf 64.3%
*-commutative64.3%
associate-*r*64.4%
*-commutative64.4%
associate-*r*64.6%
Simplified64.6%
if -1.0999999999999999e-79 < z < 2.7499999999999999e-24Initial program 99.1%
Taylor expanded in z around 0 79.2%
if 7.0000000000000002e72 < z < 3.39999999999999987e133Initial program 99.8%
associate-*r*99.6%
+-commutative99.6%
*-commutative99.6%
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 65.5%
*-commutative65.5%
associate-*l*65.5%
Simplified65.5%
Taylor expanded in x around 0 65.5%
associate-*r*65.5%
*-commutative65.5%
Simplified65.5%
if 1.9999999999999999e291 < z Initial program 100.0%
associate-*r*100.0%
+-commutative100.0%
*-commutative100.0%
associate-*r*100.0%
fma-define100.0%
Applied egg-rr100.0%
Taylor expanded in z around inf 100.0%
Taylor expanded in y around 0 100.0%
Final simplification71.0%
(FPCore (x y z) :precision binary64 (if (or (<= z -1.6e-83) (not (<= z 4.4e-24))) (* 6.0 (* (- y x) z)) x))
double code(double x, double y, double z) {
double tmp;
if ((z <= -1.6e-83) || !(z <= 4.4e-24)) {
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 <= (-1.6d-83)) .or. (.not. (z <= 4.4d-24))) 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 <= -1.6e-83) || !(z <= 4.4e-24)) {
tmp = 6.0 * ((y - x) * z);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -1.6e-83) or not (z <= 4.4e-24): tmp = 6.0 * ((y - x) * z) else: tmp = x return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -1.6e-83) || !(z <= 4.4e-24)) 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 <= -1.6e-83) || ~((z <= 4.4e-24))) tmp = 6.0 * ((y - x) * z); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -1.6e-83], N[Not[LessEqual[z, 4.4e-24]], $MachinePrecision]], N[(6.0 * N[(N[(y - x), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.6 \cdot 10^{-83} \lor \neg \left(z \leq 4.4 \cdot 10^{-24}\right):\\
\;\;\;\;6 \cdot \left(\left(y - x\right) \cdot z\right)\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -1.6000000000000001e-83 or 4.40000000000000003e-24 < z Initial program 99.8%
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 92.8%
if -1.6000000000000001e-83 < z < 4.40000000000000003e-24Initial program 99.1%
Taylor expanded in z around 0 79.8%
Final simplification87.8%
(FPCore (x y z) :precision binary64 (if (or (<= z -1.55e-82) (not (<= z 1.02e-22))) (* (- y x) (* 6.0 z)) x))
double code(double x, double y, double z) {
double tmp;
if ((z <= -1.55e-82) || !(z <= 1.02e-22)) {
tmp = (y - x) * (6.0 * 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 <= (-1.55d-82)) .or. (.not. (z <= 1.02d-22))) then
tmp = (y - x) * (6.0d0 * z)
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((z <= -1.55e-82) || !(z <= 1.02e-22)) {
tmp = (y - x) * (6.0 * z);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -1.55e-82) or not (z <= 1.02e-22): tmp = (y - x) * (6.0 * z) else: tmp = x return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -1.55e-82) || !(z <= 1.02e-22)) tmp = Float64(Float64(y - x) * Float64(6.0 * z)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -1.55e-82) || ~((z <= 1.02e-22))) tmp = (y - x) * (6.0 * z); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -1.55e-82], N[Not[LessEqual[z, 1.02e-22]], $MachinePrecision]], N[(N[(y - x), $MachinePrecision] * N[(6.0 * z), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.55 \cdot 10^{-82} \lor \neg \left(z \leq 1.02 \cdot 10^{-22}\right):\\
\;\;\;\;\left(y - x\right) \cdot \left(6 \cdot z\right)\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -1.55e-82 or 1.02000000000000002e-22 < z Initial program 99.8%
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 92.8%
*-commutative92.8%
*-commutative92.8%
associate-*l*92.9%
Simplified92.9%
if -1.55e-82 < z < 1.02000000000000002e-22Initial program 99.1%
Taylor expanded in z around 0 79.8%
Final simplification87.8%
(FPCore (x y z) :precision binary64 (if (or (<= z -7e-83) (not (<= z 8.5e-24))) (* (- y x) (* 6.0 z)) (+ x (* -6.0 (* x z)))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -7e-83) || !(z <= 8.5e-24)) {
tmp = (y - x) * (6.0 * 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 ((z <= (-7d-83)) .or. (.not. (z <= 8.5d-24))) then
tmp = (y - x) * (6.0d0 * 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 ((z <= -7e-83) || !(z <= 8.5e-24)) {
tmp = (y - x) * (6.0 * z);
} else {
tmp = x + (-6.0 * (x * z));
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -7e-83) or not (z <= 8.5e-24): tmp = (y - x) * (6.0 * z) else: tmp = x + (-6.0 * (x * z)) return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -7e-83) || !(z <= 8.5e-24)) tmp = Float64(Float64(y - x) * Float64(6.0 * 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 ((z <= -7e-83) || ~((z <= 8.5e-24))) tmp = (y - x) * (6.0 * z); else tmp = x + (-6.0 * (x * z)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -7e-83], N[Not[LessEqual[z, 8.5e-24]], $MachinePrecision]], N[(N[(y - x), $MachinePrecision] * N[(6.0 * z), $MachinePrecision]), $MachinePrecision], N[(x + N[(-6.0 * N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -7 \cdot 10^{-83} \lor \neg \left(z \leq 8.5 \cdot 10^{-24}\right):\\
\;\;\;\;\left(y - x\right) \cdot \left(6 \cdot z\right)\\
\mathbf{else}:\\
\;\;\;\;x + -6 \cdot \left(x \cdot z\right)\\
\end{array}
\end{array}
if z < -7.00000000000000061e-83 or 8.5000000000000002e-24 < z Initial program 99.8%
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 92.8%
*-commutative92.8%
*-commutative92.8%
associate-*l*92.9%
Simplified92.9%
if -7.00000000000000061e-83 < z < 8.5000000000000002e-24Initial program 99.1%
Taylor expanded in y around 0 79.8%
Final simplification87.8%
(FPCore (x y z) :precision binary64 (if (or (<= z -44000000000000.0) (not (<= z 0.17))) (* (- y x) (* 6.0 z)) (+ x (* 6.0 (* y z)))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -44000000000000.0) || !(z <= 0.17)) {
tmp = (y - x) * (6.0 * 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 ((z <= (-44000000000000.0d0)) .or. (.not. (z <= 0.17d0))) then
tmp = (y - x) * (6.0d0 * 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 ((z <= -44000000000000.0) || !(z <= 0.17)) {
tmp = (y - x) * (6.0 * z);
} else {
tmp = x + (6.0 * (y * z));
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -44000000000000.0) or not (z <= 0.17): tmp = (y - x) * (6.0 * z) else: tmp = x + (6.0 * (y * z)) return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -44000000000000.0) || !(z <= 0.17)) tmp = Float64(Float64(y - x) * Float64(6.0 * 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 ((z <= -44000000000000.0) || ~((z <= 0.17))) tmp = (y - x) * (6.0 * z); else tmp = x + (6.0 * (y * z)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -44000000000000.0], N[Not[LessEqual[z, 0.17]], $MachinePrecision]], N[(N[(y - x), $MachinePrecision] * N[(6.0 * z), $MachinePrecision]), $MachinePrecision], N[(x + N[(6.0 * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -44000000000000 \lor \neg \left(z \leq 0.17\right):\\
\;\;\;\;\left(y - x\right) \cdot \left(6 \cdot z\right)\\
\mathbf{else}:\\
\;\;\;\;x + 6 \cdot \left(y \cdot z\right)\\
\end{array}
\end{array}
if z < -4.4e13 or 0.170000000000000012 < z Initial program 99.8%
associate-*r*99.7%
+-commutative99.7%
*-commutative99.7%
associate-*r*99.6%
fma-define99.7%
Applied egg-rr99.7%
Taylor expanded in z around inf 98.6%
*-commutative98.6%
*-commutative98.6%
associate-*l*98.7%
Simplified98.7%
if -4.4e13 < z < 0.170000000000000012Initial program 99.2%
Taylor expanded in y around inf 98.5%
*-commutative98.5%
Simplified98.5%
Final simplification98.6%
(FPCore (x y z) :precision binary64 (if (or (<= z -44000000000000.0) (not (<= z 0.17))) (* (- y x) (* 6.0 z)) (+ x (* z (* y 6.0)))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -44000000000000.0) || !(z <= 0.17)) {
tmp = (y - x) * (6.0 * 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 ((z <= (-44000000000000.0d0)) .or. (.not. (z <= 0.17d0))) then
tmp = (y - x) * (6.0d0 * 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 ((z <= -44000000000000.0) || !(z <= 0.17)) {
tmp = (y - x) * (6.0 * z);
} else {
tmp = x + (z * (y * 6.0));
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -44000000000000.0) or not (z <= 0.17): tmp = (y - x) * (6.0 * z) else: tmp = x + (z * (y * 6.0)) return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -44000000000000.0) || !(z <= 0.17)) tmp = Float64(Float64(y - x) * Float64(6.0 * 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 ((z <= -44000000000000.0) || ~((z <= 0.17))) tmp = (y - x) * (6.0 * z); else tmp = x + (z * (y * 6.0)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -44000000000000.0], N[Not[LessEqual[z, 0.17]], $MachinePrecision]], N[(N[(y - x), $MachinePrecision] * N[(6.0 * z), $MachinePrecision]), $MachinePrecision], N[(x + N[(z * N[(y * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -44000000000000 \lor \neg \left(z \leq 0.17\right):\\
\;\;\;\;\left(y - x\right) \cdot \left(6 \cdot z\right)\\
\mathbf{else}:\\
\;\;\;\;x + z \cdot \left(y \cdot 6\right)\\
\end{array}
\end{array}
if z < -4.4e13 or 0.170000000000000012 < z Initial program 99.8%
associate-*r*99.7%
+-commutative99.7%
*-commutative99.7%
associate-*r*99.6%
fma-define99.7%
Applied egg-rr99.7%
Taylor expanded in z around inf 98.6%
*-commutative98.6%
*-commutative98.6%
associate-*l*98.7%
Simplified98.7%
if -4.4e13 < z < 0.170000000000000012Initial program 99.2%
Taylor expanded in y around inf 98.5%
Final simplification98.6%
(FPCore (x y z) :precision binary64 (if (or (<= z -44000000000000.0) (not (<= z 0.17))) (* -6.0 (* x z)) x))
double code(double x, double y, double z) {
double tmp;
if ((z <= -44000000000000.0) || !(z <= 0.17)) {
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 <= (-44000000000000.0d0)) .or. (.not. (z <= 0.17d0))) 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 <= -44000000000000.0) || !(z <= 0.17)) {
tmp = -6.0 * (x * z);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -44000000000000.0) or not (z <= 0.17): tmp = -6.0 * (x * z) else: tmp = x return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -44000000000000.0) || !(z <= 0.17)) 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 <= -44000000000000.0) || ~((z <= 0.17))) tmp = -6.0 * (x * z); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -44000000000000.0], N[Not[LessEqual[z, 0.17]], $MachinePrecision]], N[(-6.0 * N[(x * z), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -44000000000000 \lor \neg \left(z \leq 0.17\right):\\
\;\;\;\;-6 \cdot \left(x \cdot z\right)\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -4.4e13 or 0.170000000000000012 < z Initial program 99.8%
associate-*r*99.7%
+-commutative99.7%
*-commutative99.7%
associate-*r*99.6%
fma-define99.7%
Applied egg-rr99.7%
Taylor expanded in z around inf 98.6%
Taylor expanded in y around 0 52.4%
if -4.4e13 < z < 0.170000000000000012Initial program 99.2%
Taylor expanded in z around 0 68.1%
Final simplification60.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.5%
Final simplification99.5%
(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.5%
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.5%
Taylor expanded in z around 0 35.6%
Final simplification35.6%
(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 2024044
(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)))