
(FPCore (x y z t a b c) :precision binary64 (+ (- (+ (* x y) (/ (* z t) 16.0)) (/ (* a b) 4.0)) c))
double code(double x, double y, double z, double t, double a, double b, double c) {
return (((x * y) + ((z * t) / 16.0)) - ((a * b) / 4.0)) + c;
}
real(8) function code(x, y, z, t, a, b, c)
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), intent (in) :: c
code = (((x * y) + ((z * t) / 16.0d0)) - ((a * b) / 4.0d0)) + c
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
return (((x * y) + ((z * t) / 16.0)) - ((a * b) / 4.0)) + c;
}
def code(x, y, z, t, a, b, c): return (((x * y) + ((z * t) / 16.0)) - ((a * b) / 4.0)) + c
function code(x, y, z, t, a, b, c) return Float64(Float64(Float64(Float64(x * y) + Float64(Float64(z * t) / 16.0)) - Float64(Float64(a * b) / 4.0)) + c) end
function tmp = code(x, y, z, t, a, b, c) tmp = (((x * y) + ((z * t) / 16.0)) - ((a * b) / 4.0)) + c; end
code[x_, y_, z_, t_, a_, b_, c_] := N[(N[(N[(N[(x * y), $MachinePrecision] + N[(N[(z * t), $MachinePrecision] / 16.0), $MachinePrecision]), $MachinePrecision] - N[(N[(a * b), $MachinePrecision] / 4.0), $MachinePrecision]), $MachinePrecision] + c), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(x \cdot y + \frac{z \cdot t}{16}\right) - \frac{a \cdot b}{4}\right) + c
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 16 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b c) :precision binary64 (+ (- (+ (* x y) (/ (* z t) 16.0)) (/ (* a b) 4.0)) c))
double code(double x, double y, double z, double t, double a, double b, double c) {
return (((x * y) + ((z * t) / 16.0)) - ((a * b) / 4.0)) + c;
}
real(8) function code(x, y, z, t, a, b, c)
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), intent (in) :: c
code = (((x * y) + ((z * t) / 16.0d0)) - ((a * b) / 4.0d0)) + c
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
return (((x * y) + ((z * t) / 16.0)) - ((a * b) / 4.0)) + c;
}
def code(x, y, z, t, a, b, c): return (((x * y) + ((z * t) / 16.0)) - ((a * b) / 4.0)) + c
function code(x, y, z, t, a, b, c) return Float64(Float64(Float64(Float64(x * y) + Float64(Float64(z * t) / 16.0)) - Float64(Float64(a * b) / 4.0)) + c) end
function tmp = code(x, y, z, t, a, b, c) tmp = (((x * y) + ((z * t) / 16.0)) - ((a * b) / 4.0)) + c; end
code[x_, y_, z_, t_, a_, b_, c_] := N[(N[(N[(N[(x * y), $MachinePrecision] + N[(N[(z * t), $MachinePrecision] / 16.0), $MachinePrecision]), $MachinePrecision] - N[(N[(a * b), $MachinePrecision] / 4.0), $MachinePrecision]), $MachinePrecision] + c), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(x \cdot y + \frac{z \cdot t}{16}\right) - \frac{a \cdot b}{4}\right) + c
\end{array}
(FPCore (x y z t a b c) :precision binary64 (let* ((t_1 (- (+ (/ (* z t) 16.0) (* x y)) (/ (* b a) 4.0)))) (if (<= t_1 INFINITY) (+ c t_1) (fma x y (+ c (* 0.0625 (* z t)))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = (((z * t) / 16.0) + (x * y)) - ((b * a) / 4.0);
double tmp;
if (t_1 <= ((double) INFINITY)) {
tmp = c + t_1;
} else {
tmp = fma(x, y, (c + (0.0625 * (z * t))));
}
return tmp;
}
function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(Float64(Float64(z * t) / 16.0) + Float64(x * y)) - Float64(Float64(b * a) / 4.0)) tmp = 0.0 if (t_1 <= Inf) tmp = Float64(c + t_1); else tmp = fma(x, y, Float64(c + Float64(0.0625 * Float64(z * t)))); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(N[(N[(z * t), $MachinePrecision] / 16.0), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision] - N[(N[(b * a), $MachinePrecision] / 4.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, Infinity], N[(c + t$95$1), $MachinePrecision], N[(x * y + N[(c + N[(0.0625 * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(\frac{z \cdot t}{16} + x \cdot y\right) - \frac{b \cdot a}{4}\\
\mathbf{if}\;t_1 \leq \infty:\\
\;\;\;\;c + t_1\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(x, y, c + 0.0625 \cdot \left(z \cdot t\right)\right)\\
\end{array}
\end{array}
if (-.f64 (+.f64 (*.f64 x y) (/.f64 (*.f64 z t) 16)) (/.f64 (*.f64 a b) 4)) < +inf.0Initial program 100.0%
if +inf.0 < (-.f64 (+.f64 (*.f64 x y) (/.f64 (*.f64 z t) 16)) (/.f64 (*.f64 a b) 4)) Initial program 0.0%
associate-+l-0.0%
+-commutative0.0%
associate--l+0.0%
+-commutative0.0%
associate-+l-0.0%
fma-neg16.7%
neg-sub016.7%
associate--l-16.7%
associate-+l-16.7%
neg-sub016.7%
*-commutative16.7%
associate-*r/16.7%
distribute-rgt-neg-in16.7%
fma-def50.0%
distribute-frac-neg50.0%
neg-mul-150.0%
associate-/l*50.0%
associate-/r/50.0%
metadata-eval50.0%
Simplified50.0%
Taylor expanded in b around 0 66.7%
Final simplification99.2%
(FPCore (x y z t a b c) :precision binary64 (fma x y (fma b (* -0.25 a) (fma z (/ t 16.0) c))))
double code(double x, double y, double z, double t, double a, double b, double c) {
return fma(x, y, fma(b, (-0.25 * a), fma(z, (t / 16.0), c)));
}
function code(x, y, z, t, a, b, c) return fma(x, y, fma(b, Float64(-0.25 * a), fma(z, Float64(t / 16.0), c))) end
code[x_, y_, z_, t_, a_, b_, c_] := N[(x * y + N[(b * N[(-0.25 * a), $MachinePrecision] + N[(z * N[(t / 16.0), $MachinePrecision] + c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(x, y, \mathsf{fma}\left(b, -0.25 \cdot a, \mathsf{fma}\left(z, \frac{t}{16}, c\right)\right)\right)
\end{array}
Initial program 97.6%
associate-+l-97.6%
+-commutative97.6%
associate--l+97.6%
+-commutative97.6%
associate-+l-97.6%
fma-neg98.0%
neg-sub098.0%
associate--l-98.0%
associate-+l-98.0%
neg-sub098.0%
*-commutative98.0%
associate-*r/98.0%
distribute-rgt-neg-in98.0%
fma-def98.8%
distribute-frac-neg98.8%
neg-mul-198.8%
associate-/l*98.8%
associate-/r/98.8%
metadata-eval98.8%
Simplified98.8%
Final simplification98.8%
(FPCore (x y z t a b c) :precision binary64 (fma t (/ z 16.0) (fma x y (- c (* b (/ a 4.0))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
return fma(t, (z / 16.0), fma(x, y, (c - (b * (a / 4.0)))));
}
function code(x, y, z, t, a, b, c) return fma(t, Float64(z / 16.0), fma(x, y, Float64(c - Float64(b * Float64(a / 4.0))))) end
code[x_, y_, z_, t_, a_, b_, c_] := N[(t * N[(z / 16.0), $MachinePrecision] + N[(x * y + N[(c - N[(b * N[(a / 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(t, \frac{z}{16}, \mathsf{fma}\left(x, y, c - b \cdot \frac{a}{4}\right)\right)
\end{array}
Initial program 97.6%
associate-+l-97.6%
+-commutative97.6%
associate--l+97.6%
associate-*l/97.6%
*-commutative97.6%
fma-def98.4%
fma-neg98.8%
neg-sub098.8%
associate-+l-98.8%
neg-sub098.8%
+-commutative98.8%
unsub-neg98.8%
*-commutative98.8%
associate-*r/98.8%
Simplified98.8%
Final simplification98.8%
(FPCore (x y z t a b c) :precision binary64 (+ (fma x y (/ z (/ 16.0 t))) (- c (/ a (/ 4.0 b)))))
double code(double x, double y, double z, double t, double a, double b, double c) {
return fma(x, y, (z / (16.0 / t))) + (c - (a / (4.0 / b)));
}
function code(x, y, z, t, a, b, c) return Float64(fma(x, y, Float64(z / Float64(16.0 / t))) + Float64(c - Float64(a / Float64(4.0 / b)))) end
code[x_, y_, z_, t_, a_, b_, c_] := N[(N[(x * y + N[(z / N[(16.0 / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(c - N[(a / N[(4.0 / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(x, y, \frac{z}{\frac{16}{t}}\right) + \left(c - \frac{a}{\frac{4}{b}}\right)
\end{array}
Initial program 97.6%
associate-+l-97.6%
sub-neg97.6%
neg-mul-197.6%
metadata-eval97.6%
metadata-eval97.6%
cancel-sign-sub-inv97.6%
fma-def98.0%
associate-/l*98.0%
metadata-eval98.0%
*-lft-identity98.0%
associate-/l*97.9%
Simplified97.9%
Final simplification97.9%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* 0.0625 (* z t))) (t_2 (* -0.25 (* b a))))
(if (<= (* b a) -5.8e+148)
t_2
(if (<= (* b a) -1.25e-59)
t_1
(if (<= (* b a) -1.45e-152)
c
(if (<= (* b a) -4e-218)
(* x y)
(if (<= (* b a) -1.65e-226)
c
(if (<= (* b a) -6.8e-273)
t_1
(if (<= (* b a) -1.05e-278)
(* x y)
(if (<= (* b a) -5e-323)
c
(if (<= (* b a) 2.25e-94)
(* x y)
(if (<= (* b a) 1.62e+112) c t_2))))))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = 0.0625 * (z * t);
double t_2 = -0.25 * (b * a);
double tmp;
if ((b * a) <= -5.8e+148) {
tmp = t_2;
} else if ((b * a) <= -1.25e-59) {
tmp = t_1;
} else if ((b * a) <= -1.45e-152) {
tmp = c;
} else if ((b * a) <= -4e-218) {
tmp = x * y;
} else if ((b * a) <= -1.65e-226) {
tmp = c;
} else if ((b * a) <= -6.8e-273) {
tmp = t_1;
} else if ((b * a) <= -1.05e-278) {
tmp = x * y;
} else if ((b * a) <= -5e-323) {
tmp = c;
} else if ((b * a) <= 2.25e-94) {
tmp = x * y;
} else if ((b * a) <= 1.62e+112) {
tmp = c;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
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), intent (in) :: c
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = 0.0625d0 * (z * t)
t_2 = (-0.25d0) * (b * a)
if ((b * a) <= (-5.8d+148)) then
tmp = t_2
else if ((b * a) <= (-1.25d-59)) then
tmp = t_1
else if ((b * a) <= (-1.45d-152)) then
tmp = c
else if ((b * a) <= (-4d-218)) then
tmp = x * y
else if ((b * a) <= (-1.65d-226)) then
tmp = c
else if ((b * a) <= (-6.8d-273)) then
tmp = t_1
else if ((b * a) <= (-1.05d-278)) then
tmp = x * y
else if ((b * a) <= (-5d-323)) then
tmp = c
else if ((b * a) <= 2.25d-94) then
tmp = x * y
else if ((b * a) <= 1.62d+112) then
tmp = c
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 c) {
double t_1 = 0.0625 * (z * t);
double t_2 = -0.25 * (b * a);
double tmp;
if ((b * a) <= -5.8e+148) {
tmp = t_2;
} else if ((b * a) <= -1.25e-59) {
tmp = t_1;
} else if ((b * a) <= -1.45e-152) {
tmp = c;
} else if ((b * a) <= -4e-218) {
tmp = x * y;
} else if ((b * a) <= -1.65e-226) {
tmp = c;
} else if ((b * a) <= -6.8e-273) {
tmp = t_1;
} else if ((b * a) <= -1.05e-278) {
tmp = x * y;
} else if ((b * a) <= -5e-323) {
tmp = c;
} else if ((b * a) <= 2.25e-94) {
tmp = x * y;
} else if ((b * a) <= 1.62e+112) {
tmp = c;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = 0.0625 * (z * t) t_2 = -0.25 * (b * a) tmp = 0 if (b * a) <= -5.8e+148: tmp = t_2 elif (b * a) <= -1.25e-59: tmp = t_1 elif (b * a) <= -1.45e-152: tmp = c elif (b * a) <= -4e-218: tmp = x * y elif (b * a) <= -1.65e-226: tmp = c elif (b * a) <= -6.8e-273: tmp = t_1 elif (b * a) <= -1.05e-278: tmp = x * y elif (b * a) <= -5e-323: tmp = c elif (b * a) <= 2.25e-94: tmp = x * y elif (b * a) <= 1.62e+112: tmp = c else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(0.0625 * Float64(z * t)) t_2 = Float64(-0.25 * Float64(b * a)) tmp = 0.0 if (Float64(b * a) <= -5.8e+148) tmp = t_2; elseif (Float64(b * a) <= -1.25e-59) tmp = t_1; elseif (Float64(b * a) <= -1.45e-152) tmp = c; elseif (Float64(b * a) <= -4e-218) tmp = Float64(x * y); elseif (Float64(b * a) <= -1.65e-226) tmp = c; elseif (Float64(b * a) <= -6.8e-273) tmp = t_1; elseif (Float64(b * a) <= -1.05e-278) tmp = Float64(x * y); elseif (Float64(b * a) <= -5e-323) tmp = c; elseif (Float64(b * a) <= 2.25e-94) tmp = Float64(x * y); elseif (Float64(b * a) <= 1.62e+112) tmp = c; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = 0.0625 * (z * t); t_2 = -0.25 * (b * a); tmp = 0.0; if ((b * a) <= -5.8e+148) tmp = t_2; elseif ((b * a) <= -1.25e-59) tmp = t_1; elseif ((b * a) <= -1.45e-152) tmp = c; elseif ((b * a) <= -4e-218) tmp = x * y; elseif ((b * a) <= -1.65e-226) tmp = c; elseif ((b * a) <= -6.8e-273) tmp = t_1; elseif ((b * a) <= -1.05e-278) tmp = x * y; elseif ((b * a) <= -5e-323) tmp = c; elseif ((b * a) <= 2.25e-94) tmp = x * y; elseif ((b * a) <= 1.62e+112) tmp = c; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(0.0625 * N[(z * t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(-0.25 * N[(b * a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b * a), $MachinePrecision], -5.8e+148], t$95$2, If[LessEqual[N[(b * a), $MachinePrecision], -1.25e-59], t$95$1, If[LessEqual[N[(b * a), $MachinePrecision], -1.45e-152], c, If[LessEqual[N[(b * a), $MachinePrecision], -4e-218], N[(x * y), $MachinePrecision], If[LessEqual[N[(b * a), $MachinePrecision], -1.65e-226], c, If[LessEqual[N[(b * a), $MachinePrecision], -6.8e-273], t$95$1, If[LessEqual[N[(b * a), $MachinePrecision], -1.05e-278], N[(x * y), $MachinePrecision], If[LessEqual[N[(b * a), $MachinePrecision], -5e-323], c, If[LessEqual[N[(b * a), $MachinePrecision], 2.25e-94], N[(x * y), $MachinePrecision], If[LessEqual[N[(b * a), $MachinePrecision], 1.62e+112], c, t$95$2]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 0.0625 \cdot \left(z \cdot t\right)\\
t_2 := -0.25 \cdot \left(b \cdot a\right)\\
\mathbf{if}\;b \cdot a \leq -5.8 \cdot 10^{+148}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;b \cdot a \leq -1.25 \cdot 10^{-59}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \cdot a \leq -1.45 \cdot 10^{-152}:\\
\;\;\;\;c\\
\mathbf{elif}\;b \cdot a \leq -4 \cdot 10^{-218}:\\
\;\;\;\;x \cdot y\\
\mathbf{elif}\;b \cdot a \leq -1.65 \cdot 10^{-226}:\\
\;\;\;\;c\\
\mathbf{elif}\;b \cdot a \leq -6.8 \cdot 10^{-273}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \cdot a \leq -1.05 \cdot 10^{-278}:\\
\;\;\;\;x \cdot y\\
\mathbf{elif}\;b \cdot a \leq -5 \cdot 10^{-323}:\\
\;\;\;\;c\\
\mathbf{elif}\;b \cdot a \leq 2.25 \cdot 10^{-94}:\\
\;\;\;\;x \cdot y\\
\mathbf{elif}\;b \cdot a \leq 1.62 \cdot 10^{+112}:\\
\;\;\;\;c\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if (*.f64 a b) < -5.7999999999999999e148 or 1.61999999999999994e112 < (*.f64 a b) Initial program 93.3%
Taylor expanded in z around 0 88.9%
Taylor expanded in a around inf 75.0%
*-commutative75.0%
Simplified75.0%
if -5.7999999999999999e148 < (*.f64 a b) < -1.25e-59 or -1.65e-226 < (*.f64 a b) < -6.79999999999999982e-273Initial program 100.0%
Taylor expanded in z around inf 66.9%
Taylor expanded in t around inf 49.9%
if -1.25e-59 < (*.f64 a b) < -1.4500000000000001e-152 or -4.0000000000000001e-218 < (*.f64 a b) < -1.65e-226 or -1.05000000000000007e-278 < (*.f64 a b) < -4.94066e-323 or 2.2500000000000001e-94 < (*.f64 a b) < 1.61999999999999994e112Initial program 100.0%
Taylor expanded in c around inf 49.7%
if -1.4500000000000001e-152 < (*.f64 a b) < -4.0000000000000001e-218 or -6.79999999999999982e-273 < (*.f64 a b) < -1.05000000000000007e-278 or -4.94066e-323 < (*.f64 a b) < 2.2500000000000001e-94Initial program 100.0%
Taylor expanded in z around 0 75.4%
Taylor expanded in y around inf 52.9%
Final simplification59.3%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (+ c (* x y)))
(t_2 (+ c (* 0.0625 (* z t))))
(t_3 (- (* x y) (* (* b a) 0.25))))
(if (<= (* b a) -7e+148)
t_3
(if (<= (* b a) -1.72e-161)
t_2
(if (<= (* b a) -3.9e-218)
t_1
(if (<= (* b a) -2.5e-303)
t_2
(if (<= (* b a) 2.8e-94)
t_1
(if (<= (* b a) 1.48e-5)
t_2
(if (<= (* b a) 4e+109) t_1 t_3)))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = c + (x * y);
double t_2 = c + (0.0625 * (z * t));
double t_3 = (x * y) - ((b * a) * 0.25);
double tmp;
if ((b * a) <= -7e+148) {
tmp = t_3;
} else if ((b * a) <= -1.72e-161) {
tmp = t_2;
} else if ((b * a) <= -3.9e-218) {
tmp = t_1;
} else if ((b * a) <= -2.5e-303) {
tmp = t_2;
} else if ((b * a) <= 2.8e-94) {
tmp = t_1;
} else if ((b * a) <= 1.48e-5) {
tmp = t_2;
} else if ((b * a) <= 4e+109) {
tmp = t_1;
} else {
tmp = t_3;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
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), intent (in) :: c
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = c + (x * y)
t_2 = c + (0.0625d0 * (z * t))
t_3 = (x * y) - ((b * a) * 0.25d0)
if ((b * a) <= (-7d+148)) then
tmp = t_3
else if ((b * a) <= (-1.72d-161)) then
tmp = t_2
else if ((b * a) <= (-3.9d-218)) then
tmp = t_1
else if ((b * a) <= (-2.5d-303)) then
tmp = t_2
else if ((b * a) <= 2.8d-94) then
tmp = t_1
else if ((b * a) <= 1.48d-5) then
tmp = t_2
else if ((b * a) <= 4d+109) then
tmp = t_1
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 c) {
double t_1 = c + (x * y);
double t_2 = c + (0.0625 * (z * t));
double t_3 = (x * y) - ((b * a) * 0.25);
double tmp;
if ((b * a) <= -7e+148) {
tmp = t_3;
} else if ((b * a) <= -1.72e-161) {
tmp = t_2;
} else if ((b * a) <= -3.9e-218) {
tmp = t_1;
} else if ((b * a) <= -2.5e-303) {
tmp = t_2;
} else if ((b * a) <= 2.8e-94) {
tmp = t_1;
} else if ((b * a) <= 1.48e-5) {
tmp = t_2;
} else if ((b * a) <= 4e+109) {
tmp = t_1;
} else {
tmp = t_3;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = c + (x * y) t_2 = c + (0.0625 * (z * t)) t_3 = (x * y) - ((b * a) * 0.25) tmp = 0 if (b * a) <= -7e+148: tmp = t_3 elif (b * a) <= -1.72e-161: tmp = t_2 elif (b * a) <= -3.9e-218: tmp = t_1 elif (b * a) <= -2.5e-303: tmp = t_2 elif (b * a) <= 2.8e-94: tmp = t_1 elif (b * a) <= 1.48e-5: tmp = t_2 elif (b * a) <= 4e+109: tmp = t_1 else: tmp = t_3 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(c + Float64(x * y)) t_2 = Float64(c + Float64(0.0625 * Float64(z * t))) t_3 = Float64(Float64(x * y) - Float64(Float64(b * a) * 0.25)) tmp = 0.0 if (Float64(b * a) <= -7e+148) tmp = t_3; elseif (Float64(b * a) <= -1.72e-161) tmp = t_2; elseif (Float64(b * a) <= -3.9e-218) tmp = t_1; elseif (Float64(b * a) <= -2.5e-303) tmp = t_2; elseif (Float64(b * a) <= 2.8e-94) tmp = t_1; elseif (Float64(b * a) <= 1.48e-5) tmp = t_2; elseif (Float64(b * a) <= 4e+109) tmp = t_1; else tmp = t_3; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = c + (x * y); t_2 = c + (0.0625 * (z * t)); t_3 = (x * y) - ((b * a) * 0.25); tmp = 0.0; if ((b * a) <= -7e+148) tmp = t_3; elseif ((b * a) <= -1.72e-161) tmp = t_2; elseif ((b * a) <= -3.9e-218) tmp = t_1; elseif ((b * a) <= -2.5e-303) tmp = t_2; elseif ((b * a) <= 2.8e-94) tmp = t_1; elseif ((b * a) <= 1.48e-5) tmp = t_2; elseif ((b * a) <= 4e+109) tmp = t_1; else tmp = t_3; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(c + N[(x * y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(c + N[(0.0625 * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(x * y), $MachinePrecision] - N[(N[(b * a), $MachinePrecision] * 0.25), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b * a), $MachinePrecision], -7e+148], t$95$3, If[LessEqual[N[(b * a), $MachinePrecision], -1.72e-161], t$95$2, If[LessEqual[N[(b * a), $MachinePrecision], -3.9e-218], t$95$1, If[LessEqual[N[(b * a), $MachinePrecision], -2.5e-303], t$95$2, If[LessEqual[N[(b * a), $MachinePrecision], 2.8e-94], t$95$1, If[LessEqual[N[(b * a), $MachinePrecision], 1.48e-5], t$95$2, If[LessEqual[N[(b * a), $MachinePrecision], 4e+109], t$95$1, t$95$3]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := c + x \cdot y\\
t_2 := c + 0.0625 \cdot \left(z \cdot t\right)\\
t_3 := x \cdot y - \left(b \cdot a\right) \cdot 0.25\\
\mathbf{if}\;b \cdot a \leq -7 \cdot 10^{+148}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;b \cdot a \leq -1.72 \cdot 10^{-161}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;b \cdot a \leq -3.9 \cdot 10^{-218}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \cdot a \leq -2.5 \cdot 10^{-303}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;b \cdot a \leq 2.8 \cdot 10^{-94}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \cdot a \leq 1.48 \cdot 10^{-5}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;b \cdot a \leq 4 \cdot 10^{+109}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_3\\
\end{array}
\end{array}
if (*.f64 a b) < -6.9999999999999998e148 or 3.99999999999999993e109 < (*.f64 a b) Initial program 93.3%
Taylor expanded in z around 0 88.9%
Taylor expanded in c around 0 84.9%
if -6.9999999999999998e148 < (*.f64 a b) < -1.71999999999999999e-161 or -3.9e-218 < (*.f64 a b) < -2.4999999999999999e-303 or 2.7999999999999998e-94 < (*.f64 a b) < 1.4800000000000001e-5Initial program 100.0%
Taylor expanded in z around inf 77.8%
if -1.71999999999999999e-161 < (*.f64 a b) < -3.9e-218 or -2.4999999999999999e-303 < (*.f64 a b) < 2.7999999999999998e-94 or 1.4800000000000001e-5 < (*.f64 a b) < 3.99999999999999993e109Initial program 100.0%
Taylor expanded in x around inf 73.2%
Final simplification78.6%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* (* b a) 0.25))
(t_2 (+ c (* x y)))
(t_3 (* 0.0625 (* z t)))
(t_4 (+ c t_3)))
(if (<= (* b a) -2.8e+119)
(- t_3 t_1)
(if (<= (* b a) -9.2e-141)
t_4
(if (<= (* b a) -3.9e-218)
t_2
(if (<= (* b a) -7e-303)
t_4
(if (<= (* b a) 2.9e-94)
t_2
(if (<= (* b a) 3.3e-6)
t_4
(if (<= (* b a) 3.3e+112) t_2 (- (* x y) t_1))))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = (b * a) * 0.25;
double t_2 = c + (x * y);
double t_3 = 0.0625 * (z * t);
double t_4 = c + t_3;
double tmp;
if ((b * a) <= -2.8e+119) {
tmp = t_3 - t_1;
} else if ((b * a) <= -9.2e-141) {
tmp = t_4;
} else if ((b * a) <= -3.9e-218) {
tmp = t_2;
} else if ((b * a) <= -7e-303) {
tmp = t_4;
} else if ((b * a) <= 2.9e-94) {
tmp = t_2;
} else if ((b * a) <= 3.3e-6) {
tmp = t_4;
} else if ((b * a) <= 3.3e+112) {
tmp = t_2;
} else {
tmp = (x * y) - t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
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), intent (in) :: c
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: tmp
t_1 = (b * a) * 0.25d0
t_2 = c + (x * y)
t_3 = 0.0625d0 * (z * t)
t_4 = c + t_3
if ((b * a) <= (-2.8d+119)) then
tmp = t_3 - t_1
else if ((b * a) <= (-9.2d-141)) then
tmp = t_4
else if ((b * a) <= (-3.9d-218)) then
tmp = t_2
else if ((b * a) <= (-7d-303)) then
tmp = t_4
else if ((b * a) <= 2.9d-94) then
tmp = t_2
else if ((b * a) <= 3.3d-6) then
tmp = t_4
else if ((b * a) <= 3.3d+112) then
tmp = t_2
else
tmp = (x * y) - 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 c) {
double t_1 = (b * a) * 0.25;
double t_2 = c + (x * y);
double t_3 = 0.0625 * (z * t);
double t_4 = c + t_3;
double tmp;
if ((b * a) <= -2.8e+119) {
tmp = t_3 - t_1;
} else if ((b * a) <= -9.2e-141) {
tmp = t_4;
} else if ((b * a) <= -3.9e-218) {
tmp = t_2;
} else if ((b * a) <= -7e-303) {
tmp = t_4;
} else if ((b * a) <= 2.9e-94) {
tmp = t_2;
} else if ((b * a) <= 3.3e-6) {
tmp = t_4;
} else if ((b * a) <= 3.3e+112) {
tmp = t_2;
} else {
tmp = (x * y) - t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = (b * a) * 0.25 t_2 = c + (x * y) t_3 = 0.0625 * (z * t) t_4 = c + t_3 tmp = 0 if (b * a) <= -2.8e+119: tmp = t_3 - t_1 elif (b * a) <= -9.2e-141: tmp = t_4 elif (b * a) <= -3.9e-218: tmp = t_2 elif (b * a) <= -7e-303: tmp = t_4 elif (b * a) <= 2.9e-94: tmp = t_2 elif (b * a) <= 3.3e-6: tmp = t_4 elif (b * a) <= 3.3e+112: tmp = t_2 else: tmp = (x * y) - t_1 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(b * a) * 0.25) t_2 = Float64(c + Float64(x * y)) t_3 = Float64(0.0625 * Float64(z * t)) t_4 = Float64(c + t_3) tmp = 0.0 if (Float64(b * a) <= -2.8e+119) tmp = Float64(t_3 - t_1); elseif (Float64(b * a) <= -9.2e-141) tmp = t_4; elseif (Float64(b * a) <= -3.9e-218) tmp = t_2; elseif (Float64(b * a) <= -7e-303) tmp = t_4; elseif (Float64(b * a) <= 2.9e-94) tmp = t_2; elseif (Float64(b * a) <= 3.3e-6) tmp = t_4; elseif (Float64(b * a) <= 3.3e+112) tmp = t_2; else tmp = Float64(Float64(x * y) - t_1); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = (b * a) * 0.25; t_2 = c + (x * y); t_3 = 0.0625 * (z * t); t_4 = c + t_3; tmp = 0.0; if ((b * a) <= -2.8e+119) tmp = t_3 - t_1; elseif ((b * a) <= -9.2e-141) tmp = t_4; elseif ((b * a) <= -3.9e-218) tmp = t_2; elseif ((b * a) <= -7e-303) tmp = t_4; elseif ((b * a) <= 2.9e-94) tmp = t_2; elseif ((b * a) <= 3.3e-6) tmp = t_4; elseif ((b * a) <= 3.3e+112) tmp = t_2; else tmp = (x * y) - t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(b * a), $MachinePrecision] * 0.25), $MachinePrecision]}, Block[{t$95$2 = N[(c + N[(x * y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(0.0625 * N[(z * t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(c + t$95$3), $MachinePrecision]}, If[LessEqual[N[(b * a), $MachinePrecision], -2.8e+119], N[(t$95$3 - t$95$1), $MachinePrecision], If[LessEqual[N[(b * a), $MachinePrecision], -9.2e-141], t$95$4, If[LessEqual[N[(b * a), $MachinePrecision], -3.9e-218], t$95$2, If[LessEqual[N[(b * a), $MachinePrecision], -7e-303], t$95$4, If[LessEqual[N[(b * a), $MachinePrecision], 2.9e-94], t$95$2, If[LessEqual[N[(b * a), $MachinePrecision], 3.3e-6], t$95$4, If[LessEqual[N[(b * a), $MachinePrecision], 3.3e+112], t$95$2, N[(N[(x * y), $MachinePrecision] - t$95$1), $MachinePrecision]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(b \cdot a\right) \cdot 0.25\\
t_2 := c + x \cdot y\\
t_3 := 0.0625 \cdot \left(z \cdot t\right)\\
t_4 := c + t_3\\
\mathbf{if}\;b \cdot a \leq -2.8 \cdot 10^{+119}:\\
\;\;\;\;t_3 - t_1\\
\mathbf{elif}\;b \cdot a \leq -9.2 \cdot 10^{-141}:\\
\;\;\;\;t_4\\
\mathbf{elif}\;b \cdot a \leq -3.9 \cdot 10^{-218}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;b \cdot a \leq -7 \cdot 10^{-303}:\\
\;\;\;\;t_4\\
\mathbf{elif}\;b \cdot a \leq 2.9 \cdot 10^{-94}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;b \cdot a \leq 3.3 \cdot 10^{-6}:\\
\;\;\;\;t_4\\
\mathbf{elif}\;b \cdot a \leq 3.3 \cdot 10^{+112}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;x \cdot y - t_1\\
\end{array}
\end{array}
if (*.f64 a b) < -2.80000000000000013e119Initial program 90.4%
Taylor expanded in x around 0 83.7%
Taylor expanded in c around 0 79.6%
if -2.80000000000000013e119 < (*.f64 a b) < -9.1999999999999998e-141 or -3.9e-218 < (*.f64 a b) < -7e-303 or 2.89999999999999995e-94 < (*.f64 a b) < 3.30000000000000017e-6Initial program 100.0%
Taylor expanded in z around inf 78.9%
if -9.1999999999999998e-141 < (*.f64 a b) < -3.9e-218 or -7e-303 < (*.f64 a b) < 2.89999999999999995e-94 or 3.30000000000000017e-6 < (*.f64 a b) < 3.2999999999999999e112Initial program 100.0%
Taylor expanded in x around inf 73.2%
if 3.2999999999999999e112 < (*.f64 a b) Initial program 97.6%
Taylor expanded in z around 0 95.3%
Taylor expanded in c around 0 91.9%
Final simplification79.1%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (+ c (* 0.0625 (* z t))))
(t_2 (+ c (* x y)))
(t_3 (* -0.25 (* b a))))
(if (<= (* b a) -6.5e+148)
t_3
(if (<= (* b a) -2.15e-151)
t_1
(if (<= (* b a) -3.7e-218)
t_2
(if (<= (* b a) -7.5e-304)
t_1
(if (<= (* b a) 5.5e-94)
t_2
(if (<= (* b a) 1.9e-5)
t_1
(if (<= (* b a) 2.1e+192) t_2 t_3)))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = c + (0.0625 * (z * t));
double t_2 = c + (x * y);
double t_3 = -0.25 * (b * a);
double tmp;
if ((b * a) <= -6.5e+148) {
tmp = t_3;
} else if ((b * a) <= -2.15e-151) {
tmp = t_1;
} else if ((b * a) <= -3.7e-218) {
tmp = t_2;
} else if ((b * a) <= -7.5e-304) {
tmp = t_1;
} else if ((b * a) <= 5.5e-94) {
tmp = t_2;
} else if ((b * a) <= 1.9e-5) {
tmp = t_1;
} else if ((b * a) <= 2.1e+192) {
tmp = t_2;
} else {
tmp = t_3;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
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), intent (in) :: c
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = c + (0.0625d0 * (z * t))
t_2 = c + (x * y)
t_3 = (-0.25d0) * (b * a)
if ((b * a) <= (-6.5d+148)) then
tmp = t_3
else if ((b * a) <= (-2.15d-151)) then
tmp = t_1
else if ((b * a) <= (-3.7d-218)) then
tmp = t_2
else if ((b * a) <= (-7.5d-304)) then
tmp = t_1
else if ((b * a) <= 5.5d-94) then
tmp = t_2
else if ((b * a) <= 1.9d-5) then
tmp = t_1
else if ((b * a) <= 2.1d+192) 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 c) {
double t_1 = c + (0.0625 * (z * t));
double t_2 = c + (x * y);
double t_3 = -0.25 * (b * a);
double tmp;
if ((b * a) <= -6.5e+148) {
tmp = t_3;
} else if ((b * a) <= -2.15e-151) {
tmp = t_1;
} else if ((b * a) <= -3.7e-218) {
tmp = t_2;
} else if ((b * a) <= -7.5e-304) {
tmp = t_1;
} else if ((b * a) <= 5.5e-94) {
tmp = t_2;
} else if ((b * a) <= 1.9e-5) {
tmp = t_1;
} else if ((b * a) <= 2.1e+192) {
tmp = t_2;
} else {
tmp = t_3;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = c + (0.0625 * (z * t)) t_2 = c + (x * y) t_3 = -0.25 * (b * a) tmp = 0 if (b * a) <= -6.5e+148: tmp = t_3 elif (b * a) <= -2.15e-151: tmp = t_1 elif (b * a) <= -3.7e-218: tmp = t_2 elif (b * a) <= -7.5e-304: tmp = t_1 elif (b * a) <= 5.5e-94: tmp = t_2 elif (b * a) <= 1.9e-5: tmp = t_1 elif (b * a) <= 2.1e+192: tmp = t_2 else: tmp = t_3 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(c + Float64(0.0625 * Float64(z * t))) t_2 = Float64(c + Float64(x * y)) t_3 = Float64(-0.25 * Float64(b * a)) tmp = 0.0 if (Float64(b * a) <= -6.5e+148) tmp = t_3; elseif (Float64(b * a) <= -2.15e-151) tmp = t_1; elseif (Float64(b * a) <= -3.7e-218) tmp = t_2; elseif (Float64(b * a) <= -7.5e-304) tmp = t_1; elseif (Float64(b * a) <= 5.5e-94) tmp = t_2; elseif (Float64(b * a) <= 1.9e-5) tmp = t_1; elseif (Float64(b * a) <= 2.1e+192) tmp = t_2; else tmp = t_3; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = c + (0.0625 * (z * t)); t_2 = c + (x * y); t_3 = -0.25 * (b * a); tmp = 0.0; if ((b * a) <= -6.5e+148) tmp = t_3; elseif ((b * a) <= -2.15e-151) tmp = t_1; elseif ((b * a) <= -3.7e-218) tmp = t_2; elseif ((b * a) <= -7.5e-304) tmp = t_1; elseif ((b * a) <= 5.5e-94) tmp = t_2; elseif ((b * a) <= 1.9e-5) tmp = t_1; elseif ((b * a) <= 2.1e+192) tmp = t_2; else tmp = t_3; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(c + N[(0.0625 * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(c + N[(x * y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(-0.25 * N[(b * a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b * a), $MachinePrecision], -6.5e+148], t$95$3, If[LessEqual[N[(b * a), $MachinePrecision], -2.15e-151], t$95$1, If[LessEqual[N[(b * a), $MachinePrecision], -3.7e-218], t$95$2, If[LessEqual[N[(b * a), $MachinePrecision], -7.5e-304], t$95$1, If[LessEqual[N[(b * a), $MachinePrecision], 5.5e-94], t$95$2, If[LessEqual[N[(b * a), $MachinePrecision], 1.9e-5], t$95$1, If[LessEqual[N[(b * a), $MachinePrecision], 2.1e+192], t$95$2, t$95$3]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := c + 0.0625 \cdot \left(z \cdot t\right)\\
t_2 := c + x \cdot y\\
t_3 := -0.25 \cdot \left(b \cdot a\right)\\
\mathbf{if}\;b \cdot a \leq -6.5 \cdot 10^{+148}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;b \cdot a \leq -2.15 \cdot 10^{-151}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \cdot a \leq -3.7 \cdot 10^{-218}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;b \cdot a \leq -7.5 \cdot 10^{-304}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \cdot a \leq 5.5 \cdot 10^{-94}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;b \cdot a \leq 1.9 \cdot 10^{-5}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \cdot a \leq 2.1 \cdot 10^{+192}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_3\\
\end{array}
\end{array}
if (*.f64 a b) < -6.49999999999999947e148 or 2.09999999999999995e192 < (*.f64 a b) Initial program 92.6%
Taylor expanded in z around 0 88.9%
Taylor expanded in a around inf 78.6%
*-commutative78.6%
Simplified78.6%
if -6.49999999999999947e148 < (*.f64 a b) < -2.15000000000000009e-151 or -3.7000000000000002e-218 < (*.f64 a b) < -7.50000000000000069e-304 or 5.49999999999999989e-94 < (*.f64 a b) < 1.9000000000000001e-5Initial program 100.0%
Taylor expanded in z around inf 77.8%
if -2.15000000000000009e-151 < (*.f64 a b) < -3.7000000000000002e-218 or -7.50000000000000069e-304 < (*.f64 a b) < 5.49999999999999989e-94 or 1.9000000000000001e-5 < (*.f64 a b) < 2.09999999999999995e192Initial program 100.0%
Taylor expanded in x around inf 71.4%
Final simplification75.5%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (+ c (* 0.0625 (* z t))))
(t_2 (+ c (* x y)))
(t_3 (* -0.25 (* b a))))
(if (<= (* b a) -6.5e+148)
(+ c t_3)
(if (<= (* b a) -6e-165)
t_1
(if (<= (* b a) -3.7e-218)
t_2
(if (<= (* b a) -4.4e-304)
t_1
(if (<= (* b a) 2.6e-94)
t_2
(if (<= (* b a) 3e-6)
t_1
(if (<= (* b a) 1.05e+193) t_2 t_3)))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = c + (0.0625 * (z * t));
double t_2 = c + (x * y);
double t_3 = -0.25 * (b * a);
double tmp;
if ((b * a) <= -6.5e+148) {
tmp = c + t_3;
} else if ((b * a) <= -6e-165) {
tmp = t_1;
} else if ((b * a) <= -3.7e-218) {
tmp = t_2;
} else if ((b * a) <= -4.4e-304) {
tmp = t_1;
} else if ((b * a) <= 2.6e-94) {
tmp = t_2;
} else if ((b * a) <= 3e-6) {
tmp = t_1;
} else if ((b * a) <= 1.05e+193) {
tmp = t_2;
} else {
tmp = t_3;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
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), intent (in) :: c
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = c + (0.0625d0 * (z * t))
t_2 = c + (x * y)
t_3 = (-0.25d0) * (b * a)
if ((b * a) <= (-6.5d+148)) then
tmp = c + t_3
else if ((b * a) <= (-6d-165)) then
tmp = t_1
else if ((b * a) <= (-3.7d-218)) then
tmp = t_2
else if ((b * a) <= (-4.4d-304)) then
tmp = t_1
else if ((b * a) <= 2.6d-94) then
tmp = t_2
else if ((b * a) <= 3d-6) then
tmp = t_1
else if ((b * a) <= 1.05d+193) 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 c) {
double t_1 = c + (0.0625 * (z * t));
double t_2 = c + (x * y);
double t_3 = -0.25 * (b * a);
double tmp;
if ((b * a) <= -6.5e+148) {
tmp = c + t_3;
} else if ((b * a) <= -6e-165) {
tmp = t_1;
} else if ((b * a) <= -3.7e-218) {
tmp = t_2;
} else if ((b * a) <= -4.4e-304) {
tmp = t_1;
} else if ((b * a) <= 2.6e-94) {
tmp = t_2;
} else if ((b * a) <= 3e-6) {
tmp = t_1;
} else if ((b * a) <= 1.05e+193) {
tmp = t_2;
} else {
tmp = t_3;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = c + (0.0625 * (z * t)) t_2 = c + (x * y) t_3 = -0.25 * (b * a) tmp = 0 if (b * a) <= -6.5e+148: tmp = c + t_3 elif (b * a) <= -6e-165: tmp = t_1 elif (b * a) <= -3.7e-218: tmp = t_2 elif (b * a) <= -4.4e-304: tmp = t_1 elif (b * a) <= 2.6e-94: tmp = t_2 elif (b * a) <= 3e-6: tmp = t_1 elif (b * a) <= 1.05e+193: tmp = t_2 else: tmp = t_3 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(c + Float64(0.0625 * Float64(z * t))) t_2 = Float64(c + Float64(x * y)) t_3 = Float64(-0.25 * Float64(b * a)) tmp = 0.0 if (Float64(b * a) <= -6.5e+148) tmp = Float64(c + t_3); elseif (Float64(b * a) <= -6e-165) tmp = t_1; elseif (Float64(b * a) <= -3.7e-218) tmp = t_2; elseif (Float64(b * a) <= -4.4e-304) tmp = t_1; elseif (Float64(b * a) <= 2.6e-94) tmp = t_2; elseif (Float64(b * a) <= 3e-6) tmp = t_1; elseif (Float64(b * a) <= 1.05e+193) tmp = t_2; else tmp = t_3; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = c + (0.0625 * (z * t)); t_2 = c + (x * y); t_3 = -0.25 * (b * a); tmp = 0.0; if ((b * a) <= -6.5e+148) tmp = c + t_3; elseif ((b * a) <= -6e-165) tmp = t_1; elseif ((b * a) <= -3.7e-218) tmp = t_2; elseif ((b * a) <= -4.4e-304) tmp = t_1; elseif ((b * a) <= 2.6e-94) tmp = t_2; elseif ((b * a) <= 3e-6) tmp = t_1; elseif ((b * a) <= 1.05e+193) tmp = t_2; else tmp = t_3; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(c + N[(0.0625 * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(c + N[(x * y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(-0.25 * N[(b * a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b * a), $MachinePrecision], -6.5e+148], N[(c + t$95$3), $MachinePrecision], If[LessEqual[N[(b * a), $MachinePrecision], -6e-165], t$95$1, If[LessEqual[N[(b * a), $MachinePrecision], -3.7e-218], t$95$2, If[LessEqual[N[(b * a), $MachinePrecision], -4.4e-304], t$95$1, If[LessEqual[N[(b * a), $MachinePrecision], 2.6e-94], t$95$2, If[LessEqual[N[(b * a), $MachinePrecision], 3e-6], t$95$1, If[LessEqual[N[(b * a), $MachinePrecision], 1.05e+193], t$95$2, t$95$3]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := c + 0.0625 \cdot \left(z \cdot t\right)\\
t_2 := c + x \cdot y\\
t_3 := -0.25 \cdot \left(b \cdot a\right)\\
\mathbf{if}\;b \cdot a \leq -6.5 \cdot 10^{+148}:\\
\;\;\;\;c + t_3\\
\mathbf{elif}\;b \cdot a \leq -6 \cdot 10^{-165}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \cdot a \leq -3.7 \cdot 10^{-218}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;b \cdot a \leq -4.4 \cdot 10^{-304}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \cdot a \leq 2.6 \cdot 10^{-94}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;b \cdot a \leq 3 \cdot 10^{-6}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \cdot a \leq 1.05 \cdot 10^{+193}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_3\\
\end{array}
\end{array}
if (*.f64 a b) < -6.49999999999999947e148Initial program 89.4%
Taylor expanded in a around inf 75.7%
*-commutative75.7%
Simplified75.7%
if -6.49999999999999947e148 < (*.f64 a b) < -5.99999999999999958e-165 or -3.7000000000000002e-218 < (*.f64 a b) < -4.4e-304 or 2.59999999999999994e-94 < (*.f64 a b) < 3.0000000000000001e-6Initial program 100.0%
Taylor expanded in z around inf 77.8%
if -5.99999999999999958e-165 < (*.f64 a b) < -3.7000000000000002e-218 or -4.4e-304 < (*.f64 a b) < 2.59999999999999994e-94 or 3.0000000000000001e-6 < (*.f64 a b) < 1.05e193Initial program 100.0%
Taylor expanded in x around inf 71.4%
if 1.05e193 < (*.f64 a b) Initial program 97.1%
Taylor expanded in z around 0 97.0%
Taylor expanded in a around inf 88.8%
*-commutative88.8%
Simplified88.8%
Final simplification76.4%
(FPCore (x y z t a b c)
:precision binary64
(if (or (<= t -1.05e-36)
(not (or (<= t 1.45e+57) (and (not (<= t 7.5e+97)) (<= t 5.1e+241)))))
(+ c (* 0.0625 (* z t)))
(- (+ c (* x y)) (* (* b a) 0.25))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((t <= -1.05e-36) || !((t <= 1.45e+57) || (!(t <= 7.5e+97) && (t <= 5.1e+241)))) {
tmp = c + (0.0625 * (z * t));
} else {
tmp = (c + (x * y)) - ((b * a) * 0.25);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
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), intent (in) :: c
real(8) :: tmp
if ((t <= (-1.05d-36)) .or. (.not. (t <= 1.45d+57) .or. (.not. (t <= 7.5d+97)) .and. (t <= 5.1d+241))) then
tmp = c + (0.0625d0 * (z * t))
else
tmp = (c + (x * y)) - ((b * a) * 0.25d0)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((t <= -1.05e-36) || !((t <= 1.45e+57) || (!(t <= 7.5e+97) && (t <= 5.1e+241)))) {
tmp = c + (0.0625 * (z * t));
} else {
tmp = (c + (x * y)) - ((b * a) * 0.25);
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if (t <= -1.05e-36) or not ((t <= 1.45e+57) or (not (t <= 7.5e+97) and (t <= 5.1e+241))): tmp = c + (0.0625 * (z * t)) else: tmp = (c + (x * y)) - ((b * a) * 0.25) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if ((t <= -1.05e-36) || !((t <= 1.45e+57) || (!(t <= 7.5e+97) && (t <= 5.1e+241)))) tmp = Float64(c + Float64(0.0625 * Float64(z * t))); else tmp = Float64(Float64(c + Float64(x * y)) - Float64(Float64(b * a) * 0.25)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if ((t <= -1.05e-36) || ~(((t <= 1.45e+57) || (~((t <= 7.5e+97)) && (t <= 5.1e+241))))) tmp = c + (0.0625 * (z * t)); else tmp = (c + (x * y)) - ((b * a) * 0.25); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[t, -1.05e-36], N[Not[Or[LessEqual[t, 1.45e+57], And[N[Not[LessEqual[t, 7.5e+97]], $MachinePrecision], LessEqual[t, 5.1e+241]]]], $MachinePrecision]], N[(c + N[(0.0625 * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(c + N[(x * y), $MachinePrecision]), $MachinePrecision] - N[(N[(b * a), $MachinePrecision] * 0.25), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.05 \cdot 10^{-36} \lor \neg \left(t \leq 1.45 \cdot 10^{+57} \lor \neg \left(t \leq 7.5 \cdot 10^{+97}\right) \land t \leq 5.1 \cdot 10^{+241}\right):\\
\;\;\;\;c + 0.0625 \cdot \left(z \cdot t\right)\\
\mathbf{else}:\\
\;\;\;\;\left(c + x \cdot y\right) - \left(b \cdot a\right) \cdot 0.25\\
\end{array}
\end{array}
if t < -1.04999999999999995e-36 or 1.4500000000000001e57 < t < 7.5000000000000004e97 or 5.1000000000000002e241 < t Initial program 97.8%
Taylor expanded in z around inf 69.0%
if -1.04999999999999995e-36 < t < 1.4500000000000001e57 or 7.5000000000000004e97 < t < 5.1000000000000002e241Initial program 97.6%
Taylor expanded in z around 0 89.5%
Final simplification82.3%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* (* b a) 0.25)))
(if (or (<= z -9.5e+37) (not (<= z 7.5)))
(- (+ c (* 0.0625 (* z t))) t_1)
(- (+ c (* x y)) t_1))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = (b * a) * 0.25;
double tmp;
if ((z <= -9.5e+37) || !(z <= 7.5)) {
tmp = (c + (0.0625 * (z * t))) - t_1;
} else {
tmp = (c + (x * y)) - t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
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), intent (in) :: c
real(8) :: t_1
real(8) :: tmp
t_1 = (b * a) * 0.25d0
if ((z <= (-9.5d+37)) .or. (.not. (z <= 7.5d0))) then
tmp = (c + (0.0625d0 * (z * t))) - t_1
else
tmp = (c + (x * y)) - 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 c) {
double t_1 = (b * a) * 0.25;
double tmp;
if ((z <= -9.5e+37) || !(z <= 7.5)) {
tmp = (c + (0.0625 * (z * t))) - t_1;
} else {
tmp = (c + (x * y)) - t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = (b * a) * 0.25 tmp = 0 if (z <= -9.5e+37) or not (z <= 7.5): tmp = (c + (0.0625 * (z * t))) - t_1 else: tmp = (c + (x * y)) - t_1 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(b * a) * 0.25) tmp = 0.0 if ((z <= -9.5e+37) || !(z <= 7.5)) tmp = Float64(Float64(c + Float64(0.0625 * Float64(z * t))) - t_1); else tmp = Float64(Float64(c + Float64(x * y)) - t_1); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = (b * a) * 0.25; tmp = 0.0; if ((z <= -9.5e+37) || ~((z <= 7.5))) tmp = (c + (0.0625 * (z * t))) - t_1; else tmp = (c + (x * y)) - t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(b * a), $MachinePrecision] * 0.25), $MachinePrecision]}, If[Or[LessEqual[z, -9.5e+37], N[Not[LessEqual[z, 7.5]], $MachinePrecision]], N[(N[(c + N[(0.0625 * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], N[(N[(c + N[(x * y), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(b \cdot a\right) \cdot 0.25\\
\mathbf{if}\;z \leq -9.5 \cdot 10^{+37} \lor \neg \left(z \leq 7.5\right):\\
\;\;\;\;\left(c + 0.0625 \cdot \left(z \cdot t\right)\right) - t_1\\
\mathbf{else}:\\
\;\;\;\;\left(c + x \cdot y\right) - t_1\\
\end{array}
\end{array}
if z < -9.4999999999999995e37 or 7.5 < z Initial program 94.7%
Taylor expanded in x around 0 79.4%
if -9.4999999999999995e37 < z < 7.5Initial program 100.0%
Taylor expanded in z around 0 88.5%
Final simplification84.5%
(FPCore (x y z t a b c) :precision binary64 (+ c (- (+ (/ (* z t) 16.0) (* x y)) (/ (* b a) 4.0))))
double code(double x, double y, double z, double t, double a, double b, double c) {
return c + ((((z * t) / 16.0) + (x * y)) - ((b * a) / 4.0));
}
real(8) function code(x, y, z, t, a, b, c)
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), intent (in) :: c
code = c + ((((z * t) / 16.0d0) + (x * y)) - ((b * a) / 4.0d0))
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
return c + ((((z * t) / 16.0) + (x * y)) - ((b * a) / 4.0));
}
def code(x, y, z, t, a, b, c): return c + ((((z * t) / 16.0) + (x * y)) - ((b * a) / 4.0))
function code(x, y, z, t, a, b, c) return Float64(c + Float64(Float64(Float64(Float64(z * t) / 16.0) + Float64(x * y)) - Float64(Float64(b * a) / 4.0))) end
function tmp = code(x, y, z, t, a, b, c) tmp = c + ((((z * t) / 16.0) + (x * y)) - ((b * a) / 4.0)); end
code[x_, y_, z_, t_, a_, b_, c_] := N[(c + N[(N[(N[(N[(z * t), $MachinePrecision] / 16.0), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision] - N[(N[(b * a), $MachinePrecision] / 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
c + \left(\left(\frac{z \cdot t}{16} + x \cdot y\right) - \frac{b \cdot a}{4}\right)
\end{array}
Initial program 97.6%
Final simplification97.6%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* 0.0625 (* z t))))
(if (<= z -5.5e+38)
t_1
(if (<= z -4.4e-85)
(* x y)
(if (<= z -1.44e-257) c (if (<= z 95.0) (* x y) t_1))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = 0.0625 * (z * t);
double tmp;
if (z <= -5.5e+38) {
tmp = t_1;
} else if (z <= -4.4e-85) {
tmp = x * y;
} else if (z <= -1.44e-257) {
tmp = c;
} else if (z <= 95.0) {
tmp = x * y;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
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), intent (in) :: c
real(8) :: t_1
real(8) :: tmp
t_1 = 0.0625d0 * (z * t)
if (z <= (-5.5d+38)) then
tmp = t_1
else if (z <= (-4.4d-85)) then
tmp = x * y
else if (z <= (-1.44d-257)) then
tmp = c
else if (z <= 95.0d0) then
tmp = x * y
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 c) {
double t_1 = 0.0625 * (z * t);
double tmp;
if (z <= -5.5e+38) {
tmp = t_1;
} else if (z <= -4.4e-85) {
tmp = x * y;
} else if (z <= -1.44e-257) {
tmp = c;
} else if (z <= 95.0) {
tmp = x * y;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = 0.0625 * (z * t) tmp = 0 if z <= -5.5e+38: tmp = t_1 elif z <= -4.4e-85: tmp = x * y elif z <= -1.44e-257: tmp = c elif z <= 95.0: tmp = x * y else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(0.0625 * Float64(z * t)) tmp = 0.0 if (z <= -5.5e+38) tmp = t_1; elseif (z <= -4.4e-85) tmp = Float64(x * y); elseif (z <= -1.44e-257) tmp = c; elseif (z <= 95.0) tmp = Float64(x * y); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = 0.0625 * (z * t); tmp = 0.0; if (z <= -5.5e+38) tmp = t_1; elseif (z <= -4.4e-85) tmp = x * y; elseif (z <= -1.44e-257) tmp = c; elseif (z <= 95.0) tmp = x * y; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(0.0625 * N[(z * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -5.5e+38], t$95$1, If[LessEqual[z, -4.4e-85], N[(x * y), $MachinePrecision], If[LessEqual[z, -1.44e-257], c, If[LessEqual[z, 95.0], N[(x * y), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 0.0625 \cdot \left(z \cdot t\right)\\
\mathbf{if}\;z \leq -5.5 \cdot 10^{+38}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -4.4 \cdot 10^{-85}:\\
\;\;\;\;x \cdot y\\
\mathbf{elif}\;z \leq -1.44 \cdot 10^{-257}:\\
\;\;\;\;c\\
\mathbf{elif}\;z \leq 95:\\
\;\;\;\;x \cdot y\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -5.5000000000000003e38 or 95 < z Initial program 94.6%
Taylor expanded in z around inf 58.6%
Taylor expanded in t around inf 42.0%
if -5.5000000000000003e38 < z < -4.4e-85 or -1.43999999999999992e-257 < z < 95Initial program 100.0%
Taylor expanded in z around 0 89.4%
Taylor expanded in y around inf 32.7%
if -4.4e-85 < z < -1.43999999999999992e-257Initial program 100.0%
Taylor expanded in c around inf 39.8%
Final simplification37.8%
(FPCore (x y z t a b c) :precision binary64 (if (or (<= (* b a) -1.55e+119) (not (<= (* b a) 7e+189))) (* -0.25 (* b a)) (+ c (* x y))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (((b * a) <= -1.55e+119) || !((b * a) <= 7e+189)) {
tmp = -0.25 * (b * a);
} else {
tmp = c + (x * y);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
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), intent (in) :: c
real(8) :: tmp
if (((b * a) <= (-1.55d+119)) .or. (.not. ((b * a) <= 7d+189))) then
tmp = (-0.25d0) * (b * a)
else
tmp = c + (x * y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (((b * a) <= -1.55e+119) || !((b * a) <= 7e+189)) {
tmp = -0.25 * (b * a);
} else {
tmp = c + (x * y);
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if ((b * a) <= -1.55e+119) or not ((b * a) <= 7e+189): tmp = -0.25 * (b * a) else: tmp = c + (x * y) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if ((Float64(b * a) <= -1.55e+119) || !(Float64(b * a) <= 7e+189)) tmp = Float64(-0.25 * Float64(b * a)); else tmp = Float64(c + Float64(x * y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (((b * a) <= -1.55e+119) || ~(((b * a) <= 7e+189))) tmp = -0.25 * (b * a); else tmp = c + (x * y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[N[(b * a), $MachinePrecision], -1.55e+119], N[Not[LessEqual[N[(b * a), $MachinePrecision], 7e+189]], $MachinePrecision]], N[(-0.25 * N[(b * a), $MachinePrecision]), $MachinePrecision], N[(c + N[(x * y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \cdot a \leq -1.55 \cdot 10^{+119} \lor \neg \left(b \cdot a \leq 7 \cdot 10^{+189}\right):\\
\;\;\;\;-0.25 \cdot \left(b \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;c + x \cdot y\\
\end{array}
\end{array}
if (*.f64 a b) < -1.54999999999999998e119 or 6.99999999999999991e189 < (*.f64 a b) Initial program 93.0%
Taylor expanded in z around 0 86.2%
Taylor expanded in a around inf 76.4%
*-commutative76.4%
Simplified76.4%
if -1.54999999999999998e119 < (*.f64 a b) < 6.99999999999999991e189Initial program 100.0%
Taylor expanded in x around inf 64.9%
Final simplification68.8%
(FPCore (x y z t a b c) :precision binary64 (if (<= c -8.2e+109) c (if (<= c 2.4e+25) (* x y) c)))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (c <= -8.2e+109) {
tmp = c;
} else if (c <= 2.4e+25) {
tmp = x * y;
} else {
tmp = c;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
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), intent (in) :: c
real(8) :: tmp
if (c <= (-8.2d+109)) then
tmp = c
else if (c <= 2.4d+25) then
tmp = x * y
else
tmp = c
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (c <= -8.2e+109) {
tmp = c;
} else if (c <= 2.4e+25) {
tmp = x * y;
} else {
tmp = c;
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if c <= -8.2e+109: tmp = c elif c <= 2.4e+25: tmp = x * y else: tmp = c return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (c <= -8.2e+109) tmp = c; elseif (c <= 2.4e+25) tmp = Float64(x * y); else tmp = c; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (c <= -8.2e+109) tmp = c; elseif (c <= 2.4e+25) tmp = x * y; else tmp = c; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[c, -8.2e+109], c, If[LessEqual[c, 2.4e+25], N[(x * y), $MachinePrecision], c]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;c \leq -8.2 \cdot 10^{+109}:\\
\;\;\;\;c\\
\mathbf{elif}\;c \leq 2.4 \cdot 10^{+25}:\\
\;\;\;\;x \cdot y\\
\mathbf{else}:\\
\;\;\;\;c\\
\end{array}
\end{array}
if c < -8.19999999999999939e109 or 2.39999999999999996e25 < c Initial program 99.1%
Taylor expanded in c around inf 44.4%
if -8.19999999999999939e109 < c < 2.39999999999999996e25Initial program 96.4%
Taylor expanded in z around 0 70.8%
Taylor expanded in y around inf 34.8%
Final simplification39.1%
(FPCore (x y z t a b c) :precision binary64 c)
double code(double x, double y, double z, double t, double a, double b, double c) {
return c;
}
real(8) function code(x, y, z, t, a, b, c)
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), intent (in) :: c
code = c
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
return c;
}
def code(x, y, z, t, a, b, c): return c
function code(x, y, z, t, a, b, c) return c end
function tmp = code(x, y, z, t, a, b, c) tmp = c; end
code[x_, y_, z_, t_, a_, b_, c_] := c
\begin{array}{l}
\\
c
\end{array}
Initial program 97.6%
Taylor expanded in c around inf 24.1%
Final simplification24.1%
herbie shell --seed 2023230
(FPCore (x y z t a b c)
:name "Diagrams.Solve.Polynomial:quartForm from diagrams-solve-0.1, C"
:precision binary64
(+ (- (+ (* x y) (/ (* z t) 16.0)) (/ (* a b) 4.0)) c))