
(FPCore (x y z t a b) :precision binary64 (+ (+ (+ x (* y z)) (* t a)) (* (* a z) b)))
double code(double x, double y, double z, double t, double a, double b) {
return ((x + (y * z)) + (t * a)) + ((a * z) * b);
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = ((x + (y * z)) + (t * a)) + ((a * z) * b)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return ((x + (y * z)) + (t * a)) + ((a * z) * b);
}
def code(x, y, z, t, a, b): return ((x + (y * z)) + (t * a)) + ((a * z) * b)
function code(x, y, z, t, a, b) return Float64(Float64(Float64(x + Float64(y * z)) + Float64(t * a)) + Float64(Float64(a * z) * b)) end
function tmp = code(x, y, z, t, a, b) tmp = ((x + (y * z)) + (t * a)) + ((a * z) * b); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(x + N[(y * z), $MachinePrecision]), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision] + N[(N[(a * z), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 16 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b) :precision binary64 (+ (+ (+ x (* y z)) (* t a)) (* (* a z) b)))
double code(double x, double y, double z, double t, double a, double b) {
return ((x + (y * z)) + (t * a)) + ((a * z) * b);
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = ((x + (y * z)) + (t * a)) + ((a * z) * b)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return ((x + (y * z)) + (t * a)) + ((a * z) * b);
}
def code(x, y, z, t, a, b): return ((x + (y * z)) + (t * a)) + ((a * z) * b)
function code(x, y, z, t, a, b) return Float64(Float64(Float64(x + Float64(y * z)) + Float64(t * a)) + Float64(Float64(a * z) * b)) end
function tmp = code(x, y, z, t, a, b) tmp = ((x + (y * z)) + (t * a)) + ((a * z) * b); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(x + N[(y * z), $MachinePrecision]), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision] + N[(N[(a * z), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b
\end{array}
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (+ (+ (+ x (* z y)) (* a t)) (* b (* a z))))) (if (<= t_1 INFINITY) t_1 (* z (+ y (* a b))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((x + (z * y)) + (a * t)) + (b * (a * z));
double tmp;
if (t_1 <= ((double) INFINITY)) {
tmp = t_1;
} else {
tmp = z * (y + (a * b));
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((x + (z * y)) + (a * t)) + (b * (a * z));
double tmp;
if (t_1 <= Double.POSITIVE_INFINITY) {
tmp = t_1;
} else {
tmp = z * (y + (a * b));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = ((x + (z * y)) + (a * t)) + (b * (a * z)) tmp = 0 if t_1 <= math.inf: tmp = t_1 else: tmp = z * (y + (a * b)) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(Float64(x + Float64(z * y)) + Float64(a * t)) + Float64(b * Float64(a * z))) tmp = 0.0 if (t_1 <= Inf) tmp = t_1; else tmp = Float64(z * Float64(y + Float64(a * b))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = ((x + (z * y)) + (a * t)) + (b * (a * z)); tmp = 0.0; if (t_1 <= Inf) tmp = t_1; else tmp = z * (y + (a * b)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(x + N[(z * y), $MachinePrecision]), $MachinePrecision] + N[(a * t), $MachinePrecision]), $MachinePrecision] + N[(b * N[(a * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, Infinity], t$95$1, N[(z * N[(y + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(\left(x + z \cdot y\right) + a \cdot t\right) + b \cdot \left(a \cdot z\right)\\
\mathbf{if}\;t_1 \leq \infty:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;z \cdot \left(y + a \cdot b\right)\\
\end{array}
\end{array}
if (+.f64 (+.f64 (+.f64 x (*.f64 y z)) (*.f64 t a)) (*.f64 (*.f64 a z) b)) < +inf.0Initial program 97.2%
if +inf.0 < (+.f64 (+.f64 (+.f64 x (*.f64 y z)) (*.f64 t a)) (*.f64 (*.f64 a z) b)) Initial program 0.0%
*-commutative0.0%
associate-*l*7.7%
Simplified7.7%
Taylor expanded in z around inf 77.0%
Final simplification96.2%
(FPCore (x y z t a b) :precision binary64 (fma a (+ t (* z b)) (fma y z x)))
double code(double x, double y, double z, double t, double a, double b) {
return fma(a, (t + (z * b)), fma(y, z, x));
}
function code(x, y, z, t, a, b) return fma(a, Float64(t + Float64(z * b)), fma(y, z, x)) end
code[x_, y_, z_, t_, a_, b_] := N[(a * N[(t + N[(z * b), $MachinePrecision]), $MachinePrecision] + N[(y * z + x), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(a, t + z \cdot b, \mathsf{fma}\left(y, z, x\right)\right)
\end{array}
Initial program 92.3%
associate-+l+92.3%
+-commutative92.3%
*-commutative92.3%
*-commutative92.3%
associate-*l*93.4%
distribute-rgt-out95.3%
fma-def96.1%
*-commutative96.1%
+-commutative96.1%
fma-def96.1%
Simplified96.1%
Final simplification96.1%
(FPCore (x y z t a b)
:precision binary64
(if (or (<= a -2.8e+38)
(not
(or (<= a 1.2e-164)
(and (not (<= a 3.7e-147))
(or (<= a 6.5e-53)
(and (not (<= a 1.9e+14)) (<= a 1.26e+54)))))))
(* a (+ t (* z b)))
(+ x (* z y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -2.8e+38) || !((a <= 1.2e-164) || (!(a <= 3.7e-147) && ((a <= 6.5e-53) || (!(a <= 1.9e+14) && (a <= 1.26e+54)))))) {
tmp = a * (t + (z * b));
} else {
tmp = x + (z * y);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((a <= (-2.8d+38)) .or. (.not. (a <= 1.2d-164) .or. (.not. (a <= 3.7d-147)) .and. (a <= 6.5d-53) .or. (.not. (a <= 1.9d+14)) .and. (a <= 1.26d+54))) then
tmp = a * (t + (z * b))
else
tmp = x + (z * y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -2.8e+38) || !((a <= 1.2e-164) || (!(a <= 3.7e-147) && ((a <= 6.5e-53) || (!(a <= 1.9e+14) && (a <= 1.26e+54)))))) {
tmp = a * (t + (z * b));
} else {
tmp = x + (z * y);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (a <= -2.8e+38) or not ((a <= 1.2e-164) or (not (a <= 3.7e-147) and ((a <= 6.5e-53) or (not (a <= 1.9e+14) and (a <= 1.26e+54))))): tmp = a * (t + (z * b)) else: tmp = x + (z * y) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((a <= -2.8e+38) || !((a <= 1.2e-164) || (!(a <= 3.7e-147) && ((a <= 6.5e-53) || (!(a <= 1.9e+14) && (a <= 1.26e+54)))))) tmp = Float64(a * Float64(t + Float64(z * b))); else tmp = Float64(x + Float64(z * y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((a <= -2.8e+38) || ~(((a <= 1.2e-164) || (~((a <= 3.7e-147)) && ((a <= 6.5e-53) || (~((a <= 1.9e+14)) && (a <= 1.26e+54))))))) tmp = a * (t + (z * b)); else tmp = x + (z * y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[a, -2.8e+38], N[Not[Or[LessEqual[a, 1.2e-164], And[N[Not[LessEqual[a, 3.7e-147]], $MachinePrecision], Or[LessEqual[a, 6.5e-53], And[N[Not[LessEqual[a, 1.9e+14]], $MachinePrecision], LessEqual[a, 1.26e+54]]]]]], $MachinePrecision]], N[(a * N[(t + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(z * y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.8 \cdot 10^{+38} \lor \neg \left(a \leq 1.2 \cdot 10^{-164} \lor \neg \left(a \leq 3.7 \cdot 10^{-147}\right) \land \left(a \leq 6.5 \cdot 10^{-53} \lor \neg \left(a \leq 1.9 \cdot 10^{+14}\right) \land a \leq 1.26 \cdot 10^{+54}\right)\right):\\
\;\;\;\;a \cdot \left(t + z \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;x + z \cdot y\\
\end{array}
\end{array}
if a < -2.8e38 or 1.19999999999999992e-164 < a < 3.7000000000000002e-147 or 6.4999999999999997e-53 < a < 1.9e14 or 1.25999999999999995e54 < a Initial program 86.7%
*-commutative86.7%
associate-*l*85.2%
Simplified85.2%
Taylor expanded in a around inf 74.7%
if -2.8e38 < a < 1.19999999999999992e-164 or 3.7000000000000002e-147 < a < 6.4999999999999997e-53 or 1.9e14 < a < 1.25999999999999995e54Initial program 99.1%
*-commutative99.1%
associate-*l*99.1%
Simplified99.1%
Taylor expanded in a around 0 80.7%
Final simplification77.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (* a t))))
(if (<= y -2e+236)
(* z y)
(if (<= y -2.4e+226)
t_1
(if (<= y -1.5e+109)
(* z y)
(if (<= y 8.8e+43)
t_1
(if (<= y 3.2e+89)
(* a (* z b))
(if (<= y 5e+209) t_1 (* z y)))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (a * t);
double tmp;
if (y <= -2e+236) {
tmp = z * y;
} else if (y <= -2.4e+226) {
tmp = t_1;
} else if (y <= -1.5e+109) {
tmp = z * y;
} else if (y <= 8.8e+43) {
tmp = t_1;
} else if (y <= 3.2e+89) {
tmp = a * (z * b);
} else if (y <= 5e+209) {
tmp = t_1;
} else {
tmp = z * y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = x + (a * t)
if (y <= (-2d+236)) then
tmp = z * y
else if (y <= (-2.4d+226)) then
tmp = t_1
else if (y <= (-1.5d+109)) then
tmp = z * y
else if (y <= 8.8d+43) then
tmp = t_1
else if (y <= 3.2d+89) then
tmp = a * (z * b)
else if (y <= 5d+209) then
tmp = t_1
else
tmp = z * y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (a * t);
double tmp;
if (y <= -2e+236) {
tmp = z * y;
} else if (y <= -2.4e+226) {
tmp = t_1;
} else if (y <= -1.5e+109) {
tmp = z * y;
} else if (y <= 8.8e+43) {
tmp = t_1;
} else if (y <= 3.2e+89) {
tmp = a * (z * b);
} else if (y <= 5e+209) {
tmp = t_1;
} else {
tmp = z * y;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + (a * t) tmp = 0 if y <= -2e+236: tmp = z * y elif y <= -2.4e+226: tmp = t_1 elif y <= -1.5e+109: tmp = z * y elif y <= 8.8e+43: tmp = t_1 elif y <= 3.2e+89: tmp = a * (z * b) elif y <= 5e+209: tmp = t_1 else: tmp = z * y return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(a * t)) tmp = 0.0 if (y <= -2e+236) tmp = Float64(z * y); elseif (y <= -2.4e+226) tmp = t_1; elseif (y <= -1.5e+109) tmp = Float64(z * y); elseif (y <= 8.8e+43) tmp = t_1; elseif (y <= 3.2e+89) tmp = Float64(a * Float64(z * b)); elseif (y <= 5e+209) tmp = t_1; else tmp = Float64(z * y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x + (a * t); tmp = 0.0; if (y <= -2e+236) tmp = z * y; elseif (y <= -2.4e+226) tmp = t_1; elseif (y <= -1.5e+109) tmp = z * y; elseif (y <= 8.8e+43) tmp = t_1; elseif (y <= 3.2e+89) tmp = a * (z * b); elseif (y <= 5e+209) tmp = t_1; else tmp = z * y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(a * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2e+236], N[(z * y), $MachinePrecision], If[LessEqual[y, -2.4e+226], t$95$1, If[LessEqual[y, -1.5e+109], N[(z * y), $MachinePrecision], If[LessEqual[y, 8.8e+43], t$95$1, If[LessEqual[y, 3.2e+89], N[(a * N[(z * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 5e+209], t$95$1, N[(z * y), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + a \cdot t\\
\mathbf{if}\;y \leq -2 \cdot 10^{+236}:\\
\;\;\;\;z \cdot y\\
\mathbf{elif}\;y \leq -2.4 \cdot 10^{+226}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -1.5 \cdot 10^{+109}:\\
\;\;\;\;z \cdot y\\
\mathbf{elif}\;y \leq 8.8 \cdot 10^{+43}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 3.2 \cdot 10^{+89}:\\
\;\;\;\;a \cdot \left(z \cdot b\right)\\
\mathbf{elif}\;y \leq 5 \cdot 10^{+209}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;z \cdot y\\
\end{array}
\end{array}
if y < -2.00000000000000011e236 or -2.4e226 < y < -1.50000000000000008e109 or 4.99999999999999964e209 < y Initial program 92.9%
*-commutative92.9%
associate-*l*90.2%
Simplified90.2%
Taylor expanded in y around inf 67.0%
*-commutative67.0%
Simplified67.0%
if -2.00000000000000011e236 < y < -2.4e226 or -1.50000000000000008e109 < y < 8.80000000000000002e43 or 3.19999999999999987e89 < y < 4.99999999999999964e209Initial program 92.2%
*-commutative92.2%
associate-*l*92.2%
Simplified92.2%
Taylor expanded in z around 0 64.2%
if 8.80000000000000002e43 < y < 3.19999999999999987e89Initial program 88.9%
+-commutative88.9%
*-commutative88.9%
associate-*l*88.7%
*-commutative88.7%
fma-def88.7%
*-commutative88.7%
+-commutative88.7%
fma-def88.7%
+-commutative88.7%
fma-def88.7%
Simplified88.7%
fma-udef88.7%
fma-udef88.7%
+-commutative88.7%
associate-+r+88.7%
*-commutative88.7%
*-commutative88.7%
Applied egg-rr88.7%
Taylor expanded in b around inf 79.5%
*-commutative79.5%
Simplified79.5%
Final simplification65.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (* a t))) (t_2 (+ x (* z y))))
(if (<= y -1.8e+107)
t_2
(if (<= y -1.12e+47)
t_1
(if (<= y -54000.0)
t_2
(if (<= y 8.8e+43)
t_1
(if (<= y 9.4e+89) (* a (* z b)) (if (<= y 7.8e+206) t_1 t_2))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (a * t);
double t_2 = x + (z * y);
double tmp;
if (y <= -1.8e+107) {
tmp = t_2;
} else if (y <= -1.12e+47) {
tmp = t_1;
} else if (y <= -54000.0) {
tmp = t_2;
} else if (y <= 8.8e+43) {
tmp = t_1;
} else if (y <= 9.4e+89) {
tmp = a * (z * b);
} else if (y <= 7.8e+206) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = x + (a * t)
t_2 = x + (z * y)
if (y <= (-1.8d+107)) then
tmp = t_2
else if (y <= (-1.12d+47)) then
tmp = t_1
else if (y <= (-54000.0d0)) then
tmp = t_2
else if (y <= 8.8d+43) then
tmp = t_1
else if (y <= 9.4d+89) then
tmp = a * (z * b)
else if (y <= 7.8d+206) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (a * t);
double t_2 = x + (z * y);
double tmp;
if (y <= -1.8e+107) {
tmp = t_2;
} else if (y <= -1.12e+47) {
tmp = t_1;
} else if (y <= -54000.0) {
tmp = t_2;
} else if (y <= 8.8e+43) {
tmp = t_1;
} else if (y <= 9.4e+89) {
tmp = a * (z * b);
} else if (y <= 7.8e+206) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + (a * t) t_2 = x + (z * y) tmp = 0 if y <= -1.8e+107: tmp = t_2 elif y <= -1.12e+47: tmp = t_1 elif y <= -54000.0: tmp = t_2 elif y <= 8.8e+43: tmp = t_1 elif y <= 9.4e+89: tmp = a * (z * b) elif y <= 7.8e+206: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(a * t)) t_2 = Float64(x + Float64(z * y)) tmp = 0.0 if (y <= -1.8e+107) tmp = t_2; elseif (y <= -1.12e+47) tmp = t_1; elseif (y <= -54000.0) tmp = t_2; elseif (y <= 8.8e+43) tmp = t_1; elseif (y <= 9.4e+89) tmp = Float64(a * Float64(z * b)); elseif (y <= 7.8e+206) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x + (a * t); t_2 = x + (z * y); tmp = 0.0; if (y <= -1.8e+107) tmp = t_2; elseif (y <= -1.12e+47) tmp = t_1; elseif (y <= -54000.0) tmp = t_2; elseif (y <= 8.8e+43) tmp = t_1; elseif (y <= 9.4e+89) tmp = a * (z * b); elseif (y <= 7.8e+206) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(a * t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(z * y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.8e+107], t$95$2, If[LessEqual[y, -1.12e+47], t$95$1, If[LessEqual[y, -54000.0], t$95$2, If[LessEqual[y, 8.8e+43], t$95$1, If[LessEqual[y, 9.4e+89], N[(a * N[(z * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 7.8e+206], t$95$1, t$95$2]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + a \cdot t\\
t_2 := x + z \cdot y\\
\mathbf{if}\;y \leq -1.8 \cdot 10^{+107}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq -1.12 \cdot 10^{+47}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -54000:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq 8.8 \cdot 10^{+43}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 9.4 \cdot 10^{+89}:\\
\;\;\;\;a \cdot \left(z \cdot b\right)\\
\mathbf{elif}\;y \leq 7.8 \cdot 10^{+206}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if y < -1.7999999999999999e107 or -1.12000000000000007e47 < y < -54000 or 7.8e206 < y Initial program 93.1%
*-commutative93.1%
associate-*l*90.9%
Simplified90.9%
Taylor expanded in a around 0 78.0%
if -1.7999999999999999e107 < y < -1.12000000000000007e47 or -54000 < y < 8.80000000000000002e43 or 9.40000000000000043e89 < y < 7.8e206Initial program 92.1%
*-commutative92.1%
associate-*l*92.1%
Simplified92.1%
Taylor expanded in z around 0 65.4%
if 8.80000000000000002e43 < y < 9.40000000000000043e89Initial program 88.9%
+-commutative88.9%
*-commutative88.9%
associate-*l*88.7%
*-commutative88.7%
fma-def88.7%
*-commutative88.7%
+-commutative88.7%
fma-def88.7%
+-commutative88.7%
fma-def88.7%
Simplified88.7%
fma-udef88.7%
fma-udef88.7%
+-commutative88.7%
associate-+r+88.7%
*-commutative88.7%
*-commutative88.7%
Applied egg-rr88.7%
Taylor expanded in b around inf 79.5%
*-commutative79.5%
Simplified79.5%
Final simplification70.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* a (+ t (* z b)))) (t_2 (* z (+ y (* a b)))))
(if (<= a -1.28e+39)
t_1
(if (<= a 1.4e-165)
(+ x (* z y))
(if (<= a 5.7e-96)
t_2
(if (<= a 1.5e-15)
(+ x (* b (* a z)))
(if (<= a 1.26e+54) t_2 t_1)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = a * (t + (z * b));
double t_2 = z * (y + (a * b));
double tmp;
if (a <= -1.28e+39) {
tmp = t_1;
} else if (a <= 1.4e-165) {
tmp = x + (z * y);
} else if (a <= 5.7e-96) {
tmp = t_2;
} else if (a <= 1.5e-15) {
tmp = x + (b * (a * z));
} else if (a <= 1.26e+54) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = a * (t + (z * b))
t_2 = z * (y + (a * b))
if (a <= (-1.28d+39)) then
tmp = t_1
else if (a <= 1.4d-165) then
tmp = x + (z * y)
else if (a <= 5.7d-96) then
tmp = t_2
else if (a <= 1.5d-15) then
tmp = x + (b * (a * z))
else if (a <= 1.26d+54) then
tmp = t_2
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = a * (t + (z * b));
double t_2 = z * (y + (a * b));
double tmp;
if (a <= -1.28e+39) {
tmp = t_1;
} else if (a <= 1.4e-165) {
tmp = x + (z * y);
} else if (a <= 5.7e-96) {
tmp = t_2;
} else if (a <= 1.5e-15) {
tmp = x + (b * (a * z));
} else if (a <= 1.26e+54) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = a * (t + (z * b)) t_2 = z * (y + (a * b)) tmp = 0 if a <= -1.28e+39: tmp = t_1 elif a <= 1.4e-165: tmp = x + (z * y) elif a <= 5.7e-96: tmp = t_2 elif a <= 1.5e-15: tmp = x + (b * (a * z)) elif a <= 1.26e+54: tmp = t_2 else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(a * Float64(t + Float64(z * b))) t_2 = Float64(z * Float64(y + Float64(a * b))) tmp = 0.0 if (a <= -1.28e+39) tmp = t_1; elseif (a <= 1.4e-165) tmp = Float64(x + Float64(z * y)); elseif (a <= 5.7e-96) tmp = t_2; elseif (a <= 1.5e-15) tmp = Float64(x + Float64(b * Float64(a * z))); elseif (a <= 1.26e+54) tmp = t_2; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = a * (t + (z * b)); t_2 = z * (y + (a * b)); tmp = 0.0; if (a <= -1.28e+39) tmp = t_1; elseif (a <= 1.4e-165) tmp = x + (z * y); elseif (a <= 5.7e-96) tmp = t_2; elseif (a <= 1.5e-15) tmp = x + (b * (a * z)); elseif (a <= 1.26e+54) tmp = t_2; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(a * N[(t + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(z * N[(y + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -1.28e+39], t$95$1, If[LessEqual[a, 1.4e-165], N[(x + N[(z * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 5.7e-96], t$95$2, If[LessEqual[a, 1.5e-15], N[(x + N[(b * N[(a * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.26e+54], t$95$2, t$95$1]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot \left(t + z \cdot b\right)\\
t_2 := z \cdot \left(y + a \cdot b\right)\\
\mathbf{if}\;a \leq -1.28 \cdot 10^{+39}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq 1.4 \cdot 10^{-165}:\\
\;\;\;\;x + z \cdot y\\
\mathbf{elif}\;a \leq 5.7 \cdot 10^{-96}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;a \leq 1.5 \cdot 10^{-15}:\\
\;\;\;\;x + b \cdot \left(a \cdot z\right)\\
\mathbf{elif}\;a \leq 1.26 \cdot 10^{+54}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if a < -1.27999999999999994e39 or 1.25999999999999995e54 < a Initial program 85.0%
*-commutative85.0%
associate-*l*83.4%
Simplified83.4%
Taylor expanded in a around inf 75.3%
if -1.27999999999999994e39 < a < 1.4e-165Initial program 99.9%
*-commutative99.9%
associate-*l*100.0%
Simplified100.0%
Taylor expanded in a around 0 82.0%
if 1.4e-165 < a < 5.70000000000000009e-96 or 1.5e-15 < a < 1.25999999999999995e54Initial program 94.6%
*-commutative94.6%
associate-*l*94.5%
Simplified94.5%
Taylor expanded in z around inf 72.4%
if 5.70000000000000009e-96 < a < 1.5e-15Initial program 99.9%
*-commutative99.9%
associate-*l*100.0%
Simplified100.0%
Taylor expanded in t around 0 82.4%
+-commutative82.4%
associate-*r*88.4%
distribute-rgt-in88.4%
+-commutative88.4%
Simplified88.4%
Taylor expanded in y around 0 77.2%
Taylor expanded in z around 0 77.1%
associate-*r*77.2%
*-commutative77.2%
associate-*r*77.1%
Simplified77.1%
Final simplification77.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* a (+ t (* z b)))) (t_2 (* z (+ y (* a b)))))
(if (<= a -9.8e+33)
t_1
(if (<= a 1.55e-165)
(+ x (* z y))
(if (<= a 1.38e-95)
t_2
(if (<= a 15500.0)
(+ x (* z (* a b)))
(if (<= a 1.26e+54) t_2 t_1)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = a * (t + (z * b));
double t_2 = z * (y + (a * b));
double tmp;
if (a <= -9.8e+33) {
tmp = t_1;
} else if (a <= 1.55e-165) {
tmp = x + (z * y);
} else if (a <= 1.38e-95) {
tmp = t_2;
} else if (a <= 15500.0) {
tmp = x + (z * (a * b));
} else if (a <= 1.26e+54) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = a * (t + (z * b))
t_2 = z * (y + (a * b))
if (a <= (-9.8d+33)) then
tmp = t_1
else if (a <= 1.55d-165) then
tmp = x + (z * y)
else if (a <= 1.38d-95) then
tmp = t_2
else if (a <= 15500.0d0) then
tmp = x + (z * (a * b))
else if (a <= 1.26d+54) then
tmp = t_2
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = a * (t + (z * b));
double t_2 = z * (y + (a * b));
double tmp;
if (a <= -9.8e+33) {
tmp = t_1;
} else if (a <= 1.55e-165) {
tmp = x + (z * y);
} else if (a <= 1.38e-95) {
tmp = t_2;
} else if (a <= 15500.0) {
tmp = x + (z * (a * b));
} else if (a <= 1.26e+54) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = a * (t + (z * b)) t_2 = z * (y + (a * b)) tmp = 0 if a <= -9.8e+33: tmp = t_1 elif a <= 1.55e-165: tmp = x + (z * y) elif a <= 1.38e-95: tmp = t_2 elif a <= 15500.0: tmp = x + (z * (a * b)) elif a <= 1.26e+54: tmp = t_2 else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(a * Float64(t + Float64(z * b))) t_2 = Float64(z * Float64(y + Float64(a * b))) tmp = 0.0 if (a <= -9.8e+33) tmp = t_1; elseif (a <= 1.55e-165) tmp = Float64(x + Float64(z * y)); elseif (a <= 1.38e-95) tmp = t_2; elseif (a <= 15500.0) tmp = Float64(x + Float64(z * Float64(a * b))); elseif (a <= 1.26e+54) tmp = t_2; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = a * (t + (z * b)); t_2 = z * (y + (a * b)); tmp = 0.0; if (a <= -9.8e+33) tmp = t_1; elseif (a <= 1.55e-165) tmp = x + (z * y); elseif (a <= 1.38e-95) tmp = t_2; elseif (a <= 15500.0) tmp = x + (z * (a * b)); elseif (a <= 1.26e+54) tmp = t_2; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(a * N[(t + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(z * N[(y + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -9.8e+33], t$95$1, If[LessEqual[a, 1.55e-165], N[(x + N[(z * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.38e-95], t$95$2, If[LessEqual[a, 15500.0], N[(x + N[(z * N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.26e+54], t$95$2, t$95$1]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot \left(t + z \cdot b\right)\\
t_2 := z \cdot \left(y + a \cdot b\right)\\
\mathbf{if}\;a \leq -9.8 \cdot 10^{+33}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq 1.55 \cdot 10^{-165}:\\
\;\;\;\;x + z \cdot y\\
\mathbf{elif}\;a \leq 1.38 \cdot 10^{-95}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;a \leq 15500:\\
\;\;\;\;x + z \cdot \left(a \cdot b\right)\\
\mathbf{elif}\;a \leq 1.26 \cdot 10^{+54}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if a < -9.80000000000000027e33 or 1.25999999999999995e54 < a Initial program 85.0%
*-commutative85.0%
associate-*l*83.4%
Simplified83.4%
Taylor expanded in a around inf 75.3%
if -9.80000000000000027e33 < a < 1.54999999999999998e-165Initial program 99.9%
*-commutative99.9%
associate-*l*100.0%
Simplified100.0%
Taylor expanded in a around 0 82.0%
if 1.54999999999999998e-165 < a < 1.38e-95 or 15500 < a < 1.25999999999999995e54Initial program 93.9%
*-commutative93.9%
associate-*l*93.8%
Simplified93.8%
Taylor expanded in z around inf 75.0%
if 1.38e-95 < a < 15500Initial program 99.9%
*-commutative99.9%
associate-*l*100.0%
Simplified100.0%
Taylor expanded in t around 0 81.1%
+-commutative81.1%
associate-*r*86.0%
distribute-rgt-in86.0%
+-commutative86.0%
Simplified86.0%
Taylor expanded in y around 0 72.2%
Final simplification77.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* a (+ t (* z b)))) (t_2 (* z (* a b))))
(if (<= a -3e+36)
t_1
(if (<= a 1.55e-165)
(+ x (* z y))
(if (<= a 2.4e-97)
(+ t_2 (* z y))
(if (<= a 290000.0)
(+ x t_2)
(if (<= a 1.26e+54) (* z (+ y (* a b))) t_1)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = a * (t + (z * b));
double t_2 = z * (a * b);
double tmp;
if (a <= -3e+36) {
tmp = t_1;
} else if (a <= 1.55e-165) {
tmp = x + (z * y);
} else if (a <= 2.4e-97) {
tmp = t_2 + (z * y);
} else if (a <= 290000.0) {
tmp = x + t_2;
} else if (a <= 1.26e+54) {
tmp = z * (y + (a * b));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = a * (t + (z * b))
t_2 = z * (a * b)
if (a <= (-3d+36)) then
tmp = t_1
else if (a <= 1.55d-165) then
tmp = x + (z * y)
else if (a <= 2.4d-97) then
tmp = t_2 + (z * y)
else if (a <= 290000.0d0) then
tmp = x + t_2
else if (a <= 1.26d+54) then
tmp = z * (y + (a * b))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = a * (t + (z * b));
double t_2 = z * (a * b);
double tmp;
if (a <= -3e+36) {
tmp = t_1;
} else if (a <= 1.55e-165) {
tmp = x + (z * y);
} else if (a <= 2.4e-97) {
tmp = t_2 + (z * y);
} else if (a <= 290000.0) {
tmp = x + t_2;
} else if (a <= 1.26e+54) {
tmp = z * (y + (a * b));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = a * (t + (z * b)) t_2 = z * (a * b) tmp = 0 if a <= -3e+36: tmp = t_1 elif a <= 1.55e-165: tmp = x + (z * y) elif a <= 2.4e-97: tmp = t_2 + (z * y) elif a <= 290000.0: tmp = x + t_2 elif a <= 1.26e+54: tmp = z * (y + (a * b)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(a * Float64(t + Float64(z * b))) t_2 = Float64(z * Float64(a * b)) tmp = 0.0 if (a <= -3e+36) tmp = t_1; elseif (a <= 1.55e-165) tmp = Float64(x + Float64(z * y)); elseif (a <= 2.4e-97) tmp = Float64(t_2 + Float64(z * y)); elseif (a <= 290000.0) tmp = Float64(x + t_2); elseif (a <= 1.26e+54) tmp = Float64(z * Float64(y + Float64(a * b))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = a * (t + (z * b)); t_2 = z * (a * b); tmp = 0.0; if (a <= -3e+36) tmp = t_1; elseif (a <= 1.55e-165) tmp = x + (z * y); elseif (a <= 2.4e-97) tmp = t_2 + (z * y); elseif (a <= 290000.0) tmp = x + t_2; elseif (a <= 1.26e+54) tmp = z * (y + (a * b)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(a * N[(t + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(z * N[(a * b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -3e+36], t$95$1, If[LessEqual[a, 1.55e-165], N[(x + N[(z * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 2.4e-97], N[(t$95$2 + N[(z * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 290000.0], N[(x + t$95$2), $MachinePrecision], If[LessEqual[a, 1.26e+54], N[(z * N[(y + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot \left(t + z \cdot b\right)\\
t_2 := z \cdot \left(a \cdot b\right)\\
\mathbf{if}\;a \leq -3 \cdot 10^{+36}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq 1.55 \cdot 10^{-165}:\\
\;\;\;\;x + z \cdot y\\
\mathbf{elif}\;a \leq 2.4 \cdot 10^{-97}:\\
\;\;\;\;t_2 + z \cdot y\\
\mathbf{elif}\;a \leq 290000:\\
\;\;\;\;x + t_2\\
\mathbf{elif}\;a \leq 1.26 \cdot 10^{+54}:\\
\;\;\;\;z \cdot \left(y + a \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if a < -3e36 or 1.25999999999999995e54 < a Initial program 85.0%
*-commutative85.0%
associate-*l*83.4%
Simplified83.4%
Taylor expanded in a around inf 75.3%
if -3e36 < a < 1.54999999999999998e-165Initial program 99.9%
*-commutative99.9%
associate-*l*100.0%
Simplified100.0%
Taylor expanded in a around 0 82.0%
if 1.54999999999999998e-165 < a < 2.4e-97Initial program 100.0%
*-commutative100.0%
associate-*l*99.8%
Simplified99.8%
Taylor expanded in z around inf 80.1%
+-commutative80.1%
distribute-lft-in80.2%
Applied egg-rr80.2%
if 2.4e-97 < a < 2.9e5Initial program 99.9%
*-commutative99.9%
associate-*l*100.0%
Simplified100.0%
Taylor expanded in t around 0 81.1%
+-commutative81.1%
associate-*r*86.0%
distribute-rgt-in86.0%
+-commutative86.0%
Simplified86.0%
Taylor expanded in y around 0 72.2%
if 2.9e5 < a < 1.25999999999999995e54Initial program 87.5%
*-commutative87.5%
associate-*l*87.5%
Simplified87.5%
Taylor expanded in z around inf 69.6%
Final simplification77.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (* z (+ y (* a b))))) (t_2 (+ x (* a t))))
(if (<= t -7.2e+170)
t_2
(if (<= t 1.9e+79)
t_1
(if (<= t 2.1e+154)
t_2
(if (<= t 1.55e+171) t_1 (* a (+ t (* z b)))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (z * (y + (a * b)));
double t_2 = x + (a * t);
double tmp;
if (t <= -7.2e+170) {
tmp = t_2;
} else if (t <= 1.9e+79) {
tmp = t_1;
} else if (t <= 2.1e+154) {
tmp = t_2;
} else if (t <= 1.55e+171) {
tmp = t_1;
} else {
tmp = a * (t + (z * b));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = x + (z * (y + (a * b)))
t_2 = x + (a * t)
if (t <= (-7.2d+170)) then
tmp = t_2
else if (t <= 1.9d+79) then
tmp = t_1
else if (t <= 2.1d+154) then
tmp = t_2
else if (t <= 1.55d+171) then
tmp = t_1
else
tmp = a * (t + (z * b))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (z * (y + (a * b)));
double t_2 = x + (a * t);
double tmp;
if (t <= -7.2e+170) {
tmp = t_2;
} else if (t <= 1.9e+79) {
tmp = t_1;
} else if (t <= 2.1e+154) {
tmp = t_2;
} else if (t <= 1.55e+171) {
tmp = t_1;
} else {
tmp = a * (t + (z * b));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + (z * (y + (a * b))) t_2 = x + (a * t) tmp = 0 if t <= -7.2e+170: tmp = t_2 elif t <= 1.9e+79: tmp = t_1 elif t <= 2.1e+154: tmp = t_2 elif t <= 1.55e+171: tmp = t_1 else: tmp = a * (t + (z * b)) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(z * Float64(y + Float64(a * b)))) t_2 = Float64(x + Float64(a * t)) tmp = 0.0 if (t <= -7.2e+170) tmp = t_2; elseif (t <= 1.9e+79) tmp = t_1; elseif (t <= 2.1e+154) tmp = t_2; elseif (t <= 1.55e+171) tmp = t_1; else tmp = Float64(a * Float64(t + Float64(z * b))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x + (z * (y + (a * b))); t_2 = x + (a * t); tmp = 0.0; if (t <= -7.2e+170) tmp = t_2; elseif (t <= 1.9e+79) tmp = t_1; elseif (t <= 2.1e+154) tmp = t_2; elseif (t <= 1.55e+171) tmp = t_1; else tmp = a * (t + (z * b)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(z * N[(y + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(a * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -7.2e+170], t$95$2, If[LessEqual[t, 1.9e+79], t$95$1, If[LessEqual[t, 2.1e+154], t$95$2, If[LessEqual[t, 1.55e+171], t$95$1, N[(a * N[(t + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + z \cdot \left(y + a \cdot b\right)\\
t_2 := x + a \cdot t\\
\mathbf{if}\;t \leq -7.2 \cdot 10^{+170}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq 1.9 \cdot 10^{+79}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 2.1 \cdot 10^{+154}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq 1.55 \cdot 10^{+171}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(t + z \cdot b\right)\\
\end{array}
\end{array}
if t < -7.1999999999999999e170 or 1.9000000000000001e79 < t < 2.09999999999999994e154Initial program 93.1%
*-commutative93.1%
associate-*l*93.2%
Simplified93.2%
Taylor expanded in z around 0 86.9%
if -7.1999999999999999e170 < t < 1.9000000000000001e79 or 2.09999999999999994e154 < t < 1.5499999999999999e171Initial program 94.6%
*-commutative94.6%
associate-*l*94.0%
Simplified94.0%
Taylor expanded in t around 0 85.6%
+-commutative85.6%
associate-*r*84.7%
distribute-rgt-in86.9%
+-commutative86.9%
Simplified86.9%
if 1.5499999999999999e171 < t Initial program 78.8%
*-commutative78.8%
associate-*l*75.8%
Simplified75.8%
Taylor expanded in a around inf 71.4%
Final simplification84.9%
(FPCore (x y z t a b) :precision binary64 (if (<= a -1.35e+129) (+ (* a (+ t (* z b))) (* z y)) (+ (+ (+ x (* z y)) (* a t)) (* z (* a b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -1.35e+129) {
tmp = (a * (t + (z * b))) + (z * y);
} else {
tmp = ((x + (z * y)) + (a * t)) + (z * (a * b));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (a <= (-1.35d+129)) then
tmp = (a * (t + (z * b))) + (z * y)
else
tmp = ((x + (z * y)) + (a * t)) + (z * (a * b))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -1.35e+129) {
tmp = (a * (t + (z * b))) + (z * y);
} else {
tmp = ((x + (z * y)) + (a * t)) + (z * (a * b));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if a <= -1.35e+129: tmp = (a * (t + (z * b))) + (z * y) else: tmp = ((x + (z * y)) + (a * t)) + (z * (a * b)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (a <= -1.35e+129) tmp = Float64(Float64(a * Float64(t + Float64(z * b))) + Float64(z * y)); else tmp = Float64(Float64(Float64(x + Float64(z * y)) + Float64(a * t)) + Float64(z * Float64(a * b))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (a <= -1.35e+129) tmp = (a * (t + (z * b))) + (z * y); else tmp = ((x + (z * y)) + (a * t)) + (z * (a * b)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, -1.35e+129], N[(N[(a * N[(t + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(z * y), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x + N[(z * y), $MachinePrecision]), $MachinePrecision] + N[(a * t), $MachinePrecision]), $MachinePrecision] + N[(z * N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.35 \cdot 10^{+129}:\\
\;\;\;\;a \cdot \left(t + z \cdot b\right) + z \cdot y\\
\mathbf{else}:\\
\;\;\;\;\left(\left(x + z \cdot y\right) + a \cdot t\right) + z \cdot \left(a \cdot b\right)\\
\end{array}
\end{array}
if a < -1.35e129Initial program 80.8%
associate-+l+80.8%
+-commutative80.8%
*-commutative80.8%
*-commutative80.8%
associate-*l*90.2%
distribute-rgt-out97.5%
fma-def100.0%
*-commutative100.0%
+-commutative100.0%
fma-def100.0%
Simplified100.0%
Taylor expanded in x around 0 90.4%
if -1.35e129 < a Initial program 94.5%
*-commutative94.5%
associate-*l*94.9%
Simplified94.9%
Final simplification94.2%
(FPCore (x y z t a b)
:precision binary64
(if (<= t -4.8e+175)
(+ x (* a t))
(if (<= t 1.35e+63)
(+ x (* z (+ y (* a b))))
(+ (* a (+ t (* z b))) (* z y)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -4.8e+175) {
tmp = x + (a * t);
} else if (t <= 1.35e+63) {
tmp = x + (z * (y + (a * b)));
} else {
tmp = (a * (t + (z * b))) + (z * y);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (t <= (-4.8d+175)) then
tmp = x + (a * t)
else if (t <= 1.35d+63) then
tmp = x + (z * (y + (a * b)))
else
tmp = (a * (t + (z * b))) + (z * y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -4.8e+175) {
tmp = x + (a * t);
} else if (t <= 1.35e+63) {
tmp = x + (z * (y + (a * b)));
} else {
tmp = (a * (t + (z * b))) + (z * y);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -4.8e+175: tmp = x + (a * t) elif t <= 1.35e+63: tmp = x + (z * (y + (a * b))) else: tmp = (a * (t + (z * b))) + (z * y) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -4.8e+175) tmp = Float64(x + Float64(a * t)); elseif (t <= 1.35e+63) tmp = Float64(x + Float64(z * Float64(y + Float64(a * b)))); else tmp = Float64(Float64(a * Float64(t + Float64(z * b))) + Float64(z * y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (t <= -4.8e+175) tmp = x + (a * t); elseif (t <= 1.35e+63) tmp = x + (z * (y + (a * b))); else tmp = (a * (t + (z * b))) + (z * y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -4.8e+175], N[(x + N[(a * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.35e+63], N[(x + N[(z * N[(y + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * N[(t + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(z * y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.8 \cdot 10^{+175}:\\
\;\;\;\;x + a \cdot t\\
\mathbf{elif}\;t \leq 1.35 \cdot 10^{+63}:\\
\;\;\;\;x + z \cdot \left(y + a \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(t + z \cdot b\right) + z \cdot y\\
\end{array}
\end{array}
if t < -4.8e175Initial program 96.2%
*-commutative96.2%
associate-*l*96.3%
Simplified96.3%
Taylor expanded in z around 0 96.8%
if -4.8e175 < t < 1.35000000000000009e63Initial program 94.2%
*-commutative94.2%
associate-*l*93.7%
Simplified93.7%
Taylor expanded in t around 0 84.8%
+-commutative84.8%
associate-*r*83.8%
distribute-rgt-in86.2%
+-commutative86.2%
Simplified86.2%
if 1.35000000000000009e63 < t Initial program 85.0%
associate-+l+85.0%
+-commutative85.0%
*-commutative85.0%
*-commutative85.0%
associate-*l*86.7%
distribute-rgt-out95.0%
fma-def96.7%
*-commutative96.7%
+-commutative96.7%
fma-def96.7%
Simplified96.7%
Taylor expanded in x around 0 83.4%
Final simplification86.6%
(FPCore (x y z t a b) :precision binary64 (if (<= y -54000.0) (* z y) (if (<= y 3.6e-280) (* a t) (if (<= y 4e+77) (* a (* z b)) (* z y)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -54000.0) {
tmp = z * y;
} else if (y <= 3.6e-280) {
tmp = a * t;
} else if (y <= 4e+77) {
tmp = a * (z * b);
} else {
tmp = z * y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (y <= (-54000.0d0)) then
tmp = z * y
else if (y <= 3.6d-280) then
tmp = a * t
else if (y <= 4d+77) then
tmp = a * (z * b)
else
tmp = z * y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -54000.0) {
tmp = z * y;
} else if (y <= 3.6e-280) {
tmp = a * t;
} else if (y <= 4e+77) {
tmp = a * (z * b);
} else {
tmp = z * y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -54000.0: tmp = z * y elif y <= 3.6e-280: tmp = a * t elif y <= 4e+77: tmp = a * (z * b) else: tmp = z * y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -54000.0) tmp = Float64(z * y); elseif (y <= 3.6e-280) tmp = Float64(a * t); elseif (y <= 4e+77) tmp = Float64(a * Float64(z * b)); else tmp = Float64(z * y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -54000.0) tmp = z * y; elseif (y <= 3.6e-280) tmp = a * t; elseif (y <= 4e+77) tmp = a * (z * b); else tmp = z * y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -54000.0], N[(z * y), $MachinePrecision], If[LessEqual[y, 3.6e-280], N[(a * t), $MachinePrecision], If[LessEqual[y, 4e+77], N[(a * N[(z * b), $MachinePrecision]), $MachinePrecision], N[(z * y), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -54000:\\
\;\;\;\;z \cdot y\\
\mathbf{elif}\;y \leq 3.6 \cdot 10^{-280}:\\
\;\;\;\;a \cdot t\\
\mathbf{elif}\;y \leq 4 \cdot 10^{+77}:\\
\;\;\;\;a \cdot \left(z \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;z \cdot y\\
\end{array}
\end{array}
if y < -54000 or 3.99999999999999993e77 < y Initial program 92.0%
*-commutative92.0%
associate-*l*88.6%
Simplified88.6%
Taylor expanded in y around inf 52.8%
*-commutative52.8%
Simplified52.8%
if -54000 < y < 3.59999999999999994e-280Initial program 88.1%
*-commutative88.1%
associate-*l*93.8%
Simplified93.8%
Taylor expanded in t around inf 40.0%
if 3.59999999999999994e-280 < y < 3.99999999999999993e77Initial program 98.3%
+-commutative98.3%
*-commutative98.3%
associate-*l*93.9%
*-commutative93.9%
fma-def93.9%
*-commutative93.9%
+-commutative93.9%
fma-def93.9%
+-commutative93.9%
fma-def93.9%
Simplified93.9%
fma-udef93.9%
fma-udef93.9%
+-commutative93.9%
associate-+r+93.9%
*-commutative93.9%
*-commutative93.9%
Applied egg-rr93.9%
Taylor expanded in b around inf 40.0%
*-commutative40.0%
Simplified40.0%
Final simplification45.6%
(FPCore (x y z t a b) :precision binary64 (if (<= y -50000.0) (* z y) (if (<= y 3.1e-280) (* a t) (if (<= y 8.5e+71) (* b (* a z)) (* z y)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -50000.0) {
tmp = z * y;
} else if (y <= 3.1e-280) {
tmp = a * t;
} else if (y <= 8.5e+71) {
tmp = b * (a * z);
} else {
tmp = z * y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (y <= (-50000.0d0)) then
tmp = z * y
else if (y <= 3.1d-280) then
tmp = a * t
else if (y <= 8.5d+71) then
tmp = b * (a * z)
else
tmp = z * y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -50000.0) {
tmp = z * y;
} else if (y <= 3.1e-280) {
tmp = a * t;
} else if (y <= 8.5e+71) {
tmp = b * (a * z);
} else {
tmp = z * y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -50000.0: tmp = z * y elif y <= 3.1e-280: tmp = a * t elif y <= 8.5e+71: tmp = b * (a * z) else: tmp = z * y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -50000.0) tmp = Float64(z * y); elseif (y <= 3.1e-280) tmp = Float64(a * t); elseif (y <= 8.5e+71) tmp = Float64(b * Float64(a * z)); else tmp = Float64(z * y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -50000.0) tmp = z * y; elseif (y <= 3.1e-280) tmp = a * t; elseif (y <= 8.5e+71) tmp = b * (a * z); else tmp = z * y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -50000.0], N[(z * y), $MachinePrecision], If[LessEqual[y, 3.1e-280], N[(a * t), $MachinePrecision], If[LessEqual[y, 8.5e+71], N[(b * N[(a * z), $MachinePrecision]), $MachinePrecision], N[(z * y), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -50000:\\
\;\;\;\;z \cdot y\\
\mathbf{elif}\;y \leq 3.1 \cdot 10^{-280}:\\
\;\;\;\;a \cdot t\\
\mathbf{elif}\;y \leq 8.5 \cdot 10^{+71}:\\
\;\;\;\;b \cdot \left(a \cdot z\right)\\
\mathbf{else}:\\
\;\;\;\;z \cdot y\\
\end{array}
\end{array}
if y < -5e4 or 8.4999999999999996e71 < y Initial program 92.0%
*-commutative92.0%
associate-*l*88.6%
Simplified88.6%
Taylor expanded in y around inf 52.8%
*-commutative52.8%
Simplified52.8%
if -5e4 < y < 3.10000000000000021e-280Initial program 88.1%
*-commutative88.1%
associate-*l*93.8%
Simplified93.8%
Taylor expanded in t around inf 40.0%
if 3.10000000000000021e-280 < y < 8.4999999999999996e71Initial program 98.3%
+-commutative98.3%
*-commutative98.3%
associate-*l*93.9%
*-commutative93.9%
fma-def93.9%
*-commutative93.9%
+-commutative93.9%
fma-def93.9%
+-commutative93.9%
fma-def93.9%
Simplified93.9%
fma-udef93.9%
fma-udef93.9%
+-commutative93.9%
associate-+r+93.9%
*-commutative93.9%
*-commutative93.9%
Applied egg-rr93.9%
Taylor expanded in b around inf 40.0%
*-commutative40.0%
Simplified40.0%
Taylor expanded in a around 0 40.0%
associate-*r*36.2%
*-commutative36.2%
associate-*r*40.7%
Simplified40.7%
Final simplification45.8%
(FPCore (x y z t a b) :precision binary64 (if (<= y -52000.0) (* z y) (if (<= y 4.4e-300) (* a t) (if (<= y 2.2e+43) x (* z y)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -52000.0) {
tmp = z * y;
} else if (y <= 4.4e-300) {
tmp = a * t;
} else if (y <= 2.2e+43) {
tmp = x;
} else {
tmp = z * y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (y <= (-52000.0d0)) then
tmp = z * y
else if (y <= 4.4d-300) then
tmp = a * t
else if (y <= 2.2d+43) then
tmp = x
else
tmp = z * y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -52000.0) {
tmp = z * y;
} else if (y <= 4.4e-300) {
tmp = a * t;
} else if (y <= 2.2e+43) {
tmp = x;
} else {
tmp = z * y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -52000.0: tmp = z * y elif y <= 4.4e-300: tmp = a * t elif y <= 2.2e+43: tmp = x else: tmp = z * y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -52000.0) tmp = Float64(z * y); elseif (y <= 4.4e-300) tmp = Float64(a * t); elseif (y <= 2.2e+43) tmp = x; else tmp = Float64(z * y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -52000.0) tmp = z * y; elseif (y <= 4.4e-300) tmp = a * t; elseif (y <= 2.2e+43) tmp = x; else tmp = z * y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -52000.0], N[(z * y), $MachinePrecision], If[LessEqual[y, 4.4e-300], N[(a * t), $MachinePrecision], If[LessEqual[y, 2.2e+43], x, N[(z * y), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -52000:\\
\;\;\;\;z \cdot y\\
\mathbf{elif}\;y \leq 4.4 \cdot 10^{-300}:\\
\;\;\;\;a \cdot t\\
\mathbf{elif}\;y \leq 2.2 \cdot 10^{+43}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;z \cdot y\\
\end{array}
\end{array}
if y < -52000 or 2.20000000000000001e43 < y Initial program 91.7%
*-commutative91.7%
associate-*l*88.5%
Simplified88.5%
Taylor expanded in y around inf 51.1%
*-commutative51.1%
Simplified51.1%
if -52000 < y < 4.40000000000000004e-300Initial program 87.3%
*-commutative87.3%
associate-*l*93.4%
Simplified93.4%
Taylor expanded in t around inf 41.0%
if 4.40000000000000004e-300 < y < 2.20000000000000001e43Initial program 99.9%
*-commutative99.9%
associate-*l*95.3%
Simplified95.3%
Taylor expanded in x around inf 40.1%
Final simplification45.5%
(FPCore (x y z t a b) :precision binary64 (if (<= t -3.2e-115) (* a t) (if (<= t 6.6e-18) x (* a t))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -3.2e-115) {
tmp = a * t;
} else if (t <= 6.6e-18) {
tmp = x;
} else {
tmp = a * t;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (t <= (-3.2d-115)) then
tmp = a * t
else if (t <= 6.6d-18) then
tmp = x
else
tmp = a * t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -3.2e-115) {
tmp = a * t;
} else if (t <= 6.6e-18) {
tmp = x;
} else {
tmp = a * t;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -3.2e-115: tmp = a * t elif t <= 6.6e-18: tmp = x else: tmp = a * t return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -3.2e-115) tmp = Float64(a * t); elseif (t <= 6.6e-18) tmp = x; else tmp = Float64(a * t); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (t <= -3.2e-115) tmp = a * t; elseif (t <= 6.6e-18) tmp = x; else tmp = a * t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -3.2e-115], N[(a * t), $MachinePrecision], If[LessEqual[t, 6.6e-18], x, N[(a * t), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.2 \cdot 10^{-115}:\\
\;\;\;\;a \cdot t\\
\mathbf{elif}\;t \leq 6.6 \cdot 10^{-18}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;a \cdot t\\
\end{array}
\end{array}
if t < -3.2e-115 or 6.6000000000000003e-18 < t Initial program 87.9%
*-commutative87.9%
associate-*l*89.6%
Simplified89.6%
Taylor expanded in t around inf 42.7%
if -3.2e-115 < t < 6.6000000000000003e-18Initial program 98.9%
*-commutative98.9%
associate-*l*94.4%
Simplified94.4%
Taylor expanded in x around inf 38.2%
Final simplification40.9%
(FPCore (x y z t a b) :precision binary64 x)
double code(double x, double y, double z, double t, double a, double b) {
return x;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = x
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x;
}
def code(x, y, z, t, a, b): return x
function code(x, y, z, t, a, b) return x end
function tmp = code(x, y, z, t, a, b) tmp = x; end
code[x_, y_, z_, t_, a_, b_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 92.3%
*-commutative92.3%
associate-*l*91.5%
Simplified91.5%
Taylor expanded in x around inf 25.4%
Final simplification25.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ (* z (+ (* b a) y)) (+ x (* t a)))))
(if (< z -11820553527347888000.0)
t_1
(if (< z 4.7589743188364287e-122)
(+ (* (+ (* b z) t) a) (+ (* z y) x))
t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z * ((b * a) + y)) + (x + (t * a));
double tmp;
if (z < -11820553527347888000.0) {
tmp = t_1;
} else if (z < 4.7589743188364287e-122) {
tmp = (((b * z) + t) * a) + ((z * y) + x);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (z * ((b * a) + y)) + (x + (t * a))
if (z < (-11820553527347888000.0d0)) then
tmp = t_1
else if (z < 4.7589743188364287d-122) then
tmp = (((b * z) + t) * a) + ((z * y) + x)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z * ((b * a) + y)) + (x + (t * a));
double tmp;
if (z < -11820553527347888000.0) {
tmp = t_1;
} else if (z < 4.7589743188364287e-122) {
tmp = (((b * z) + t) * a) + ((z * y) + x);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (z * ((b * a) + y)) + (x + (t * a)) tmp = 0 if z < -11820553527347888000.0: tmp = t_1 elif z < 4.7589743188364287e-122: tmp = (((b * z) + t) * a) + ((z * y) + x) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(z * Float64(Float64(b * a) + y)) + Float64(x + Float64(t * a))) tmp = 0.0 if (z < -11820553527347888000.0) tmp = t_1; elseif (z < 4.7589743188364287e-122) tmp = Float64(Float64(Float64(Float64(b * z) + t) * a) + Float64(Float64(z * y) + x)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (z * ((b * a) + y)) + (x + (t * a)); tmp = 0.0; if (z < -11820553527347888000.0) tmp = t_1; elseif (z < 4.7589743188364287e-122) tmp = (((b * z) + t) * a) + ((z * y) + x); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(z * N[(N[(b * a), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision] + N[(x + N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[z, -11820553527347888000.0], t$95$1, If[Less[z, 4.7589743188364287e-122], N[(N[(N[(N[(b * z), $MachinePrecision] + t), $MachinePrecision] * a), $MachinePrecision] + N[(N[(z * y), $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \left(b \cdot a + y\right) + \left(x + t \cdot a\right)\\
\mathbf{if}\;z < -11820553527347888000:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z < 4.7589743188364287 \cdot 10^{-122}:\\
\;\;\;\;\left(b \cdot z + t\right) \cdot a + \left(z \cdot y + x\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
herbie shell --seed 2023283
(FPCore (x y z t a b)
:name "Graphics.Rasterific.CubicBezier:cachedBezierAt from Rasterific-0.6.1"
:precision binary64
:herbie-target
(if (< z -11820553527347888000.0) (+ (* z (+ (* b a) y)) (+ x (* t a))) (if (< z 4.7589743188364287e-122) (+ (* (+ (* b z) t) a) (+ (* z y) x)) (+ (* z (+ (* b a) y)) (+ x (* t a)))))
(+ (+ (+ x (* y z)) (* t a)) (* (* a z) b)))