
(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 18 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 (if (or (<= a -1e-12) (not (<= a 2.5e+46))) (fma y z (+ x (* a (+ t (* z b))))) (fma (* z a) b (+ (fma z y x) (* a t)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -1e-12) || !(a <= 2.5e+46)) {
tmp = fma(y, z, (x + (a * (t + (z * b)))));
} else {
tmp = fma((z * a), b, (fma(z, y, x) + (a * t)));
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if ((a <= -1e-12) || !(a <= 2.5e+46)) tmp = fma(y, z, Float64(x + Float64(a * Float64(t + Float64(z * b))))); else tmp = fma(Float64(z * a), b, Float64(fma(z, y, x) + Float64(a * t))); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[a, -1e-12], N[Not[LessEqual[a, 2.5e+46]], $MachinePrecision]], N[(y * z + N[(x + N[(a * N[(t + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(z * a), $MachinePrecision] * b + N[(N[(z * y + x), $MachinePrecision] + N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1 \cdot 10^{-12} \lor \neg \left(a \leq 2.5 \cdot 10^{+46}\right):\\
\;\;\;\;\mathsf{fma}\left(y, z, x + a \cdot \left(t + z \cdot b\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(z \cdot a, b, \mathsf{fma}\left(z, y, x\right) + a \cdot t\right)\\
\end{array}
\end{array}
if a < -9.9999999999999998e-13 or 2.5000000000000001e46 < a Initial program 86.9%
associate-+l+86.9%
+-commutative86.9%
associate-+l+86.9%
fma-def89.4%
+-commutative89.4%
*-commutative89.4%
associate-*l*95.0%
distribute-lft-out99.1%
fma-def99.1%
+-commutative99.1%
fma-def99.1%
Simplified99.1%
Taylor expanded in a around 0 99.1%
if -9.9999999999999998e-13 < a < 2.5000000000000001e46Initial program 97.7%
associate-+l+97.7%
associate-*l*92.0%
Simplified92.0%
associate-+r+92.0%
+-commutative92.0%
associate-*r*97.7%
fma-def100.0%
*-commutative100.0%
+-commutative100.0%
*-commutative100.0%
fma-def100.0%
+-commutative100.0%
*-commutative100.0%
fma-def100.0%
Applied egg-rr100.0%
fma-udef100.0%
+-commutative100.0%
Applied egg-rr100.0%
Final simplification99.6%
(FPCore (x y z t a b) :precision binary64 (if (<= y 1e-159) (fma z (fma a b y) (fma t a x)) (fma y z (+ x (* a (+ t (* z b)))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= 1e-159) {
tmp = fma(z, fma(a, b, y), fma(t, a, x));
} else {
tmp = fma(y, z, (x + (a * (t + (z * b)))));
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= 1e-159) tmp = fma(z, fma(a, b, y), fma(t, a, x)); else tmp = fma(y, z, Float64(x + Float64(a * Float64(t + Float64(z * b))))); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, 1e-159], N[(z * N[(a * b + y), $MachinePrecision] + N[(t * a + x), $MachinePrecision]), $MachinePrecision], N[(y * z + N[(x + N[(a * N[(t + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 10^{-159}:\\
\;\;\;\;\mathsf{fma}\left(z, \mathsf{fma}\left(a, b, y\right), \mathsf{fma}\left(t, a, x\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(y, z, x + a \cdot \left(t + z \cdot b\right)\right)\\
\end{array}
\end{array}
if y < 9.99999999999999989e-160Initial program 97.2%
+-commutative97.2%
+-commutative97.2%
associate-+l+97.2%
associate-+r+97.2%
*-commutative97.2%
associate-*l*98.5%
*-commutative98.5%
distribute-lft-out98.5%
fma-def99.2%
fma-def99.2%
+-commutative99.2%
fma-def99.2%
Simplified99.2%
if 9.99999999999999989e-160 < y Initial program 86.8%
associate-+l+86.8%
+-commutative86.8%
associate-+l+86.8%
fma-def89.5%
+-commutative89.5%
*-commutative89.5%
associate-*l*93.0%
distribute-lft-out96.5%
fma-def96.5%
+-commutative96.5%
fma-def96.5%
Simplified96.5%
Taylor expanded in a around 0 96.5%
Final simplification98.0%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (+ (+ (* a t) (+ x (* y z))) (* b (* z a))))) (if (<= t_1 5e+198) t_1 (fma y z (+ x (* a (+ t (* z b))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((a * t) + (x + (y * z))) + (b * (z * a));
double tmp;
if (t_1 <= 5e+198) {
tmp = t_1;
} else {
tmp = fma(y, z, (x + (a * (t + (z * b)))));
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(Float64(a * t) + Float64(x + Float64(y * z))) + Float64(b * Float64(z * a))) tmp = 0.0 if (t_1 <= 5e+198) tmp = t_1; else tmp = fma(y, z, Float64(x + Float64(a * Float64(t + Float64(z * b))))); end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(a * t), $MachinePrecision] + N[(x + N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * N[(z * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, 5e+198], t$95$1, N[(y * z + N[(x + N[(a * N[(t + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(a \cdot t + \left(x + y \cdot z\right)\right) + b \cdot \left(z \cdot a\right)\\
\mathbf{if}\;t_1 \leq 5 \cdot 10^{+198}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(y, z, x + a \cdot \left(t + z \cdot b\right)\right)\\
\end{array}
\end{array}
if (+.f64 (+.f64 (+.f64 x (*.f64 y z)) (*.f64 t a)) (*.f64 (*.f64 a z) b)) < 5.00000000000000049e198Initial program 98.8%
if 5.00000000000000049e198 < (+.f64 (+.f64 (+.f64 x (*.f64 y z)) (*.f64 t a)) (*.f64 (*.f64 a z) b)) Initial program 80.2%
associate-+l+80.2%
+-commutative80.2%
associate-+l+80.2%
fma-def83.7%
+-commutative83.7%
*-commutative83.7%
associate-*l*89.5%
distribute-lft-out95.3%
fma-def95.3%
+-commutative95.3%
fma-def95.3%
Simplified95.3%
Taylor expanded in a around 0 95.3%
Final simplification97.6%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (+ (+ (* a t) (+ x (* y z))) (* b (* z a))))) (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 = ((a * t) + (x + (y * z))) + (b * (z * a));
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 = ((a * t) + (x + (y * z))) + (b * (z * a));
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 = ((a * t) + (x + (y * z))) + (b * (z * a)) 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(a * t) + Float64(x + Float64(y * z))) + Float64(b * Float64(z * a))) 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 = ((a * t) + (x + (y * z))) + (b * (z * a)); 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[(a * t), $MachinePrecision] + N[(x + N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * N[(z * a), $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(a \cdot t + \left(x + y \cdot z\right)\right) + b \cdot \left(z \cdot a\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.9%
if +inf.0 < (+.f64 (+.f64 (+.f64 x (*.f64 y z)) (*.f64 t a)) (*.f64 (*.f64 a z) b)) Initial program 0.0%
+-commutative0.0%
+-commutative0.0%
associate-+l+0.0%
associate-+r+0.0%
*-commutative0.0%
associate-*l*14.3%
*-commutative14.3%
distribute-lft-out50.0%
fma-def64.3%
fma-def64.3%
+-commutative64.3%
fma-def64.3%
Simplified64.3%
Taylor expanded in z around inf 78.6%
Final simplification96.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* a (* z b))))
(if (<= z -5.4e+221)
t_1
(if (<= z -1.85e+77)
(* y z)
(if (<= z -1.36e-187)
x
(if (<= z 4.3e-83)
(* a t)
(if (<= z 1.85e+49)
t_1
(if (<= z 1.08e+88)
(* a t)
(if (<= z 1.2e+166)
(* y z)
(if (<= z 6.5e+214) t_1 (* y z)))))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = a * (z * b);
double tmp;
if (z <= -5.4e+221) {
tmp = t_1;
} else if (z <= -1.85e+77) {
tmp = y * z;
} else if (z <= -1.36e-187) {
tmp = x;
} else if (z <= 4.3e-83) {
tmp = a * t;
} else if (z <= 1.85e+49) {
tmp = t_1;
} else if (z <= 1.08e+88) {
tmp = a * t;
} else if (z <= 1.2e+166) {
tmp = y * z;
} else if (z <= 6.5e+214) {
tmp = t_1;
} else {
tmp = y * z;
}
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 = a * (z * b)
if (z <= (-5.4d+221)) then
tmp = t_1
else if (z <= (-1.85d+77)) then
tmp = y * z
else if (z <= (-1.36d-187)) then
tmp = x
else if (z <= 4.3d-83) then
tmp = a * t
else if (z <= 1.85d+49) then
tmp = t_1
else if (z <= 1.08d+88) then
tmp = a * t
else if (z <= 1.2d+166) then
tmp = y * z
else if (z <= 6.5d+214) then
tmp = t_1
else
tmp = y * z
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 * (z * b);
double tmp;
if (z <= -5.4e+221) {
tmp = t_1;
} else if (z <= -1.85e+77) {
tmp = y * z;
} else if (z <= -1.36e-187) {
tmp = x;
} else if (z <= 4.3e-83) {
tmp = a * t;
} else if (z <= 1.85e+49) {
tmp = t_1;
} else if (z <= 1.08e+88) {
tmp = a * t;
} else if (z <= 1.2e+166) {
tmp = y * z;
} else if (z <= 6.5e+214) {
tmp = t_1;
} else {
tmp = y * z;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = a * (z * b) tmp = 0 if z <= -5.4e+221: tmp = t_1 elif z <= -1.85e+77: tmp = y * z elif z <= -1.36e-187: tmp = x elif z <= 4.3e-83: tmp = a * t elif z <= 1.85e+49: tmp = t_1 elif z <= 1.08e+88: tmp = a * t elif z <= 1.2e+166: tmp = y * z elif z <= 6.5e+214: tmp = t_1 else: tmp = y * z return tmp
function code(x, y, z, t, a, b) t_1 = Float64(a * Float64(z * b)) tmp = 0.0 if (z <= -5.4e+221) tmp = t_1; elseif (z <= -1.85e+77) tmp = Float64(y * z); elseif (z <= -1.36e-187) tmp = x; elseif (z <= 4.3e-83) tmp = Float64(a * t); elseif (z <= 1.85e+49) tmp = t_1; elseif (z <= 1.08e+88) tmp = Float64(a * t); elseif (z <= 1.2e+166) tmp = Float64(y * z); elseif (z <= 6.5e+214) tmp = t_1; else tmp = Float64(y * z); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = a * (z * b); tmp = 0.0; if (z <= -5.4e+221) tmp = t_1; elseif (z <= -1.85e+77) tmp = y * z; elseif (z <= -1.36e-187) tmp = x; elseif (z <= 4.3e-83) tmp = a * t; elseif (z <= 1.85e+49) tmp = t_1; elseif (z <= 1.08e+88) tmp = a * t; elseif (z <= 1.2e+166) tmp = y * z; elseif (z <= 6.5e+214) tmp = t_1; else tmp = y * z; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(a * N[(z * b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -5.4e+221], t$95$1, If[LessEqual[z, -1.85e+77], N[(y * z), $MachinePrecision], If[LessEqual[z, -1.36e-187], x, If[LessEqual[z, 4.3e-83], N[(a * t), $MachinePrecision], If[LessEqual[z, 1.85e+49], t$95$1, If[LessEqual[z, 1.08e+88], N[(a * t), $MachinePrecision], If[LessEqual[z, 1.2e+166], N[(y * z), $MachinePrecision], If[LessEqual[z, 6.5e+214], t$95$1, N[(y * z), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot \left(z \cdot b\right)\\
\mathbf{if}\;z \leq -5.4 \cdot 10^{+221}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -1.85 \cdot 10^{+77}:\\
\;\;\;\;y \cdot z\\
\mathbf{elif}\;z \leq -1.36 \cdot 10^{-187}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 4.3 \cdot 10^{-83}:\\
\;\;\;\;a \cdot t\\
\mathbf{elif}\;z \leq 1.85 \cdot 10^{+49}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 1.08 \cdot 10^{+88}:\\
\;\;\;\;a \cdot t\\
\mathbf{elif}\;z \leq 1.2 \cdot 10^{+166}:\\
\;\;\;\;y \cdot z\\
\mathbf{elif}\;z \leq 6.5 \cdot 10^{+214}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;y \cdot z\\
\end{array}
\end{array}
if z < -5.3999999999999999e221 or 4.30000000000000033e-83 < z < 1.85000000000000009e49 or 1.19999999999999996e166 < z < 6.5000000000000001e214Initial program 81.2%
+-commutative81.2%
+-commutative81.2%
associate-+l+81.2%
associate-+r+81.2%
*-commutative81.2%
associate-*l*86.7%
*-commutative86.7%
distribute-lft-out94.3%
fma-def94.3%
fma-def94.3%
+-commutative94.3%
fma-def94.3%
Simplified94.3%
Taylor expanded in b around inf 63.1%
*-commutative63.1%
Simplified63.1%
if -5.3999999999999999e221 < z < -1.84999999999999997e77 or 1.08000000000000003e88 < z < 1.19999999999999996e166 or 6.5000000000000001e214 < z Initial program 92.1%
+-commutative92.1%
+-commutative92.1%
associate-+l+92.1%
associate-+r+92.1%
*-commutative92.1%
associate-*l*97.3%
*-commutative97.3%
distribute-lft-out98.6%
fma-def98.6%
fma-def98.6%
+-commutative98.6%
fma-def98.6%
Simplified98.6%
Taylor expanded in y around inf 55.6%
*-commutative55.6%
Simplified55.6%
if -1.84999999999999997e77 < z < -1.36000000000000011e-187Initial program 98.1%
+-commutative98.1%
+-commutative98.1%
associate-+l+98.1%
associate-+r+98.1%
*-commutative98.1%
associate-*l*93.0%
*-commutative93.0%
distribute-lft-out93.0%
fma-def93.0%
fma-def93.0%
+-commutative93.0%
fma-def93.0%
Simplified93.0%
Taylor expanded in x around inf 40.0%
if -1.36000000000000011e-187 < z < 4.30000000000000033e-83 or 1.85000000000000009e49 < z < 1.08000000000000003e88Initial program 97.2%
+-commutative97.2%
+-commutative97.2%
associate-+l+97.2%
associate-+r+97.2%
*-commutative97.2%
associate-*l*91.9%
*-commutative91.9%
distribute-lft-out91.9%
fma-def94.7%
fma-def94.7%
+-commutative94.7%
fma-def94.7%
Simplified94.7%
Taylor expanded in t around inf 57.0%
Final simplification54.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (* y z))) (t_2 (+ x (* a t))) (t_3 (* z (+ y (* a b)))))
(if (<= z -2.25e+140)
t_3
(if (<= z -1.95e+34)
t_1
(if (<= z -7e-51)
t_2
(if (<= z -3.4e-170)
t_1
(if (or (<= z 6.2e-96) (and (not (<= z 1.4e+66)) (<= z 1.5e+87)))
t_2
t_3)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (y * z);
double t_2 = x + (a * t);
double t_3 = z * (y + (a * b));
double tmp;
if (z <= -2.25e+140) {
tmp = t_3;
} else if (z <= -1.95e+34) {
tmp = t_1;
} else if (z <= -7e-51) {
tmp = t_2;
} else if (z <= -3.4e-170) {
tmp = t_1;
} else if ((z <= 6.2e-96) || (!(z <= 1.4e+66) && (z <= 1.5e+87))) {
tmp = t_2;
} else {
tmp = t_3;
}
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) :: t_3
real(8) :: tmp
t_1 = x + (y * z)
t_2 = x + (a * t)
t_3 = z * (y + (a * b))
if (z <= (-2.25d+140)) then
tmp = t_3
else if (z <= (-1.95d+34)) then
tmp = t_1
else if (z <= (-7d-51)) then
tmp = t_2
else if (z <= (-3.4d-170)) then
tmp = t_1
else if ((z <= 6.2d-96) .or. (.not. (z <= 1.4d+66)) .and. (z <= 1.5d+87)) then
tmp = t_2
else
tmp = t_3
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 + (y * z);
double t_2 = x + (a * t);
double t_3 = z * (y + (a * b));
double tmp;
if (z <= -2.25e+140) {
tmp = t_3;
} else if (z <= -1.95e+34) {
tmp = t_1;
} else if (z <= -7e-51) {
tmp = t_2;
} else if (z <= -3.4e-170) {
tmp = t_1;
} else if ((z <= 6.2e-96) || (!(z <= 1.4e+66) && (z <= 1.5e+87))) {
tmp = t_2;
} else {
tmp = t_3;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + (y * z) t_2 = x + (a * t) t_3 = z * (y + (a * b)) tmp = 0 if z <= -2.25e+140: tmp = t_3 elif z <= -1.95e+34: tmp = t_1 elif z <= -7e-51: tmp = t_2 elif z <= -3.4e-170: tmp = t_1 elif (z <= 6.2e-96) or (not (z <= 1.4e+66) and (z <= 1.5e+87)): tmp = t_2 else: tmp = t_3 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(y * z)) t_2 = Float64(x + Float64(a * t)) t_3 = Float64(z * Float64(y + Float64(a * b))) tmp = 0.0 if (z <= -2.25e+140) tmp = t_3; elseif (z <= -1.95e+34) tmp = t_1; elseif (z <= -7e-51) tmp = t_2; elseif (z <= -3.4e-170) tmp = t_1; elseif ((z <= 6.2e-96) || (!(z <= 1.4e+66) && (z <= 1.5e+87))) tmp = t_2; else tmp = t_3; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x + (y * z); t_2 = x + (a * t); t_3 = z * (y + (a * b)); tmp = 0.0; if (z <= -2.25e+140) tmp = t_3; elseif (z <= -1.95e+34) tmp = t_1; elseif (z <= -7e-51) tmp = t_2; elseif (z <= -3.4e-170) tmp = t_1; elseif ((z <= 6.2e-96) || (~((z <= 1.4e+66)) && (z <= 1.5e+87))) tmp = t_2; else tmp = t_3; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(y * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(a * t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(z * N[(y + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.25e+140], t$95$3, If[LessEqual[z, -1.95e+34], t$95$1, If[LessEqual[z, -7e-51], t$95$2, If[LessEqual[z, -3.4e-170], t$95$1, If[Or[LessEqual[z, 6.2e-96], And[N[Not[LessEqual[z, 1.4e+66]], $MachinePrecision], LessEqual[z, 1.5e+87]]], t$95$2, t$95$3]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + y \cdot z\\
t_2 := x + a \cdot t\\
t_3 := z \cdot \left(y + a \cdot b\right)\\
\mathbf{if}\;z \leq -2.25 \cdot 10^{+140}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;z \leq -1.95 \cdot 10^{+34}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -7 \cdot 10^{-51}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq -3.4 \cdot 10^{-170}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 6.2 \cdot 10^{-96} \lor \neg \left(z \leq 1.4 \cdot 10^{+66}\right) \land z \leq 1.5 \cdot 10^{+87}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_3\\
\end{array}
\end{array}
if z < -2.2500000000000001e140 or 6.1999999999999998e-96 < z < 1.4e66 or 1.4999999999999999e87 < z Initial program 87.8%
+-commutative87.8%
+-commutative87.8%
associate-+l+87.8%
associate-+r+87.8%
*-commutative87.8%
associate-*l*92.6%
*-commutative92.6%
distribute-lft-out96.6%
fma-def96.7%
fma-def96.7%
+-commutative96.7%
fma-def96.7%
Simplified96.7%
Taylor expanded in z around inf 83.4%
if -2.2500000000000001e140 < z < -1.9500000000000001e34 or -6.9999999999999995e-51 < z < -3.40000000000000013e-170Initial program 97.6%
+-commutative97.6%
+-commutative97.6%
associate-+l+97.6%
associate-+r+97.6%
*-commutative97.6%
associate-*l*93.7%
*-commutative93.7%
distribute-lft-out93.7%
fma-def93.7%
fma-def93.7%
+-commutative93.7%
fma-def93.7%
Simplified93.7%
Taylor expanded in a around 0 73.7%
if -1.9500000000000001e34 < z < -6.9999999999999995e-51 or -3.40000000000000013e-170 < z < 6.1999999999999998e-96 or 1.4e66 < z < 1.4999999999999999e87Initial program 96.6%
+-commutative96.6%
+-commutative96.6%
associate-+l+96.6%
associate-+r+96.6%
*-commutative96.6%
associate-*l*92.2%
*-commutative92.2%
distribute-lft-out92.2%
fma-def94.5%
fma-def94.5%
+-commutative94.5%
fma-def94.5%
Simplified94.5%
Taylor expanded in z around 0 79.9%
Final simplification80.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* z (* a b))))
(if (<= y -2.7e+17)
(* y z)
(if (<= y -5.5e-62)
(* a t)
(if (<= y 1.15e-285)
t_1
(if (<= y 9.2e-207)
x
(if (<= y 1.5e-171)
t_1
(if (<= y 1.9e-55)
(* a t)
(if (<= y 900000000.0)
t_1
(if (<= y 118000000000.0) (* a t) (* y z)))))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z * (a * b);
double tmp;
if (y <= -2.7e+17) {
tmp = y * z;
} else if (y <= -5.5e-62) {
tmp = a * t;
} else if (y <= 1.15e-285) {
tmp = t_1;
} else if (y <= 9.2e-207) {
tmp = x;
} else if (y <= 1.5e-171) {
tmp = t_1;
} else if (y <= 1.9e-55) {
tmp = a * t;
} else if (y <= 900000000.0) {
tmp = t_1;
} else if (y <= 118000000000.0) {
tmp = a * t;
} else {
tmp = y * z;
}
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 * (a * b)
if (y <= (-2.7d+17)) then
tmp = y * z
else if (y <= (-5.5d-62)) then
tmp = a * t
else if (y <= 1.15d-285) then
tmp = t_1
else if (y <= 9.2d-207) then
tmp = x
else if (y <= 1.5d-171) then
tmp = t_1
else if (y <= 1.9d-55) then
tmp = a * t
else if (y <= 900000000.0d0) then
tmp = t_1
else if (y <= 118000000000.0d0) then
tmp = a * t
else
tmp = y * z
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 * (a * b);
double tmp;
if (y <= -2.7e+17) {
tmp = y * z;
} else if (y <= -5.5e-62) {
tmp = a * t;
} else if (y <= 1.15e-285) {
tmp = t_1;
} else if (y <= 9.2e-207) {
tmp = x;
} else if (y <= 1.5e-171) {
tmp = t_1;
} else if (y <= 1.9e-55) {
tmp = a * t;
} else if (y <= 900000000.0) {
tmp = t_1;
} else if (y <= 118000000000.0) {
tmp = a * t;
} else {
tmp = y * z;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = z * (a * b) tmp = 0 if y <= -2.7e+17: tmp = y * z elif y <= -5.5e-62: tmp = a * t elif y <= 1.15e-285: tmp = t_1 elif y <= 9.2e-207: tmp = x elif y <= 1.5e-171: tmp = t_1 elif y <= 1.9e-55: tmp = a * t elif y <= 900000000.0: tmp = t_1 elif y <= 118000000000.0: tmp = a * t else: tmp = y * z return tmp
function code(x, y, z, t, a, b) t_1 = Float64(z * Float64(a * b)) tmp = 0.0 if (y <= -2.7e+17) tmp = Float64(y * z); elseif (y <= -5.5e-62) tmp = Float64(a * t); elseif (y <= 1.15e-285) tmp = t_1; elseif (y <= 9.2e-207) tmp = x; elseif (y <= 1.5e-171) tmp = t_1; elseif (y <= 1.9e-55) tmp = Float64(a * t); elseif (y <= 900000000.0) tmp = t_1; elseif (y <= 118000000000.0) tmp = Float64(a * t); else tmp = Float64(y * z); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = z * (a * b); tmp = 0.0; if (y <= -2.7e+17) tmp = y * z; elseif (y <= -5.5e-62) tmp = a * t; elseif (y <= 1.15e-285) tmp = t_1; elseif (y <= 9.2e-207) tmp = x; elseif (y <= 1.5e-171) tmp = t_1; elseif (y <= 1.9e-55) tmp = a * t; elseif (y <= 900000000.0) tmp = t_1; elseif (y <= 118000000000.0) tmp = a * t; else tmp = y * z; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(z * N[(a * b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2.7e+17], N[(y * z), $MachinePrecision], If[LessEqual[y, -5.5e-62], N[(a * t), $MachinePrecision], If[LessEqual[y, 1.15e-285], t$95$1, If[LessEqual[y, 9.2e-207], x, If[LessEqual[y, 1.5e-171], t$95$1, If[LessEqual[y, 1.9e-55], N[(a * t), $MachinePrecision], If[LessEqual[y, 900000000.0], t$95$1, If[LessEqual[y, 118000000000.0], N[(a * t), $MachinePrecision], N[(y * z), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \left(a \cdot b\right)\\
\mathbf{if}\;y \leq -2.7 \cdot 10^{+17}:\\
\;\;\;\;y \cdot z\\
\mathbf{elif}\;y \leq -5.5 \cdot 10^{-62}:\\
\;\;\;\;a \cdot t\\
\mathbf{elif}\;y \leq 1.15 \cdot 10^{-285}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 9.2 \cdot 10^{-207}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 1.5 \cdot 10^{-171}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 1.9 \cdot 10^{-55}:\\
\;\;\;\;a \cdot t\\
\mathbf{elif}\;y \leq 900000000:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 118000000000:\\
\;\;\;\;a \cdot t\\
\mathbf{else}:\\
\;\;\;\;y \cdot z\\
\end{array}
\end{array}
if y < -2.7e17 or 1.18e11 < y Initial program 88.5%
+-commutative88.5%
+-commutative88.5%
associate-+l+88.5%
associate-+r+88.5%
*-commutative88.5%
associate-*l*88.0%
*-commutative88.0%
distribute-lft-out92.1%
fma-def92.9%
fma-def92.9%
+-commutative92.9%
fma-def92.9%
Simplified92.9%
Taylor expanded in y around inf 55.7%
*-commutative55.7%
Simplified55.7%
if -2.7e17 < y < -5.50000000000000022e-62 or 1.5e-171 < y < 1.8999999999999998e-55 or 9e8 < y < 1.18e11Initial program 95.1%
+-commutative95.1%
+-commutative95.1%
associate-+l+95.1%
associate-+r+95.1%
*-commutative95.1%
associate-*l*97.4%
*-commutative97.4%
distribute-lft-out97.4%
fma-def97.4%
fma-def97.4%
+-commutative97.4%
fma-def97.4%
Simplified97.4%
Taylor expanded in t around inf 51.1%
if -5.50000000000000022e-62 < y < 1.14999999999999998e-285 or 9.2000000000000002e-207 < y < 1.5e-171 or 1.8999999999999998e-55 < y < 9e8Initial program 97.4%
+-commutative97.4%
+-commutative97.4%
associate-+l+97.4%
associate-+r+97.4%
*-commutative97.4%
associate-*l*97.3%
*-commutative97.3%
distribute-lft-out97.3%
fma-def97.3%
fma-def97.3%
+-commutative97.3%
fma-def97.3%
Simplified97.3%
Taylor expanded in b around inf 52.0%
associate-*r*58.1%
*-commutative58.1%
Simplified58.1%
if 1.14999999999999998e-285 < y < 9.2000000000000002e-207Initial program 94.4%
+-commutative94.4%
+-commutative94.4%
associate-+l+94.4%
associate-+r+94.4%
*-commutative94.4%
associate-*l*94.4%
*-commutative94.4%
distribute-lft-out94.4%
fma-def100.0%
fma-def100.0%
+-commutative100.0%
fma-def100.0%
Simplified100.0%
Taylor expanded in x around inf 51.6%
Final simplification55.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* z (+ y (* a b)))))
(if (<= z -5.6e+137)
t_1
(if (<= z -7.2e+25)
(+ x (* y z))
(if (<= z -8.5e-155)
(+ x (* a (* z b)))
(if (or (<= z 6.2e-96) (and (not (<= z 5.1e+66)) (<= z 1.15e+87)))
(+ x (* a t))
t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z * (y + (a * b));
double tmp;
if (z <= -5.6e+137) {
tmp = t_1;
} else if (z <= -7.2e+25) {
tmp = x + (y * z);
} else if (z <= -8.5e-155) {
tmp = x + (a * (z * b));
} else if ((z <= 6.2e-96) || (!(z <= 5.1e+66) && (z <= 1.15e+87))) {
tmp = x + (a * t);
} 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 * (y + (a * b))
if (z <= (-5.6d+137)) then
tmp = t_1
else if (z <= (-7.2d+25)) then
tmp = x + (y * z)
else if (z <= (-8.5d-155)) then
tmp = x + (a * (z * b))
else if ((z <= 6.2d-96) .or. (.not. (z <= 5.1d+66)) .and. (z <= 1.15d+87)) then
tmp = x + (a * t)
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 * (y + (a * b));
double tmp;
if (z <= -5.6e+137) {
tmp = t_1;
} else if (z <= -7.2e+25) {
tmp = x + (y * z);
} else if (z <= -8.5e-155) {
tmp = x + (a * (z * b));
} else if ((z <= 6.2e-96) || (!(z <= 5.1e+66) && (z <= 1.15e+87))) {
tmp = x + (a * t);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = z * (y + (a * b)) tmp = 0 if z <= -5.6e+137: tmp = t_1 elif z <= -7.2e+25: tmp = x + (y * z) elif z <= -8.5e-155: tmp = x + (a * (z * b)) elif (z <= 6.2e-96) or (not (z <= 5.1e+66) and (z <= 1.15e+87)): tmp = x + (a * t) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(z * Float64(y + Float64(a * b))) tmp = 0.0 if (z <= -5.6e+137) tmp = t_1; elseif (z <= -7.2e+25) tmp = Float64(x + Float64(y * z)); elseif (z <= -8.5e-155) tmp = Float64(x + Float64(a * Float64(z * b))); elseif ((z <= 6.2e-96) || (!(z <= 5.1e+66) && (z <= 1.15e+87))) tmp = Float64(x + Float64(a * t)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = z * (y + (a * b)); tmp = 0.0; if (z <= -5.6e+137) tmp = t_1; elseif (z <= -7.2e+25) tmp = x + (y * z); elseif (z <= -8.5e-155) tmp = x + (a * (z * b)); elseif ((z <= 6.2e-96) || (~((z <= 5.1e+66)) && (z <= 1.15e+87))) tmp = x + (a * t); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(z * N[(y + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -5.6e+137], t$95$1, If[LessEqual[z, -7.2e+25], N[(x + N[(y * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -8.5e-155], N[(x + N[(a * N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[z, 6.2e-96], And[N[Not[LessEqual[z, 5.1e+66]], $MachinePrecision], LessEqual[z, 1.15e+87]]], N[(x + N[(a * t), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \left(y + a \cdot b\right)\\
\mathbf{if}\;z \leq -5.6 \cdot 10^{+137}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -7.2 \cdot 10^{+25}:\\
\;\;\;\;x + y \cdot z\\
\mathbf{elif}\;z \leq -8.5 \cdot 10^{-155}:\\
\;\;\;\;x + a \cdot \left(z \cdot b\right)\\
\mathbf{elif}\;z \leq 6.2 \cdot 10^{-96} \lor \neg \left(z \leq 5.1 \cdot 10^{+66}\right) \land z \leq 1.15 \cdot 10^{+87}:\\
\;\;\;\;x + a \cdot t\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -5.60000000000000002e137 or 6.1999999999999998e-96 < z < 5.10000000000000008e66 or 1.1500000000000001e87 < z Initial program 87.8%
+-commutative87.8%
+-commutative87.8%
associate-+l+87.8%
associate-+r+87.8%
*-commutative87.8%
associate-*l*92.6%
*-commutative92.6%
distribute-lft-out96.6%
fma-def96.7%
fma-def96.7%
+-commutative96.7%
fma-def96.7%
Simplified96.7%
Taylor expanded in z around inf 83.4%
if -5.60000000000000002e137 < z < -7.20000000000000031e25Initial program 94.7%
+-commutative94.7%
+-commutative94.7%
associate-+l+94.7%
associate-+r+94.7%
*-commutative94.7%
associate-*l*100.0%
*-commutative100.0%
distribute-lft-out100.0%
fma-def100.0%
fma-def100.0%
+-commutative100.0%
fma-def100.0%
Simplified100.0%
Taylor expanded in a around 0 79.4%
if -7.20000000000000031e25 < z < -8.4999999999999996e-155Initial program 97.1%
associate-+l+97.1%
+-commutative97.1%
*-commutative97.1%
associate-*l*97.1%
distribute-lft-out99.9%
fma-def99.9%
+-commutative99.9%
fma-def99.9%
Simplified99.9%
Taylor expanded in y around 0 84.1%
Taylor expanded in t around 0 62.3%
if -8.4999999999999996e-155 < z < 6.1999999999999998e-96 or 5.10000000000000008e66 < z < 1.1500000000000001e87Initial program 97.4%
+-commutative97.4%
+-commutative97.4%
associate-+l+97.4%
associate-+r+97.4%
*-commutative97.4%
associate-*l*91.3%
*-commutative91.3%
distribute-lft-out91.3%
fma-def93.9%
fma-def93.9%
+-commutative93.9%
fma-def93.9%
Simplified93.9%
Taylor expanded in z around 0 85.1%
Final simplification80.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* z (+ y (* a b)))))
(if (<= z -1.2e+136)
t_1
(if (<= z -1.1e+26)
(+ x (* y z))
(if (<= z -1.2e-154)
(+ x (* a (* z b)))
(if (<= z 6.2e-96)
(+ x (* a t))
(if (or (<= z 1.9e+49) (not (<= z 4e+161)))
t_1
(+ (* a t) (* y z)))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z * (y + (a * b));
double tmp;
if (z <= -1.2e+136) {
tmp = t_1;
} else if (z <= -1.1e+26) {
tmp = x + (y * z);
} else if (z <= -1.2e-154) {
tmp = x + (a * (z * b));
} else if (z <= 6.2e-96) {
tmp = x + (a * t);
} else if ((z <= 1.9e+49) || !(z <= 4e+161)) {
tmp = t_1;
} else {
tmp = (a * t) + (y * z);
}
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 * (y + (a * b))
if (z <= (-1.2d+136)) then
tmp = t_1
else if (z <= (-1.1d+26)) then
tmp = x + (y * z)
else if (z <= (-1.2d-154)) then
tmp = x + (a * (z * b))
else if (z <= 6.2d-96) then
tmp = x + (a * t)
else if ((z <= 1.9d+49) .or. (.not. (z <= 4d+161))) then
tmp = t_1
else
tmp = (a * t) + (y * z)
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 * (y + (a * b));
double tmp;
if (z <= -1.2e+136) {
tmp = t_1;
} else if (z <= -1.1e+26) {
tmp = x + (y * z);
} else if (z <= -1.2e-154) {
tmp = x + (a * (z * b));
} else if (z <= 6.2e-96) {
tmp = x + (a * t);
} else if ((z <= 1.9e+49) || !(z <= 4e+161)) {
tmp = t_1;
} else {
tmp = (a * t) + (y * z);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = z * (y + (a * b)) tmp = 0 if z <= -1.2e+136: tmp = t_1 elif z <= -1.1e+26: tmp = x + (y * z) elif z <= -1.2e-154: tmp = x + (a * (z * b)) elif z <= 6.2e-96: tmp = x + (a * t) elif (z <= 1.9e+49) or not (z <= 4e+161): tmp = t_1 else: tmp = (a * t) + (y * z) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(z * Float64(y + Float64(a * b))) tmp = 0.0 if (z <= -1.2e+136) tmp = t_1; elseif (z <= -1.1e+26) tmp = Float64(x + Float64(y * z)); elseif (z <= -1.2e-154) tmp = Float64(x + Float64(a * Float64(z * b))); elseif (z <= 6.2e-96) tmp = Float64(x + Float64(a * t)); elseif ((z <= 1.9e+49) || !(z <= 4e+161)) tmp = t_1; else tmp = Float64(Float64(a * t) + Float64(y * z)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = z * (y + (a * b)); tmp = 0.0; if (z <= -1.2e+136) tmp = t_1; elseif (z <= -1.1e+26) tmp = x + (y * z); elseif (z <= -1.2e-154) tmp = x + (a * (z * b)); elseif (z <= 6.2e-96) tmp = x + (a * t); elseif ((z <= 1.9e+49) || ~((z <= 4e+161))) tmp = t_1; else tmp = (a * t) + (y * z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(z * N[(y + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.2e+136], t$95$1, If[LessEqual[z, -1.1e+26], N[(x + N[(y * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.2e-154], N[(x + N[(a * N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6.2e-96], N[(x + N[(a * t), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[z, 1.9e+49], N[Not[LessEqual[z, 4e+161]], $MachinePrecision]], t$95$1, N[(N[(a * t), $MachinePrecision] + N[(y * z), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \left(y + a \cdot b\right)\\
\mathbf{if}\;z \leq -1.2 \cdot 10^{+136}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -1.1 \cdot 10^{+26}:\\
\;\;\;\;x + y \cdot z\\
\mathbf{elif}\;z \leq -1.2 \cdot 10^{-154}:\\
\;\;\;\;x + a \cdot \left(z \cdot b\right)\\
\mathbf{elif}\;z \leq 6.2 \cdot 10^{-96}:\\
\;\;\;\;x + a \cdot t\\
\mathbf{elif}\;z \leq 1.9 \cdot 10^{+49} \lor \neg \left(z \leq 4 \cdot 10^{+161}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;a \cdot t + y \cdot z\\
\end{array}
\end{array}
if z < -1.2e136 or 6.1999999999999998e-96 < z < 1.8999999999999999e49 or 4.0000000000000002e161 < z Initial program 85.6%
+-commutative85.6%
+-commutative85.6%
associate-+l+85.6%
associate-+r+85.6%
*-commutative85.6%
associate-*l*91.2%
*-commutative91.2%
distribute-lft-out96.0%
fma-def96.0%
fma-def96.0%
+-commutative96.0%
fma-def96.1%
Simplified96.1%
Taylor expanded in z around inf 86.0%
if -1.2e136 < z < -1.10000000000000004e26Initial program 94.7%
+-commutative94.7%
+-commutative94.7%
associate-+l+94.7%
associate-+r+94.7%
*-commutative94.7%
associate-*l*100.0%
*-commutative100.0%
distribute-lft-out100.0%
fma-def100.0%
fma-def100.0%
+-commutative100.0%
fma-def100.0%
Simplified100.0%
Taylor expanded in a around 0 79.4%
if -1.10000000000000004e26 < z < -1.19999999999999993e-154Initial program 97.1%
associate-+l+97.1%
+-commutative97.1%
*-commutative97.1%
associate-*l*97.1%
distribute-lft-out99.9%
fma-def99.9%
+-commutative99.9%
fma-def99.9%
Simplified99.9%
Taylor expanded in y around 0 84.1%
Taylor expanded in t around 0 62.3%
if -1.19999999999999993e-154 < z < 6.1999999999999998e-96Initial program 100.0%
+-commutative100.0%
+-commutative100.0%
associate-+l+100.0%
associate-+r+100.0%
*-commutative100.0%
associate-*l*93.3%
*-commutative93.3%
distribute-lft-out93.3%
fma-def93.3%
fma-def93.3%
+-commutative93.3%
fma-def93.3%
Simplified93.3%
Taylor expanded in z around 0 85.0%
if 1.8999999999999999e49 < z < 4.0000000000000002e161Initial program 92.2%
Taylor expanded in x around 0 88.6%
Taylor expanded in b around 0 77.5%
Final simplification81.0%
(FPCore (x y z t a b) :precision binary64 (if (<= z -4.2e+213) (* z (+ y (* a b))) (+ (+ (* a t) (* a (* z b))) (+ x (* y z)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -4.2e+213) {
tmp = z * (y + (a * b));
} else {
tmp = ((a * t) + (a * (z * b))) + (x + (y * z));
}
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 (z <= (-4.2d+213)) then
tmp = z * (y + (a * b))
else
tmp = ((a * t) + (a * (z * b))) + (x + (y * z))
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 (z <= -4.2e+213) {
tmp = z * (y + (a * b));
} else {
tmp = ((a * t) + (a * (z * b))) + (x + (y * z));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -4.2e+213: tmp = z * (y + (a * b)) else: tmp = ((a * t) + (a * (z * b))) + (x + (y * z)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -4.2e+213) tmp = Float64(z * Float64(y + Float64(a * b))); else tmp = Float64(Float64(Float64(a * t) + Float64(a * Float64(z * b))) + Float64(x + Float64(y * z))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= -4.2e+213) tmp = z * (y + (a * b)); else tmp = ((a * t) + (a * (z * b))) + (x + (y * z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -4.2e+213], N[(z * N[(y + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(a * t), $MachinePrecision] + N[(a * N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x + N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.2 \cdot 10^{+213}:\\
\;\;\;\;z \cdot \left(y + a \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;\left(a \cdot t + a \cdot \left(z \cdot b\right)\right) + \left(x + y \cdot z\right)\\
\end{array}
\end{array}
if z < -4.2000000000000001e213Initial program 74.9%
+-commutative74.9%
+-commutative74.9%
associate-+l+74.9%
associate-+r+74.9%
*-commutative74.9%
associate-*l*78.4%
*-commutative78.4%
distribute-lft-out92.7%
fma-def92.7%
fma-def92.7%
+-commutative92.7%
fma-def92.7%
Simplified92.7%
Taylor expanded in z around inf 93.3%
if -4.2000000000000001e213 < z Initial program 94.7%
associate-+l+94.7%
associate-*l*94.8%
Simplified94.8%
Final simplification94.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (* y z))))
(if (<= z -1.25e+224)
(* a (* z b))
(if (<= z -2.15e+58)
t_1
(if (<= z 5.6e-38)
(+ x (* a t))
(if (<= z 1.95e+49)
(* z (* a b))
(if (<= z 1.08e+88) (* a t) t_1)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (y * z);
double tmp;
if (z <= -1.25e+224) {
tmp = a * (z * b);
} else if (z <= -2.15e+58) {
tmp = t_1;
} else if (z <= 5.6e-38) {
tmp = x + (a * t);
} else if (z <= 1.95e+49) {
tmp = z * (a * b);
} else if (z <= 1.08e+88) {
tmp = a * t;
} 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 = x + (y * z)
if (z <= (-1.25d+224)) then
tmp = a * (z * b)
else if (z <= (-2.15d+58)) then
tmp = t_1
else if (z <= 5.6d-38) then
tmp = x + (a * t)
else if (z <= 1.95d+49) then
tmp = z * (a * b)
else if (z <= 1.08d+88) then
tmp = a * t
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 = x + (y * z);
double tmp;
if (z <= -1.25e+224) {
tmp = a * (z * b);
} else if (z <= -2.15e+58) {
tmp = t_1;
} else if (z <= 5.6e-38) {
tmp = x + (a * t);
} else if (z <= 1.95e+49) {
tmp = z * (a * b);
} else if (z <= 1.08e+88) {
tmp = a * t;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + (y * z) tmp = 0 if z <= -1.25e+224: tmp = a * (z * b) elif z <= -2.15e+58: tmp = t_1 elif z <= 5.6e-38: tmp = x + (a * t) elif z <= 1.95e+49: tmp = z * (a * b) elif z <= 1.08e+88: tmp = a * t else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(y * z)) tmp = 0.0 if (z <= -1.25e+224) tmp = Float64(a * Float64(z * b)); elseif (z <= -2.15e+58) tmp = t_1; elseif (z <= 5.6e-38) tmp = Float64(x + Float64(a * t)); elseif (z <= 1.95e+49) tmp = Float64(z * Float64(a * b)); elseif (z <= 1.08e+88) tmp = Float64(a * t); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x + (y * z); tmp = 0.0; if (z <= -1.25e+224) tmp = a * (z * b); elseif (z <= -2.15e+58) tmp = t_1; elseif (z <= 5.6e-38) tmp = x + (a * t); elseif (z <= 1.95e+49) tmp = z * (a * b); elseif (z <= 1.08e+88) tmp = a * t; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(y * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.25e+224], N[(a * N[(z * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -2.15e+58], t$95$1, If[LessEqual[z, 5.6e-38], N[(x + N[(a * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.95e+49], N[(z * N[(a * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.08e+88], N[(a * t), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + y \cdot z\\
\mathbf{if}\;z \leq -1.25 \cdot 10^{+224}:\\
\;\;\;\;a \cdot \left(z \cdot b\right)\\
\mathbf{elif}\;z \leq -2.15 \cdot 10^{+58}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 5.6 \cdot 10^{-38}:\\
\;\;\;\;x + a \cdot t\\
\mathbf{elif}\;z \leq 1.95 \cdot 10^{+49}:\\
\;\;\;\;z \cdot \left(a \cdot b\right)\\
\mathbf{elif}\;z \leq 1.08 \cdot 10^{+88}:\\
\;\;\;\;a \cdot t\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -1.24999999999999991e224Initial program 74.9%
+-commutative74.9%
+-commutative74.9%
associate-+l+74.9%
associate-+r+74.9%
*-commutative74.9%
associate-*l*79.0%
*-commutative79.0%
distribute-lft-out91.5%
fma-def91.5%
fma-def91.5%
+-commutative91.5%
fma-def91.5%
Simplified91.5%
Taylor expanded in b around inf 75.5%
*-commutative75.5%
Simplified75.5%
if -1.24999999999999991e224 < z < -2.14999999999999996e58 or 1.08000000000000003e88 < z Initial program 89.6%
+-commutative89.6%
+-commutative89.6%
associate-+l+89.6%
associate-+r+89.6%
*-commutative89.6%
associate-*l*95.7%
*-commutative95.7%
distribute-lft-out97.8%
fma-def97.8%
fma-def97.8%
+-commutative97.8%
fma-def97.8%
Simplified97.8%
Taylor expanded in a around 0 64.7%
if -2.14999999999999996e58 < z < 5.6e-38Initial program 99.1%
+-commutative99.1%
+-commutative99.1%
associate-+l+99.1%
associate-+r+99.1%
*-commutative99.1%
associate-*l*93.6%
*-commutative93.6%
distribute-lft-out93.6%
fma-def93.6%
fma-def93.6%
+-commutative93.6%
fma-def93.6%
Simplified93.6%
Taylor expanded in z around 0 71.7%
if 5.6e-38 < z < 1.95e49Initial program 99.8%
+-commutative99.8%
+-commutative99.8%
associate-+l+99.8%
associate-+r+99.8%
*-commutative99.8%
associate-*l*100.0%
*-commutative100.0%
distribute-lft-out100.0%
fma-def100.0%
fma-def100.0%
+-commutative100.0%
fma-def100.0%
Simplified100.0%
Taylor expanded in b around inf 72.3%
associate-*r*72.7%
*-commutative72.7%
Simplified72.7%
if 1.95e49 < z < 1.08000000000000003e88Initial program 79.8%
+-commutative79.8%
+-commutative79.8%
associate-+l+79.8%
associate-+r+79.8%
*-commutative79.8%
associate-*l*80.0%
*-commutative80.0%
distribute-lft-out80.0%
fma-def100.0%
fma-def100.0%
+-commutative100.0%
fma-def100.0%
Simplified100.0%
Taylor expanded in t around inf 70.7%
Final simplification69.4%
(FPCore (x y z t a b) :precision binary64 (if (<= b -5.8e+145) (+ (* b (* z a)) (+ (* a t) (* y z))) (if (<= b 9e+150) (+ (+ x (* a t)) (* y z)) (+ x (* a (+ t (* z b)))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -5.8e+145) {
tmp = (b * (z * a)) + ((a * t) + (y * z));
} else if (b <= 9e+150) {
tmp = (x + (a * t)) + (y * z);
} else {
tmp = x + (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) :: tmp
if (b <= (-5.8d+145)) then
tmp = (b * (z * a)) + ((a * t) + (y * z))
else if (b <= 9d+150) then
tmp = (x + (a * t)) + (y * z)
else
tmp = x + (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 tmp;
if (b <= -5.8e+145) {
tmp = (b * (z * a)) + ((a * t) + (y * z));
} else if (b <= 9e+150) {
tmp = (x + (a * t)) + (y * z);
} else {
tmp = x + (a * (t + (z * b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -5.8e+145: tmp = (b * (z * a)) + ((a * t) + (y * z)) elif b <= 9e+150: tmp = (x + (a * t)) + (y * z) else: tmp = x + (a * (t + (z * b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -5.8e+145) tmp = Float64(Float64(b * Float64(z * a)) + Float64(Float64(a * t) + Float64(y * z))); elseif (b <= 9e+150) tmp = Float64(Float64(x + Float64(a * t)) + Float64(y * z)); else tmp = Float64(x + Float64(a * Float64(t + Float64(z * b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -5.8e+145) tmp = (b * (z * a)) + ((a * t) + (y * z)); elseif (b <= 9e+150) tmp = (x + (a * t)) + (y * z); else tmp = x + (a * (t + (z * b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -5.8e+145], N[(N[(b * N[(z * a), $MachinePrecision]), $MachinePrecision] + N[(N[(a * t), $MachinePrecision] + N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 9e+150], N[(N[(x + N[(a * t), $MachinePrecision]), $MachinePrecision] + N[(y * z), $MachinePrecision]), $MachinePrecision], N[(x + N[(a * N[(t + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -5.8 \cdot 10^{+145}:\\
\;\;\;\;b \cdot \left(z \cdot a\right) + \left(a \cdot t + y \cdot z\right)\\
\mathbf{elif}\;b \leq 9 \cdot 10^{+150}:\\
\;\;\;\;\left(x + a \cdot t\right) + y \cdot z\\
\mathbf{else}:\\
\;\;\;\;x + a \cdot \left(t + z \cdot b\right)\\
\end{array}
\end{array}
if b < -5.8000000000000001e145Initial program 94.0%
Taylor expanded in x around 0 91.1%
if -5.8000000000000001e145 < b < 9.00000000000000001e150Initial program 94.6%
+-commutative94.6%
+-commutative94.6%
associate-+l+94.6%
associate-+r+94.6%
*-commutative94.6%
associate-*l*97.8%
*-commutative97.8%
distribute-lft-out98.4%
fma-def98.9%
fma-def98.9%
+-commutative98.9%
fma-def98.9%
Simplified98.9%
Taylor expanded in b around 0 88.5%
if 9.00000000000000001e150 < b Initial program 82.0%
associate-+l+82.0%
+-commutative82.0%
*-commutative82.0%
associate-*l*77.2%
distribute-lft-out84.9%
fma-def84.9%
+-commutative84.9%
fma-def84.9%
Simplified84.9%
Taylor expanded in y around 0 87.6%
Final simplification88.7%
(FPCore (x y z t a b)
:precision binary64
(if (<= z -3.1e+77)
(* y z)
(if (<= z -1.25e-203)
x
(if (<= z 3.8e-134)
(* a t)
(if (<= z 4.4e-58) x (if (<= z 1.08e+88) (* a t) (* y z)))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -3.1e+77) {
tmp = y * z;
} else if (z <= -1.25e-203) {
tmp = x;
} else if (z <= 3.8e-134) {
tmp = a * t;
} else if (z <= 4.4e-58) {
tmp = x;
} else if (z <= 1.08e+88) {
tmp = a * t;
} else {
tmp = y * z;
}
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 (z <= (-3.1d+77)) then
tmp = y * z
else if (z <= (-1.25d-203)) then
tmp = x
else if (z <= 3.8d-134) then
tmp = a * t
else if (z <= 4.4d-58) then
tmp = x
else if (z <= 1.08d+88) then
tmp = a * t
else
tmp = y * z
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 (z <= -3.1e+77) {
tmp = y * z;
} else if (z <= -1.25e-203) {
tmp = x;
} else if (z <= 3.8e-134) {
tmp = a * t;
} else if (z <= 4.4e-58) {
tmp = x;
} else if (z <= 1.08e+88) {
tmp = a * t;
} else {
tmp = y * z;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -3.1e+77: tmp = y * z elif z <= -1.25e-203: tmp = x elif z <= 3.8e-134: tmp = a * t elif z <= 4.4e-58: tmp = x elif z <= 1.08e+88: tmp = a * t else: tmp = y * z return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -3.1e+77) tmp = Float64(y * z); elseif (z <= -1.25e-203) tmp = x; elseif (z <= 3.8e-134) tmp = Float64(a * t); elseif (z <= 4.4e-58) tmp = x; elseif (z <= 1.08e+88) tmp = Float64(a * t); else tmp = Float64(y * z); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= -3.1e+77) tmp = y * z; elseif (z <= -1.25e-203) tmp = x; elseif (z <= 3.8e-134) tmp = a * t; elseif (z <= 4.4e-58) tmp = x; elseif (z <= 1.08e+88) tmp = a * t; else tmp = y * z; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -3.1e+77], N[(y * z), $MachinePrecision], If[LessEqual[z, -1.25e-203], x, If[LessEqual[z, 3.8e-134], N[(a * t), $MachinePrecision], If[LessEqual[z, 4.4e-58], x, If[LessEqual[z, 1.08e+88], N[(a * t), $MachinePrecision], N[(y * z), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.1 \cdot 10^{+77}:\\
\;\;\;\;y \cdot z\\
\mathbf{elif}\;z \leq -1.25 \cdot 10^{-203}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 3.8 \cdot 10^{-134}:\\
\;\;\;\;a \cdot t\\
\mathbf{elif}\;z \leq 4.4 \cdot 10^{-58}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 1.08 \cdot 10^{+88}:\\
\;\;\;\;a \cdot t\\
\mathbf{else}:\\
\;\;\;\;y \cdot z\\
\end{array}
\end{array}
if z < -3.09999999999999999e77 or 1.08000000000000003e88 < z Initial program 86.0%
+-commutative86.0%
+-commutative86.0%
associate-+l+86.0%
associate-+r+86.0%
*-commutative86.0%
associate-*l*92.0%
*-commutative92.0%
distribute-lft-out96.4%
fma-def96.4%
fma-def96.4%
+-commutative96.4%
fma-def96.4%
Simplified96.4%
Taylor expanded in y around inf 47.3%
*-commutative47.3%
Simplified47.3%
if -3.09999999999999999e77 < z < -1.25e-203 or 3.80000000000000003e-134 < z < 4.40000000000000011e-58Initial program 98.5%
+-commutative98.5%
+-commutative98.5%
associate-+l+98.5%
associate-+r+98.5%
*-commutative98.5%
associate-*l*94.6%
*-commutative94.6%
distribute-lft-out94.6%
fma-def94.6%
fma-def94.6%
+-commutative94.6%
fma-def94.6%
Simplified94.6%
Taylor expanded in x around inf 41.3%
if -1.25e-203 < z < 3.80000000000000003e-134 or 4.40000000000000011e-58 < z < 1.08000000000000003e88Initial program 97.2%
+-commutative97.2%
+-commutative97.2%
associate-+l+97.2%
associate-+r+97.2%
*-commutative97.2%
associate-*l*91.8%
*-commutative91.8%
distribute-lft-out91.8%
fma-def94.6%
fma-def94.6%
+-commutative94.6%
fma-def94.6%
Simplified94.6%
Taylor expanded in t around inf 56.3%
Final simplification48.2%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -3.8e+77) (not (<= z 7.2e+87))) (* z (+ y (* a b))) (+ x (* a (+ t (* z b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -3.8e+77) || !(z <= 7.2e+87)) {
tmp = z * (y + (a * b));
} else {
tmp = x + (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) :: tmp
if ((z <= (-3.8d+77)) .or. (.not. (z <= 7.2d+87))) then
tmp = z * (y + (a * b))
else
tmp = x + (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 tmp;
if ((z <= -3.8e+77) || !(z <= 7.2e+87)) {
tmp = z * (y + (a * b));
} else {
tmp = x + (a * (t + (z * b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -3.8e+77) or not (z <= 7.2e+87): tmp = z * (y + (a * b)) else: tmp = x + (a * (t + (z * b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -3.8e+77) || !(z <= 7.2e+87)) tmp = Float64(z * Float64(y + Float64(a * b))); else tmp = Float64(x + Float64(a * Float64(t + Float64(z * b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -3.8e+77) || ~((z <= 7.2e+87))) tmp = z * (y + (a * b)); else tmp = x + (a * (t + (z * b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -3.8e+77], N[Not[LessEqual[z, 7.2e+87]], $MachinePrecision]], N[(z * N[(y + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(a * N[(t + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.8 \cdot 10^{+77} \lor \neg \left(z \leq 7.2 \cdot 10^{+87}\right):\\
\;\;\;\;z \cdot \left(y + a \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;x + a \cdot \left(t + z \cdot b\right)\\
\end{array}
\end{array}
if z < -3.8000000000000001e77 or 7.19999999999999988e87 < z Initial program 86.1%
+-commutative86.1%
+-commutative86.1%
associate-+l+86.1%
associate-+r+86.1%
*-commutative86.1%
associate-*l*92.1%
*-commutative92.1%
distribute-lft-out96.4%
fma-def96.4%
fma-def96.4%
+-commutative96.4%
fma-def96.4%
Simplified96.4%
Taylor expanded in z around inf 84.1%
if -3.8000000000000001e77 < z < 7.19999999999999988e87Initial program 97.8%
associate-+l+97.8%
+-commutative97.8%
*-commutative97.8%
associate-*l*97.8%
distribute-lft-out99.2%
fma-def99.2%
+-commutative99.2%
fma-def99.2%
Simplified99.2%
Taylor expanded in y around 0 83.1%
Final simplification83.5%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -4e+91) (not (<= b 9.5e+150))) (+ x (* a (+ t (* z b)))) (+ (+ x (* a t)) (* y z))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -4e+91) || !(b <= 9.5e+150)) {
tmp = x + (a * (t + (z * b)));
} else {
tmp = (x + (a * t)) + (y * z);
}
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 ((b <= (-4d+91)) .or. (.not. (b <= 9.5d+150))) then
tmp = x + (a * (t + (z * b)))
else
tmp = (x + (a * t)) + (y * z)
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 ((b <= -4e+91) || !(b <= 9.5e+150)) {
tmp = x + (a * (t + (z * b)));
} else {
tmp = (x + (a * t)) + (y * z);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (b <= -4e+91) or not (b <= 9.5e+150): tmp = x + (a * (t + (z * b))) else: tmp = (x + (a * t)) + (y * z) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -4e+91) || !(b <= 9.5e+150)) tmp = Float64(x + Float64(a * Float64(t + Float64(z * b)))); else tmp = Float64(Float64(x + Float64(a * t)) + Float64(y * z)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((b <= -4e+91) || ~((b <= 9.5e+150))) tmp = x + (a * (t + (z * b))); else tmp = (x + (a * t)) + (y * z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -4e+91], N[Not[LessEqual[b, 9.5e+150]], $MachinePrecision]], N[(x + N[(a * N[(t + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + N[(a * t), $MachinePrecision]), $MachinePrecision] + N[(y * z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -4 \cdot 10^{+91} \lor \neg \left(b \leq 9.5 \cdot 10^{+150}\right):\\
\;\;\;\;x + a \cdot \left(t + z \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x + a \cdot t\right) + y \cdot z\\
\end{array}
\end{array}
if b < -4.00000000000000032e91 or 9.5000000000000001e150 < b Initial program 87.8%
associate-+l+87.8%
+-commutative87.8%
*-commutative87.8%
associate-*l*83.7%
distribute-lft-out88.1%
fma-def88.1%
+-commutative88.1%
fma-def88.1%
Simplified88.1%
Taylor expanded in y around 0 85.0%
if -4.00000000000000032e91 < b < 9.5000000000000001e150Initial program 95.2%
+-commutative95.2%
+-commutative95.2%
associate-+l+95.2%
associate-+r+95.2%
*-commutative95.2%
associate-*l*99.3%
*-commutative99.3%
distribute-lft-out99.3%
fma-def99.3%
fma-def99.3%
+-commutative99.3%
fma-def99.4%
Simplified99.4%
Taylor expanded in b around 0 89.6%
Final simplification87.9%
(FPCore (x y z t a b)
:precision binary64
(if (<= z -5.7e+135)
(* a (* z b))
(if (<= z 5.6e-38)
(+ x (* a t))
(if (<= z 1.95e+49) (* z (* a b)) (if (<= z 1.08e+88) (* a t) (* y z))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -5.7e+135) {
tmp = a * (z * b);
} else if (z <= 5.6e-38) {
tmp = x + (a * t);
} else if (z <= 1.95e+49) {
tmp = z * (a * b);
} else if (z <= 1.08e+88) {
tmp = a * t;
} else {
tmp = y * z;
}
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 (z <= (-5.7d+135)) then
tmp = a * (z * b)
else if (z <= 5.6d-38) then
tmp = x + (a * t)
else if (z <= 1.95d+49) then
tmp = z * (a * b)
else if (z <= 1.08d+88) then
tmp = a * t
else
tmp = y * z
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 (z <= -5.7e+135) {
tmp = a * (z * b);
} else if (z <= 5.6e-38) {
tmp = x + (a * t);
} else if (z <= 1.95e+49) {
tmp = z * (a * b);
} else if (z <= 1.08e+88) {
tmp = a * t;
} else {
tmp = y * z;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -5.7e+135: tmp = a * (z * b) elif z <= 5.6e-38: tmp = x + (a * t) elif z <= 1.95e+49: tmp = z * (a * b) elif z <= 1.08e+88: tmp = a * t else: tmp = y * z return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -5.7e+135) tmp = Float64(a * Float64(z * b)); elseif (z <= 5.6e-38) tmp = Float64(x + Float64(a * t)); elseif (z <= 1.95e+49) tmp = Float64(z * Float64(a * b)); elseif (z <= 1.08e+88) tmp = Float64(a * t); else tmp = Float64(y * z); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= -5.7e+135) tmp = a * (z * b); elseif (z <= 5.6e-38) tmp = x + (a * t); elseif (z <= 1.95e+49) tmp = z * (a * b); elseif (z <= 1.08e+88) tmp = a * t; else tmp = y * z; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -5.7e+135], N[(a * N[(z * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.6e-38], N[(x + N[(a * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.95e+49], N[(z * N[(a * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.08e+88], N[(a * t), $MachinePrecision], N[(y * z), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.7 \cdot 10^{+135}:\\
\;\;\;\;a \cdot \left(z \cdot b\right)\\
\mathbf{elif}\;z \leq 5.6 \cdot 10^{-38}:\\
\;\;\;\;x + a \cdot t\\
\mathbf{elif}\;z \leq 1.95 \cdot 10^{+49}:\\
\;\;\;\;z \cdot \left(a \cdot b\right)\\
\mathbf{elif}\;z \leq 1.08 \cdot 10^{+88}:\\
\;\;\;\;a \cdot t\\
\mathbf{else}:\\
\;\;\;\;y \cdot z\\
\end{array}
\end{array}
if z < -5.7000000000000002e135Initial program 83.7%
+-commutative83.7%
+-commutative83.7%
associate-+l+83.7%
associate-+r+83.7%
*-commutative83.7%
associate-*l*85.9%
*-commutative85.9%
distribute-lft-out95.2%
fma-def95.2%
fma-def95.2%
+-commutative95.2%
fma-def95.2%
Simplified95.2%
Taylor expanded in b around inf 57.2%
*-commutative57.2%
Simplified57.2%
if -5.7000000000000002e135 < z < 5.6e-38Initial program 98.5%
+-commutative98.5%
+-commutative98.5%
associate-+l+98.5%
associate-+r+98.5%
*-commutative98.5%
associate-*l*94.3%
*-commutative94.3%
distribute-lft-out94.3%
fma-def94.4%
fma-def94.4%
+-commutative94.4%
fma-def94.4%
Simplified94.4%
Taylor expanded in z around 0 68.6%
if 5.6e-38 < z < 1.95e49Initial program 99.8%
+-commutative99.8%
+-commutative99.8%
associate-+l+99.8%
associate-+r+99.8%
*-commutative99.8%
associate-*l*100.0%
*-commutative100.0%
distribute-lft-out100.0%
fma-def100.0%
fma-def100.0%
+-commutative100.0%
fma-def100.0%
Simplified100.0%
Taylor expanded in b around inf 72.3%
associate-*r*72.7%
*-commutative72.7%
Simplified72.7%
if 1.95e49 < z < 1.08000000000000003e88Initial program 79.8%
+-commutative79.8%
+-commutative79.8%
associate-+l+79.8%
associate-+r+79.8%
*-commutative79.8%
associate-*l*80.0%
*-commutative80.0%
distribute-lft-out80.0%
fma-def100.0%
fma-def100.0%
+-commutative100.0%
fma-def100.0%
Simplified100.0%
Taylor expanded in t around inf 70.7%
if 1.08000000000000003e88 < z Initial program 86.8%
+-commutative86.8%
+-commutative86.8%
associate-+l+86.8%
associate-+r+86.8%
*-commutative86.8%
associate-*l*94.9%
*-commutative94.9%
distribute-lft-out96.6%
fma-def96.6%
fma-def96.6%
+-commutative96.6%
fma-def96.6%
Simplified96.6%
Taylor expanded in y around inf 51.9%
*-commutative51.9%
Simplified51.9%
Final simplification63.0%
(FPCore (x y z t a b) :precision binary64 (if (<= t -2.2e+16) (* a t) (if (<= t 2.5e+101) x (* a t))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -2.2e+16) {
tmp = a * t;
} else if (t <= 2.5e+101) {
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 <= (-2.2d+16)) then
tmp = a * t
else if (t <= 2.5d+101) 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 <= -2.2e+16) {
tmp = a * t;
} else if (t <= 2.5e+101) {
tmp = x;
} else {
tmp = a * t;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -2.2e+16: tmp = a * t elif t <= 2.5e+101: tmp = x else: tmp = a * t return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -2.2e+16) tmp = Float64(a * t); elseif (t <= 2.5e+101) 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 <= -2.2e+16) tmp = a * t; elseif (t <= 2.5e+101) tmp = x; else tmp = a * t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -2.2e+16], N[(a * t), $MachinePrecision], If[LessEqual[t, 2.5e+101], x, N[(a * t), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.2 \cdot 10^{+16}:\\
\;\;\;\;a \cdot t\\
\mathbf{elif}\;t \leq 2.5 \cdot 10^{+101}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;a \cdot t\\
\end{array}
\end{array}
if t < -2.2e16 or 2.49999999999999994e101 < t Initial program 89.1%
+-commutative89.1%
+-commutative89.1%
associate-+l+89.1%
associate-+r+89.1%
*-commutative89.1%
associate-*l*89.0%
*-commutative89.0%
distribute-lft-out92.0%
fma-def94.0%
fma-def94.0%
+-commutative94.0%
fma-def94.0%
Simplified94.0%
Taylor expanded in t around inf 53.4%
if -2.2e16 < t < 2.49999999999999994e101Initial program 94.9%
+-commutative94.9%
+-commutative94.9%
associate-+l+94.9%
associate-+r+94.9%
*-commutative94.9%
associate-*l*95.0%
*-commutative95.0%
distribute-lft-out96.3%
fma-def96.3%
fma-def96.3%
+-commutative96.3%
fma-def96.3%
Simplified96.3%
Taylor expanded in x around inf 29.8%
Final simplification39.1%
(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.6%
+-commutative92.6%
+-commutative92.6%
associate-+l+92.6%
associate-+r+92.6%
*-commutative92.6%
associate-*l*92.7%
*-commutative92.7%
distribute-lft-out94.6%
fma-def95.4%
fma-def95.4%
+-commutative95.4%
fma-def95.4%
Simplified95.4%
Taylor expanded in x around inf 22.9%
Final simplification22.9%
(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 2023172
(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)))