
(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 (+ (fma x y (fma 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 fma(x, y, fma(z, (t / 16.0), ((a * b) / -4.0))) + c;
}
function code(x, y, z, t, a, b, c) return Float64(fma(x, y, fma(z, Float64(t / 16.0), Float64(Float64(a * b) / -4.0))) + c) end
code[x_, y_, z_, t_, a_, b_, c_] := N[(N[(x * y + N[(z * N[(t / 16.0), $MachinePrecision] + N[(N[(a * b), $MachinePrecision] / -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + c), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(x, y, \mathsf{fma}\left(z, \frac{t}{16}, \frac{a \cdot b}{-4}\right)\right) + c
\end{array}
Initial program 98.1%
associate--l+98.1%
fma-define98.9%
associate-/l*98.9%
fma-neg98.9%
distribute-neg-frac298.9%
metadata-eval98.9%
Simplified98.9%
Final simplification98.9%
(FPCore (x y z t a b c) :precision binary64 (+ c (- (fma x y (* z (/ t 16.0))) (* a (/ b 4.0)))))
double code(double x, double y, double z, double t, double a, double b, double c) {
return c + (fma(x, y, (z * (t / 16.0))) - (a * (b / 4.0)));
}
function code(x, y, z, t, a, b, c) return Float64(c + Float64(fma(x, y, Float64(z * Float64(t / 16.0))) - Float64(a * Float64(b / 4.0)))) end
code[x_, y_, z_, t_, a_, b_, c_] := N[(c + N[(N[(x * y + N[(z * N[(t / 16.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * N[(b / 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
c + \left(\mathsf{fma}\left(x, y, z \cdot \frac{t}{16}\right) - a \cdot \frac{b}{4}\right)
\end{array}
Initial program 98.1%
associate-+l-98.1%
*-commutative98.1%
associate-+l-98.1%
fma-define98.5%
*-commutative98.5%
associate-/l*98.5%
associate-/l*98.8%
Simplified98.8%
Final simplification98.8%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (+ c (* b (* a -0.25))))
(t_2 (+ c (* 0.0625 (* z t))))
(t_3 (+ c (* x y))))
(if (<= (* x y) -4.1e+74)
t_3
(if (<= (* x y) -1.2e-219)
t_1
(if (<= (* x y) 3.4e-118)
t_2
(if (<= (* x y) 4.2e-11)
(* a (- (/ c a) (* b 0.25)))
(if (<= (* x y) 2.9e+158)
t_2
(if (<= (* x y) 5.8e+207) t_1 t_3))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = c + (b * (a * -0.25));
double t_2 = c + (0.0625 * (z * t));
double t_3 = c + (x * y);
double tmp;
if ((x * y) <= -4.1e+74) {
tmp = t_3;
} else if ((x * y) <= -1.2e-219) {
tmp = t_1;
} else if ((x * y) <= 3.4e-118) {
tmp = t_2;
} else if ((x * y) <= 4.2e-11) {
tmp = a * ((c / a) - (b * 0.25));
} else if ((x * y) <= 2.9e+158) {
tmp = t_2;
} else if ((x * y) <= 5.8e+207) {
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 + (b * (a * (-0.25d0)))
t_2 = c + (0.0625d0 * (z * t))
t_3 = c + (x * y)
if ((x * y) <= (-4.1d+74)) then
tmp = t_3
else if ((x * y) <= (-1.2d-219)) then
tmp = t_1
else if ((x * y) <= 3.4d-118) then
tmp = t_2
else if ((x * y) <= 4.2d-11) then
tmp = a * ((c / a) - (b * 0.25d0))
else if ((x * y) <= 2.9d+158) then
tmp = t_2
else if ((x * y) <= 5.8d+207) 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 + (b * (a * -0.25));
double t_2 = c + (0.0625 * (z * t));
double t_3 = c + (x * y);
double tmp;
if ((x * y) <= -4.1e+74) {
tmp = t_3;
} else if ((x * y) <= -1.2e-219) {
tmp = t_1;
} else if ((x * y) <= 3.4e-118) {
tmp = t_2;
} else if ((x * y) <= 4.2e-11) {
tmp = a * ((c / a) - (b * 0.25));
} else if ((x * y) <= 2.9e+158) {
tmp = t_2;
} else if ((x * y) <= 5.8e+207) {
tmp = t_1;
} else {
tmp = t_3;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = c + (b * (a * -0.25)) t_2 = c + (0.0625 * (z * t)) t_3 = c + (x * y) tmp = 0 if (x * y) <= -4.1e+74: tmp = t_3 elif (x * y) <= -1.2e-219: tmp = t_1 elif (x * y) <= 3.4e-118: tmp = t_2 elif (x * y) <= 4.2e-11: tmp = a * ((c / a) - (b * 0.25)) elif (x * y) <= 2.9e+158: tmp = t_2 elif (x * y) <= 5.8e+207: tmp = t_1 else: tmp = t_3 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(c + Float64(b * Float64(a * -0.25))) t_2 = Float64(c + Float64(0.0625 * Float64(z * t))) t_3 = Float64(c + Float64(x * y)) tmp = 0.0 if (Float64(x * y) <= -4.1e+74) tmp = t_3; elseif (Float64(x * y) <= -1.2e-219) tmp = t_1; elseif (Float64(x * y) <= 3.4e-118) tmp = t_2; elseif (Float64(x * y) <= 4.2e-11) tmp = Float64(a * Float64(Float64(c / a) - Float64(b * 0.25))); elseif (Float64(x * y) <= 2.9e+158) tmp = t_2; elseif (Float64(x * y) <= 5.8e+207) 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 + (b * (a * -0.25)); t_2 = c + (0.0625 * (z * t)); t_3 = c + (x * y); tmp = 0.0; if ((x * y) <= -4.1e+74) tmp = t_3; elseif ((x * y) <= -1.2e-219) tmp = t_1; elseif ((x * y) <= 3.4e-118) tmp = t_2; elseif ((x * y) <= 4.2e-11) tmp = a * ((c / a) - (b * 0.25)); elseif ((x * y) <= 2.9e+158) tmp = t_2; elseif ((x * y) <= 5.8e+207) 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[(b * N[(a * -0.25), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(c + N[(0.0625 * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(c + N[(x * y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(x * y), $MachinePrecision], -4.1e+74], t$95$3, If[LessEqual[N[(x * y), $MachinePrecision], -1.2e-219], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], 3.4e-118], t$95$2, If[LessEqual[N[(x * y), $MachinePrecision], 4.2e-11], N[(a * N[(N[(c / a), $MachinePrecision] - N[(b * 0.25), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 2.9e+158], t$95$2, If[LessEqual[N[(x * y), $MachinePrecision], 5.8e+207], t$95$1, t$95$3]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := c + b \cdot \left(a \cdot -0.25\right)\\
t_2 := c + 0.0625 \cdot \left(z \cdot t\right)\\
t_3 := c + x \cdot y\\
\mathbf{if}\;x \cdot y \leq -4.1 \cdot 10^{+74}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;x \cdot y \leq -1.2 \cdot 10^{-219}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \cdot y \leq 3.4 \cdot 10^{-118}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x \cdot y \leq 4.2 \cdot 10^{-11}:\\
\;\;\;\;a \cdot \left(\frac{c}{a} - b \cdot 0.25\right)\\
\mathbf{elif}\;x \cdot y \leq 2.9 \cdot 10^{+158}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x \cdot y \leq 5.8 \cdot 10^{+207}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_3\\
\end{array}
\end{array}
if (*.f64 x y) < -4.1e74 or 5.79999999999999994e207 < (*.f64 x y) Initial program 94.4%
Taylor expanded in a around 0 83.7%
Taylor expanded in t around 0 76.6%
+-commutative76.6%
Simplified76.6%
if -4.1e74 < (*.f64 x y) < -1.20000000000000007e-219 or 2.90000000000000024e158 < (*.f64 x y) < 5.79999999999999994e207Initial program 99.9%
Taylor expanded in a around inf 64.3%
associate-*r*64.3%
*-commutative64.3%
*-commutative64.3%
Simplified64.3%
if -1.20000000000000007e-219 < (*.f64 x y) < 3.39999999999999991e-118 or 4.1999999999999997e-11 < (*.f64 x y) < 2.90000000000000024e158Initial program 99.3%
Taylor expanded in a around 0 83.0%
Taylor expanded in x around 0 73.5%
if 3.39999999999999991e-118 < (*.f64 x y) < 4.1999999999999997e-11Initial program 99.9%
Taylor expanded in a around inf 94.6%
Taylor expanded in c around inf 63.1%
Final simplification71.7%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* b (* a -0.25))) (t_2 (* z (* t 0.0625))))
(if (<= (* x y) -6.4e+69)
(* x y)
(if (<= (* x y) -5.2e-220)
t_1
(if (<= (* x y) 2e-297)
t_2
(if (<= (* x y) 2.3e-241)
c
(if (<= (* x y) 2.55e+157)
t_2
(if (<= (* x y) 3.8e+207) t_1 (* x y)))))))))
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 = z * (t * 0.0625);
double tmp;
if ((x * y) <= -6.4e+69) {
tmp = x * y;
} else if ((x * y) <= -5.2e-220) {
tmp = t_1;
} else if ((x * y) <= 2e-297) {
tmp = t_2;
} else if ((x * y) <= 2.3e-241) {
tmp = c;
} else if ((x * y) <= 2.55e+157) {
tmp = t_2;
} else if ((x * y) <= 3.8e+207) {
tmp = t_1;
} else {
tmp = 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) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = b * (a * (-0.25d0))
t_2 = z * (t * 0.0625d0)
if ((x * y) <= (-6.4d+69)) then
tmp = x * y
else if ((x * y) <= (-5.2d-220)) then
tmp = t_1
else if ((x * y) <= 2d-297) then
tmp = t_2
else if ((x * y) <= 2.3d-241) then
tmp = c
else if ((x * y) <= 2.55d+157) then
tmp = t_2
else if ((x * y) <= 3.8d+207) then
tmp = t_1
else
tmp = 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 t_1 = b * (a * -0.25);
double t_2 = z * (t * 0.0625);
double tmp;
if ((x * y) <= -6.4e+69) {
tmp = x * y;
} else if ((x * y) <= -5.2e-220) {
tmp = t_1;
} else if ((x * y) <= 2e-297) {
tmp = t_2;
} else if ((x * y) <= 2.3e-241) {
tmp = c;
} else if ((x * y) <= 2.55e+157) {
tmp = t_2;
} else if ((x * y) <= 3.8e+207) {
tmp = t_1;
} else {
tmp = x * y;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = b * (a * -0.25) t_2 = z * (t * 0.0625) tmp = 0 if (x * y) <= -6.4e+69: tmp = x * y elif (x * y) <= -5.2e-220: tmp = t_1 elif (x * y) <= 2e-297: tmp = t_2 elif (x * y) <= 2.3e-241: tmp = c elif (x * y) <= 2.55e+157: tmp = t_2 elif (x * y) <= 3.8e+207: tmp = t_1 else: tmp = x * y return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(b * Float64(a * -0.25)) t_2 = Float64(z * Float64(t * 0.0625)) tmp = 0.0 if (Float64(x * y) <= -6.4e+69) tmp = Float64(x * y); elseif (Float64(x * y) <= -5.2e-220) tmp = t_1; elseif (Float64(x * y) <= 2e-297) tmp = t_2; elseif (Float64(x * y) <= 2.3e-241) tmp = c; elseif (Float64(x * y) <= 2.55e+157) tmp = t_2; elseif (Float64(x * y) <= 3.8e+207) tmp = t_1; else tmp = Float64(x * y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = b * (a * -0.25); t_2 = z * (t * 0.0625); tmp = 0.0; if ((x * y) <= -6.4e+69) tmp = x * y; elseif ((x * y) <= -5.2e-220) tmp = t_1; elseif ((x * y) <= 2e-297) tmp = t_2; elseif ((x * y) <= 2.3e-241) tmp = c; elseif ((x * y) <= 2.55e+157) tmp = t_2; elseif ((x * y) <= 3.8e+207) tmp = t_1; else tmp = x * y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(b * N[(a * -0.25), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(z * N[(t * 0.0625), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(x * y), $MachinePrecision], -6.4e+69], N[(x * y), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], -5.2e-220], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], 2e-297], t$95$2, If[LessEqual[N[(x * y), $MachinePrecision], 2.3e-241], c, If[LessEqual[N[(x * y), $MachinePrecision], 2.55e+157], t$95$2, If[LessEqual[N[(x * y), $MachinePrecision], 3.8e+207], t$95$1, N[(x * y), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \left(a \cdot -0.25\right)\\
t_2 := z \cdot \left(t \cdot 0.0625\right)\\
\mathbf{if}\;x \cdot y \leq -6.4 \cdot 10^{+69}:\\
\;\;\;\;x \cdot y\\
\mathbf{elif}\;x \cdot y \leq -5.2 \cdot 10^{-220}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \cdot y \leq 2 \cdot 10^{-297}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x \cdot y \leq 2.3 \cdot 10^{-241}:\\
\;\;\;\;c\\
\mathbf{elif}\;x \cdot y \leq 2.55 \cdot 10^{+157}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x \cdot y \leq 3.8 \cdot 10^{+207}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x \cdot y\\
\end{array}
\end{array}
if (*.f64 x y) < -6.3999999999999997e69 or 3.79999999999999986e207 < (*.f64 x y) Initial program 94.5%
Taylor expanded in x around inf 93.4%
Taylor expanded in a around 0 84.3%
Taylor expanded in x around inf 70.0%
if -6.3999999999999997e69 < (*.f64 x y) < -5.2e-220 or 2.55e157 < (*.f64 x y) < 3.79999999999999986e207Initial program 99.9%
Taylor expanded in a around inf 65.5%
associate-*r*65.5%
*-commutative65.5%
*-commutative65.5%
Simplified65.5%
Taylor expanded in b around inf 62.1%
Taylor expanded in a around inf 51.2%
if -5.2e-220 < (*.f64 x y) < 2.00000000000000008e-297 or 2.2999999999999999e-241 < (*.f64 x y) < 2.55e157Initial program 99.3%
Taylor expanded in x around inf 84.3%
Taylor expanded in a around 0 69.5%
Taylor expanded in t around inf 48.5%
associate-*r*48.5%
Simplified48.5%
if 2.00000000000000008e-297 < (*.f64 x y) < 2.2999999999999999e-241Initial program 100.0%
Taylor expanded in c around inf 61.9%
Final simplification55.7%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (+ c (* 0.0625 (* z t))))
(t_2 (* b (* a -0.25)))
(t_3 (+ c (* x y))))
(if (<= (* x y) -3e+85)
t_3
(if (<= (* x y) -2.45e-179)
t_1
(if (<= (* x y) -1.2e-219)
t_2
(if (<= (* x y) 1.75e+178)
t_1
(if (<= (* x y) 3.8e+207) 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 = b * (a * -0.25);
double t_3 = c + (x * y);
double tmp;
if ((x * y) <= -3e+85) {
tmp = t_3;
} else if ((x * y) <= -2.45e-179) {
tmp = t_1;
} else if ((x * y) <= -1.2e-219) {
tmp = t_2;
} else if ((x * y) <= 1.75e+178) {
tmp = t_1;
} else if ((x * y) <= 3.8e+207) {
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 = b * (a * (-0.25d0))
t_3 = c + (x * y)
if ((x * y) <= (-3d+85)) then
tmp = t_3
else if ((x * y) <= (-2.45d-179)) then
tmp = t_1
else if ((x * y) <= (-1.2d-219)) then
tmp = t_2
else if ((x * y) <= 1.75d+178) then
tmp = t_1
else if ((x * y) <= 3.8d+207) 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 = b * (a * -0.25);
double t_3 = c + (x * y);
double tmp;
if ((x * y) <= -3e+85) {
tmp = t_3;
} else if ((x * y) <= -2.45e-179) {
tmp = t_1;
} else if ((x * y) <= -1.2e-219) {
tmp = t_2;
} else if ((x * y) <= 1.75e+178) {
tmp = t_1;
} else if ((x * y) <= 3.8e+207) {
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 = b * (a * -0.25) t_3 = c + (x * y) tmp = 0 if (x * y) <= -3e+85: tmp = t_3 elif (x * y) <= -2.45e-179: tmp = t_1 elif (x * y) <= -1.2e-219: tmp = t_2 elif (x * y) <= 1.75e+178: tmp = t_1 elif (x * y) <= 3.8e+207: 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(b * Float64(a * -0.25)) t_3 = Float64(c + Float64(x * y)) tmp = 0.0 if (Float64(x * y) <= -3e+85) tmp = t_3; elseif (Float64(x * y) <= -2.45e-179) tmp = t_1; elseif (Float64(x * y) <= -1.2e-219) tmp = t_2; elseif (Float64(x * y) <= 1.75e+178) tmp = t_1; elseif (Float64(x * y) <= 3.8e+207) 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 = b * (a * -0.25); t_3 = c + (x * y); tmp = 0.0; if ((x * y) <= -3e+85) tmp = t_3; elseif ((x * y) <= -2.45e-179) tmp = t_1; elseif ((x * y) <= -1.2e-219) tmp = t_2; elseif ((x * y) <= 1.75e+178) tmp = t_1; elseif ((x * y) <= 3.8e+207) 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[(b * N[(a * -0.25), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(c + N[(x * y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(x * y), $MachinePrecision], -3e+85], t$95$3, If[LessEqual[N[(x * y), $MachinePrecision], -2.45e-179], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], -1.2e-219], t$95$2, If[LessEqual[N[(x * y), $MachinePrecision], 1.75e+178], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], 3.8e+207], 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 := b \cdot \left(a \cdot -0.25\right)\\
t_3 := c + x \cdot y\\
\mathbf{if}\;x \cdot y \leq -3 \cdot 10^{+85}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;x \cdot y \leq -2.45 \cdot 10^{-179}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \cdot y \leq -1.2 \cdot 10^{-219}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x \cdot y \leq 1.75 \cdot 10^{+178}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \cdot y \leq 3.8 \cdot 10^{+207}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_3\\
\end{array}
\end{array}
if (*.f64 x y) < -3e85 or 3.79999999999999986e207 < (*.f64 x y) Initial program 94.4%
Taylor expanded in a around 0 83.7%
Taylor expanded in t around 0 76.6%
+-commutative76.6%
Simplified76.6%
if -3e85 < (*.f64 x y) < -2.45e-179 or -1.20000000000000007e-219 < (*.f64 x y) < 1.75e178Initial program 99.5%
Taylor expanded in a around 0 75.5%
Taylor expanded in x around 0 65.6%
if -2.45e-179 < (*.f64 x y) < -1.20000000000000007e-219 or 1.75e178 < (*.f64 x y) < 3.79999999999999986e207Initial program 99.9%
Taylor expanded in a around inf 91.8%
associate-*r*91.8%
*-commutative91.8%
*-commutative91.8%
Simplified91.8%
Taylor expanded in b around inf 91.8%
Taylor expanded in a around inf 91.2%
Final simplification69.9%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* x (+ y (* 0.0625 (/ (* z t) x))))))
(if (<= x -3.4e+208)
t_1
(if (<= x -9e+190)
(* a (- (/ c a) (* b 0.25)))
(if (<= x -6.8e-16)
t_1
(if (<= x -2.8e-213)
(+ c (* b (* a -0.25)))
(if (<= x 7.5e-151) (+ c (* 0.0625 (* z t))) t_1)))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = x * (y + (0.0625 * ((z * t) / x)));
double tmp;
if (x <= -3.4e+208) {
tmp = t_1;
} else if (x <= -9e+190) {
tmp = a * ((c / a) - (b * 0.25));
} else if (x <= -6.8e-16) {
tmp = t_1;
} else if (x <= -2.8e-213) {
tmp = c + (b * (a * -0.25));
} else if (x <= 7.5e-151) {
tmp = c + (0.0625 * (z * t));
} 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 = x * (y + (0.0625d0 * ((z * t) / x)))
if (x <= (-3.4d+208)) then
tmp = t_1
else if (x <= (-9d+190)) then
tmp = a * ((c / a) - (b * 0.25d0))
else if (x <= (-6.8d-16)) then
tmp = t_1
else if (x <= (-2.8d-213)) then
tmp = c + (b * (a * (-0.25d0)))
else if (x <= 7.5d-151) then
tmp = c + (0.0625d0 * (z * 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 c) {
double t_1 = x * (y + (0.0625 * ((z * t) / x)));
double tmp;
if (x <= -3.4e+208) {
tmp = t_1;
} else if (x <= -9e+190) {
tmp = a * ((c / a) - (b * 0.25));
} else if (x <= -6.8e-16) {
tmp = t_1;
} else if (x <= -2.8e-213) {
tmp = c + (b * (a * -0.25));
} else if (x <= 7.5e-151) {
tmp = c + (0.0625 * (z * t));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = x * (y + (0.0625 * ((z * t) / x))) tmp = 0 if x <= -3.4e+208: tmp = t_1 elif x <= -9e+190: tmp = a * ((c / a) - (b * 0.25)) elif x <= -6.8e-16: tmp = t_1 elif x <= -2.8e-213: tmp = c + (b * (a * -0.25)) elif x <= 7.5e-151: tmp = c + (0.0625 * (z * t)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(x * Float64(y + Float64(0.0625 * Float64(Float64(z * t) / x)))) tmp = 0.0 if (x <= -3.4e+208) tmp = t_1; elseif (x <= -9e+190) tmp = Float64(a * Float64(Float64(c / a) - Float64(b * 0.25))); elseif (x <= -6.8e-16) tmp = t_1; elseif (x <= -2.8e-213) tmp = Float64(c + Float64(b * Float64(a * -0.25))); elseif (x <= 7.5e-151) tmp = Float64(c + Float64(0.0625 * Float64(z * t))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = x * (y + (0.0625 * ((z * t) / x))); tmp = 0.0; if (x <= -3.4e+208) tmp = t_1; elseif (x <= -9e+190) tmp = a * ((c / a) - (b * 0.25)); elseif (x <= -6.8e-16) tmp = t_1; elseif (x <= -2.8e-213) tmp = c + (b * (a * -0.25)); elseif (x <= 7.5e-151) tmp = c + (0.0625 * (z * t)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(x * N[(y + N[(0.0625 * N[(N[(z * t), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -3.4e+208], t$95$1, If[LessEqual[x, -9e+190], N[(a * N[(N[(c / a), $MachinePrecision] - N[(b * 0.25), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -6.8e-16], t$95$1, If[LessEqual[x, -2.8e-213], N[(c + N[(b * N[(a * -0.25), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 7.5e-151], N[(c + N[(0.0625 * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \left(y + 0.0625 \cdot \frac{z \cdot t}{x}\right)\\
\mathbf{if}\;x \leq -3.4 \cdot 10^{+208}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq -9 \cdot 10^{+190}:\\
\;\;\;\;a \cdot \left(\frac{c}{a} - b \cdot 0.25\right)\\
\mathbf{elif}\;x \leq -6.8 \cdot 10^{-16}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq -2.8 \cdot 10^{-213}:\\
\;\;\;\;c + b \cdot \left(a \cdot -0.25\right)\\
\mathbf{elif}\;x \leq 7.5 \cdot 10^{-151}:\\
\;\;\;\;c + 0.0625 \cdot \left(z \cdot t\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -3.3999999999999998e208 or -8.9999999999999999e190 < x < -6.8e-16 or 7.5000000000000004e-151 < x Initial program 97.6%
Taylor expanded in x around inf 96.0%
Taylor expanded in a around 0 76.5%
Taylor expanded in c around 0 61.8%
if -3.3999999999999998e208 < x < -8.9999999999999999e190Initial program 75.0%
Taylor expanded in a around inf 75.0%
Taylor expanded in c around inf 75.6%
if -6.8e-16 < x < -2.8e-213Initial program 100.0%
Taylor expanded in a around inf 62.4%
associate-*r*62.4%
*-commutative62.4%
*-commutative62.4%
Simplified62.4%
if -2.8e-213 < x < 7.5000000000000004e-151Initial program 100.0%
Taylor expanded in a around 0 82.6%
Taylor expanded in x around 0 76.6%
Final simplification64.8%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (+ c (* b (* a -0.25)))) (t_2 (+ c (* x y))))
(if (<= (* x y) -1.6e+81)
t_2
(if (<= (* x y) -7.5e-220)
t_1
(if (<= (* x y) 1.26e+159)
(+ c (* 0.0625 (* z t)))
(if (<= (* x y) 3.8e+207) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = c + (b * (a * -0.25));
double t_2 = c + (x * y);
double tmp;
if ((x * y) <= -1.6e+81) {
tmp = t_2;
} else if ((x * y) <= -7.5e-220) {
tmp = t_1;
} else if ((x * y) <= 1.26e+159) {
tmp = c + (0.0625 * (z * t));
} else if ((x * y) <= 3.8e+207) {
tmp = t_1;
} 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 = c + (b * (a * (-0.25d0)))
t_2 = c + (x * y)
if ((x * y) <= (-1.6d+81)) then
tmp = t_2
else if ((x * y) <= (-7.5d-220)) then
tmp = t_1
else if ((x * y) <= 1.26d+159) then
tmp = c + (0.0625d0 * (z * t))
else if ((x * y) <= 3.8d+207) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = c + (b * (a * -0.25));
double t_2 = c + (x * y);
double tmp;
if ((x * y) <= -1.6e+81) {
tmp = t_2;
} else if ((x * y) <= -7.5e-220) {
tmp = t_1;
} else if ((x * y) <= 1.26e+159) {
tmp = c + (0.0625 * (z * t));
} else if ((x * y) <= 3.8e+207) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = c + (b * (a * -0.25)) t_2 = c + (x * y) tmp = 0 if (x * y) <= -1.6e+81: tmp = t_2 elif (x * y) <= -7.5e-220: tmp = t_1 elif (x * y) <= 1.26e+159: tmp = c + (0.0625 * (z * t)) elif (x * y) <= 3.8e+207: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(c + Float64(b * Float64(a * -0.25))) t_2 = Float64(c + Float64(x * y)) tmp = 0.0 if (Float64(x * y) <= -1.6e+81) tmp = t_2; elseif (Float64(x * y) <= -7.5e-220) tmp = t_1; elseif (Float64(x * y) <= 1.26e+159) tmp = Float64(c + Float64(0.0625 * Float64(z * t))); elseif (Float64(x * y) <= 3.8e+207) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = c + (b * (a * -0.25)); t_2 = c + (x * y); tmp = 0.0; if ((x * y) <= -1.6e+81) tmp = t_2; elseif ((x * y) <= -7.5e-220) tmp = t_1; elseif ((x * y) <= 1.26e+159) tmp = c + (0.0625 * (z * t)); elseif ((x * y) <= 3.8e+207) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(c + N[(b * N[(a * -0.25), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(c + N[(x * y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(x * y), $MachinePrecision], -1.6e+81], t$95$2, If[LessEqual[N[(x * y), $MachinePrecision], -7.5e-220], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], 1.26e+159], N[(c + N[(0.0625 * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 3.8e+207], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := c + b \cdot \left(a \cdot -0.25\right)\\
t_2 := c + x \cdot y\\
\mathbf{if}\;x \cdot y \leq -1.6 \cdot 10^{+81}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x \cdot y \leq -7.5 \cdot 10^{-220}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \cdot y \leq 1.26 \cdot 10^{+159}:\\
\;\;\;\;c + 0.0625 \cdot \left(z \cdot t\right)\\
\mathbf{elif}\;x \cdot y \leq 3.8 \cdot 10^{+207}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if (*.f64 x y) < -1.6e81 or 3.79999999999999986e207 < (*.f64 x y) Initial program 94.4%
Taylor expanded in a around 0 83.7%
Taylor expanded in t around 0 76.6%
+-commutative76.6%
Simplified76.6%
if -1.6e81 < (*.f64 x y) < -7.5000000000000002e-220 or 1.2599999999999999e159 < (*.f64 x y) < 3.79999999999999986e207Initial program 99.9%
Taylor expanded in a around inf 64.3%
associate-*r*64.3%
*-commutative64.3%
*-commutative64.3%
Simplified64.3%
if -7.5000000000000002e-220 < (*.f64 x y) < 1.2599999999999999e159Initial program 99.4%
Taylor expanded in a around 0 79.3%
Taylor expanded in x around 0 69.2%
Final simplification70.2%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* b (* a -0.25))))
(if (<= (* x y) -1.75e+61)
(* x y)
(if (<= (* x y) -1.55e-257)
t_1
(if (<= (* x y) 4.3e-138) c (if (<= (* x y) 3.8e+207) t_1 (* x y)))))))
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 ((x * y) <= -1.75e+61) {
tmp = x * y;
} else if ((x * y) <= -1.55e-257) {
tmp = t_1;
} else if ((x * y) <= 4.3e-138) {
tmp = c;
} else if ((x * y) <= 3.8e+207) {
tmp = t_1;
} else {
tmp = 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) :: t_1
real(8) :: tmp
t_1 = b * (a * (-0.25d0))
if ((x * y) <= (-1.75d+61)) then
tmp = x * y
else if ((x * y) <= (-1.55d-257)) then
tmp = t_1
else if ((x * y) <= 4.3d-138) then
tmp = c
else if ((x * y) <= 3.8d+207) then
tmp = t_1
else
tmp = 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 t_1 = b * (a * -0.25);
double tmp;
if ((x * y) <= -1.75e+61) {
tmp = x * y;
} else if ((x * y) <= -1.55e-257) {
tmp = t_1;
} else if ((x * y) <= 4.3e-138) {
tmp = c;
} else if ((x * y) <= 3.8e+207) {
tmp = t_1;
} else {
tmp = x * y;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = b * (a * -0.25) tmp = 0 if (x * y) <= -1.75e+61: tmp = x * y elif (x * y) <= -1.55e-257: tmp = t_1 elif (x * y) <= 4.3e-138: tmp = c elif (x * y) <= 3.8e+207: tmp = t_1 else: tmp = x * y return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(b * Float64(a * -0.25)) tmp = 0.0 if (Float64(x * y) <= -1.75e+61) tmp = Float64(x * y); elseif (Float64(x * y) <= -1.55e-257) tmp = t_1; elseif (Float64(x * y) <= 4.3e-138) tmp = c; elseif (Float64(x * y) <= 3.8e+207) tmp = t_1; else tmp = Float64(x * y); 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 ((x * y) <= -1.75e+61) tmp = x * y; elseif ((x * y) <= -1.55e-257) tmp = t_1; elseif ((x * y) <= 4.3e-138) tmp = c; elseif ((x * y) <= 3.8e+207) tmp = t_1; else tmp = x * y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(b * N[(a * -0.25), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(x * y), $MachinePrecision], -1.75e+61], N[(x * y), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], -1.55e-257], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], 4.3e-138], c, If[LessEqual[N[(x * y), $MachinePrecision], 3.8e+207], t$95$1, N[(x * y), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \left(a \cdot -0.25\right)\\
\mathbf{if}\;x \cdot y \leq -1.75 \cdot 10^{+61}:\\
\;\;\;\;x \cdot y\\
\mathbf{elif}\;x \cdot y \leq -1.55 \cdot 10^{-257}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \cdot y \leq 4.3 \cdot 10^{-138}:\\
\;\;\;\;c\\
\mathbf{elif}\;x \cdot y \leq 3.8 \cdot 10^{+207}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x \cdot y\\
\end{array}
\end{array}
if (*.f64 x y) < -1.75000000000000009e61 or 3.79999999999999986e207 < (*.f64 x y) Initial program 94.5%
Taylor expanded in x around inf 93.4%
Taylor expanded in a around 0 84.3%
Taylor expanded in x around inf 70.0%
if -1.75000000000000009e61 < (*.f64 x y) < -1.55000000000000004e-257 or 4.3e-138 < (*.f64 x y) < 3.79999999999999986e207Initial program 99.3%
Taylor expanded in a around inf 50.7%
associate-*r*51.4%
*-commutative51.4%
*-commutative51.4%
Simplified51.4%
Taylor expanded in b around inf 49.2%
Taylor expanded in a around inf 38.9%
if -1.55000000000000004e-257 < (*.f64 x y) < 4.3e-138Initial program 100.0%
Taylor expanded in c around inf 40.7%
Final simplification48.2%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* 0.0625 (* z t))))
(if (or (<= (* a b) -1e+72) (not (<= (* a b) 5e+70)))
(- (+ c t_1) (* (* a b) 0.25))
(+ c (+ (* 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 (((a * b) <= -1e+72) || !((a * b) <= 5e+70)) {
tmp = (c + t_1) - ((a * b) * 0.25);
} 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 = 0.0625d0 * (z * t)
if (((a * b) <= (-1d+72)) .or. (.not. ((a * b) <= 5d+70))) then
tmp = (c + t_1) - ((a * b) * 0.25d0)
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 = 0.0625 * (z * t);
double tmp;
if (((a * b) <= -1e+72) || !((a * b) <= 5e+70)) {
tmp = (c + t_1) - ((a * b) * 0.25);
} else {
tmp = c + ((x * y) + t_1);
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = 0.0625 * (z * t) tmp = 0 if ((a * b) <= -1e+72) or not ((a * b) <= 5e+70): tmp = (c + t_1) - ((a * b) * 0.25) else: tmp = c + ((x * y) + 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 ((Float64(a * b) <= -1e+72) || !(Float64(a * b) <= 5e+70)) tmp = Float64(Float64(c + t_1) - Float64(Float64(a * b) * 0.25)); else tmp = Float64(c + Float64(Float64(x * y) + 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 (((a * b) <= -1e+72) || ~(((a * b) <= 5e+70))) tmp = (c + t_1) - ((a * b) * 0.25); 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[(0.0625 * N[(z * t), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[N[(a * b), $MachinePrecision], -1e+72], N[Not[LessEqual[N[(a * b), $MachinePrecision], 5e+70]], $MachinePrecision]], N[(N[(c + t$95$1), $MachinePrecision] - N[(N[(a * b), $MachinePrecision] * 0.25), $MachinePrecision]), $MachinePrecision], N[(c + N[(N[(x * y), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 0.0625 \cdot \left(z \cdot t\right)\\
\mathbf{if}\;a \cdot b \leq -1 \cdot 10^{+72} \lor \neg \left(a \cdot b \leq 5 \cdot 10^{+70}\right):\\
\;\;\;\;\left(c + t\_1\right) - \left(a \cdot b\right) \cdot 0.25\\
\mathbf{else}:\\
\;\;\;\;c + \left(x \cdot y + t\_1\right)\\
\end{array}
\end{array}
if (*.f64 a b) < -9.99999999999999944e71 or 5.0000000000000002e70 < (*.f64 a b) Initial program 97.2%
Taylor expanded in x around 0 87.4%
if -9.99999999999999944e71 < (*.f64 a b) < 5.0000000000000002e70Initial program 98.7%
Taylor expanded in a around 0 94.8%
Final simplification91.9%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (+ c (* x y))) (t_2 (* z (* t 0.0625))))
(if (<= z -3e+93)
t_2
(if (<= z -6.8e-152)
t_1
(if (<= z -7e-175) (* b (* a -0.25)) (if (<= z 1.56e-111) t_1 t_2))))))
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 = z * (t * 0.0625);
double tmp;
if (z <= -3e+93) {
tmp = t_2;
} else if (z <= -6.8e-152) {
tmp = t_1;
} else if (z <= -7e-175) {
tmp = b * (a * -0.25);
} else if (z <= 1.56e-111) {
tmp = t_1;
} 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 = c + (x * y)
t_2 = z * (t * 0.0625d0)
if (z <= (-3d+93)) then
tmp = t_2
else if (z <= (-6.8d-152)) then
tmp = t_1
else if (z <= (-7d-175)) then
tmp = b * (a * (-0.25d0))
else if (z <= 1.56d-111) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = c + (x * y);
double t_2 = z * (t * 0.0625);
double tmp;
if (z <= -3e+93) {
tmp = t_2;
} else if (z <= -6.8e-152) {
tmp = t_1;
} else if (z <= -7e-175) {
tmp = b * (a * -0.25);
} else if (z <= 1.56e-111) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = c + (x * y) t_2 = z * (t * 0.0625) tmp = 0 if z <= -3e+93: tmp = t_2 elif z <= -6.8e-152: tmp = t_1 elif z <= -7e-175: tmp = b * (a * -0.25) elif z <= 1.56e-111: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(c + Float64(x * y)) t_2 = Float64(z * Float64(t * 0.0625)) tmp = 0.0 if (z <= -3e+93) tmp = t_2; elseif (z <= -6.8e-152) tmp = t_1; elseif (z <= -7e-175) tmp = Float64(b * Float64(a * -0.25)); elseif (z <= 1.56e-111) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = c + (x * y); t_2 = z * (t * 0.0625); tmp = 0.0; if (z <= -3e+93) tmp = t_2; elseif (z <= -6.8e-152) tmp = t_1; elseif (z <= -7e-175) tmp = b * (a * -0.25); elseif (z <= 1.56e-111) tmp = t_1; else tmp = t_2; 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[(z * N[(t * 0.0625), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3e+93], t$95$2, If[LessEqual[z, -6.8e-152], t$95$1, If[LessEqual[z, -7e-175], N[(b * N[(a * -0.25), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.56e-111], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := c + x \cdot y\\
t_2 := z \cdot \left(t \cdot 0.0625\right)\\
\mathbf{if}\;z \leq -3 \cdot 10^{+93}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq -6.8 \cdot 10^{-152}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -7 \cdot 10^{-175}:\\
\;\;\;\;b \cdot \left(a \cdot -0.25\right)\\
\mathbf{elif}\;z \leq 1.56 \cdot 10^{-111}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if z < -2.99999999999999978e93 or 1.56e-111 < z Initial program 97.2%
Taylor expanded in x around inf 85.1%
Taylor expanded in a around 0 68.8%
Taylor expanded in t around inf 49.7%
associate-*r*49.7%
Simplified49.7%
if -2.99999999999999978e93 < z < -6.79999999999999968e-152 or -6.99999999999999997e-175 < z < 1.56e-111Initial program 99.1%
Taylor expanded in a around 0 74.5%
Taylor expanded in t around 0 61.0%
+-commutative61.0%
Simplified61.0%
if -6.79999999999999968e-152 < z < -6.99999999999999997e-175Initial program 100.0%
Taylor expanded in a around inf 88.3%
associate-*r*88.3%
*-commutative88.3%
*-commutative88.3%
Simplified88.3%
Taylor expanded in b around inf 88.3%
Taylor expanded in a around inf 76.6%
Final simplification55.4%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* 0.0625 (* z t))))
(if (or (<= (* a b) -5e+236) (not (<= (* a b) 1e+135)))
(- t_1 (* (* a b) 0.25))
(+ c (+ (* 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 (((a * b) <= -5e+236) || !((a * b) <= 1e+135)) {
tmp = t_1 - ((a * b) * 0.25);
} 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 = 0.0625d0 * (z * t)
if (((a * b) <= (-5d+236)) .or. (.not. ((a * b) <= 1d+135))) then
tmp = t_1 - ((a * b) * 0.25d0)
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 = 0.0625 * (z * t);
double tmp;
if (((a * b) <= -5e+236) || !((a * b) <= 1e+135)) {
tmp = t_1 - ((a * b) * 0.25);
} else {
tmp = c + ((x * y) + t_1);
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = 0.0625 * (z * t) tmp = 0 if ((a * b) <= -5e+236) or not ((a * b) <= 1e+135): tmp = t_1 - ((a * b) * 0.25) else: tmp = c + ((x * y) + 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 ((Float64(a * b) <= -5e+236) || !(Float64(a * b) <= 1e+135)) tmp = Float64(t_1 - Float64(Float64(a * b) * 0.25)); else tmp = Float64(c + Float64(Float64(x * y) + 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 (((a * b) <= -5e+236) || ~(((a * b) <= 1e+135))) tmp = t_1 - ((a * b) * 0.25); 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[(0.0625 * N[(z * t), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[N[(a * b), $MachinePrecision], -5e+236], N[Not[LessEqual[N[(a * b), $MachinePrecision], 1e+135]], $MachinePrecision]], N[(t$95$1 - N[(N[(a * b), $MachinePrecision] * 0.25), $MachinePrecision]), $MachinePrecision], N[(c + N[(N[(x * y), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 0.0625 \cdot \left(z \cdot t\right)\\
\mathbf{if}\;a \cdot b \leq -5 \cdot 10^{+236} \lor \neg \left(a \cdot b \leq 10^{+135}\right):\\
\;\;\;\;t\_1 - \left(a \cdot b\right) \cdot 0.25\\
\mathbf{else}:\\
\;\;\;\;c + \left(x \cdot y + t\_1\right)\\
\end{array}
\end{array}
if (*.f64 a b) < -4.9999999999999997e236 or 9.99999999999999962e134 < (*.f64 a b) Initial program 95.9%
Taylor expanded in x around 0 91.2%
Taylor expanded in z around inf 83.0%
Taylor expanded in c around 0 90.2%
if -4.9999999999999997e236 < (*.f64 a b) < 9.99999999999999962e134Initial program 98.9%
Taylor expanded in a around 0 90.4%
Final simplification90.4%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* (* a b) 0.25)) (t_2 (* 0.0625 (* z t))))
(if (<= (* a b) -2e+151)
(- (+ c (* x y)) t_1)
(if (<= (* a b) 1e+135) (+ c (+ (* x y) t_2)) (- t_2 t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = (a * b) * 0.25;
double t_2 = 0.0625 * (z * t);
double tmp;
if ((a * b) <= -2e+151) {
tmp = (c + (x * y)) - t_1;
} else if ((a * b) <= 1e+135) {
tmp = c + ((x * y) + t_2);
} else {
tmp = t_2 - 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) :: tmp
t_1 = (a * b) * 0.25d0
t_2 = 0.0625d0 * (z * t)
if ((a * b) <= (-2d+151)) then
tmp = (c + (x * y)) - t_1
else if ((a * b) <= 1d+135) then
tmp = c + ((x * y) + t_2)
else
tmp = t_2 - 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 = (a * b) * 0.25;
double t_2 = 0.0625 * (z * t);
double tmp;
if ((a * b) <= -2e+151) {
tmp = (c + (x * y)) - t_1;
} else if ((a * b) <= 1e+135) {
tmp = c + ((x * y) + t_2);
} else {
tmp = t_2 - t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = (a * b) * 0.25 t_2 = 0.0625 * (z * t) tmp = 0 if (a * b) <= -2e+151: tmp = (c + (x * y)) - t_1 elif (a * b) <= 1e+135: tmp = c + ((x * y) + t_2) else: tmp = t_2 - t_1 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(a * b) * 0.25) t_2 = Float64(0.0625 * Float64(z * t)) tmp = 0.0 if (Float64(a * b) <= -2e+151) tmp = Float64(Float64(c + Float64(x * y)) - t_1); elseif (Float64(a * b) <= 1e+135) tmp = Float64(c + Float64(Float64(x * y) + t_2)); else tmp = Float64(t_2 - t_1); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = (a * b) * 0.25; t_2 = 0.0625 * (z * t); tmp = 0.0; if ((a * b) <= -2e+151) tmp = (c + (x * y)) - t_1; elseif ((a * b) <= 1e+135) tmp = c + ((x * y) + t_2); else tmp = t_2 - t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(a * b), $MachinePrecision] * 0.25), $MachinePrecision]}, Block[{t$95$2 = N[(0.0625 * N[(z * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(a * b), $MachinePrecision], -2e+151], N[(N[(c + N[(x * y), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[N[(a * b), $MachinePrecision], 1e+135], N[(c + N[(N[(x * y), $MachinePrecision] + t$95$2), $MachinePrecision]), $MachinePrecision], N[(t$95$2 - t$95$1), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(a \cdot b\right) \cdot 0.25\\
t_2 := 0.0625 \cdot \left(z \cdot t\right)\\
\mathbf{if}\;a \cdot b \leq -2 \cdot 10^{+151}:\\
\;\;\;\;\left(c + x \cdot y\right) - t\_1\\
\mathbf{elif}\;a \cdot b \leq 10^{+135}:\\
\;\;\;\;c + \left(x \cdot y + t\_2\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2 - t\_1\\
\end{array}
\end{array}
if (*.f64 a b) < -2.00000000000000003e151Initial program 99.9%
Taylor expanded in z around 0 89.0%
if -2.00000000000000003e151 < (*.f64 a b) < 9.99999999999999962e134Initial program 98.8%
Taylor expanded in a around 0 92.5%
if 9.99999999999999962e134 < (*.f64 a b) Initial program 93.7%
Taylor expanded in x around 0 89.3%
Taylor expanded in z around inf 83.3%
Taylor expanded in c around 0 89.1%
Final simplification91.4%
(FPCore (x y z t a b c) :precision binary64 (if (or (<= a -6.6e+157) (not (<= a 8e+36))) (+ c (* b (* a -0.25))) (+ c (+ (* x y) (* 0.0625 (* z t))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((a <= -6.6e+157) || !(a <= 8e+36)) {
tmp = c + (b * (a * -0.25));
} else {
tmp = c + ((x * y) + (0.0625 * (z * t)));
}
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 ((a <= (-6.6d+157)) .or. (.not. (a <= 8d+36))) then
tmp = c + (b * (a * (-0.25d0)))
else
tmp = c + ((x * y) + (0.0625d0 * (z * t)))
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 ((a <= -6.6e+157) || !(a <= 8e+36)) {
tmp = c + (b * (a * -0.25));
} else {
tmp = c + ((x * y) + (0.0625 * (z * t)));
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if (a <= -6.6e+157) or not (a <= 8e+36): tmp = c + (b * (a * -0.25)) else: tmp = c + ((x * y) + (0.0625 * (z * t))) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if ((a <= -6.6e+157) || !(a <= 8e+36)) tmp = Float64(c + Float64(b * Float64(a * -0.25))); else tmp = Float64(c + Float64(Float64(x * y) + Float64(0.0625 * Float64(z * t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if ((a <= -6.6e+157) || ~((a <= 8e+36))) tmp = c + (b * (a * -0.25)); else tmp = c + ((x * y) + (0.0625 * (z * t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[a, -6.6e+157], N[Not[LessEqual[a, 8e+36]], $MachinePrecision]], N[(c + N[(b * N[(a * -0.25), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(c + N[(N[(x * y), $MachinePrecision] + N[(0.0625 * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -6.6 \cdot 10^{+157} \lor \neg \left(a \leq 8 \cdot 10^{+36}\right):\\
\;\;\;\;c + b \cdot \left(a \cdot -0.25\right)\\
\mathbf{else}:\\
\;\;\;\;c + \left(x \cdot y + 0.0625 \cdot \left(z \cdot t\right)\right)\\
\end{array}
\end{array}
if a < -6.6000000000000003e157 or 8.00000000000000034e36 < a Initial program 96.9%
Taylor expanded in a around inf 58.3%
associate-*r*59.2%
*-commutative59.2%
*-commutative59.2%
Simplified59.2%
if -6.6000000000000003e157 < a < 8.00000000000000034e36Initial program 98.8%
Taylor expanded in a around 0 84.5%
Final simplification75.5%
(FPCore (x y z t a b c) :precision binary64 (+ c (- (+ (* x y) (/ (* z t) 16.0)) (/ (* a b) 4.0))))
double code(double x, double y, double z, double t, double a, double b, double c) {
return c + (((x * y) + ((z * t) / 16.0)) - ((a * b) / 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 + (((x * y) + ((z * t) / 16.0d0)) - ((a * b) / 4.0d0))
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
return c + (((x * y) + ((z * t) / 16.0)) - ((a * b) / 4.0));
}
def code(x, y, z, t, a, b, c): return c + (((x * y) + ((z * t) / 16.0)) - ((a * b) / 4.0))
function code(x, y, z, t, a, b, c) return Float64(c + Float64(Float64(Float64(x * y) + Float64(Float64(z * t) / 16.0)) - Float64(Float64(a * b) / 4.0))) end
function tmp = code(x, y, z, t, a, b, c) tmp = c + (((x * y) + ((z * t) / 16.0)) - ((a * b) / 4.0)); end
code[x_, y_, z_, t_, a_, b_, c_] := N[(c + N[(N[(N[(x * y), $MachinePrecision] + N[(N[(z * t), $MachinePrecision] / 16.0), $MachinePrecision]), $MachinePrecision] - N[(N[(a * b), $MachinePrecision] / 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
c + \left(\left(x \cdot y + \frac{z \cdot t}{16}\right) - \frac{a \cdot b}{4}\right)
\end{array}
Initial program 98.1%
Final simplification98.1%
(FPCore (x y z t a b c) :precision binary64 (if (<= c -2.55e+69) c (if (<= c 4.5e+137) (* x y) c)))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (c <= -2.55e+69) {
tmp = c;
} else if (c <= 4.5e+137) {
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 <= (-2.55d+69)) then
tmp = c
else if (c <= 4.5d+137) 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 <= -2.55e+69) {
tmp = c;
} else if (c <= 4.5e+137) {
tmp = x * y;
} else {
tmp = c;
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if c <= -2.55e+69: tmp = c elif c <= 4.5e+137: tmp = x * y else: tmp = c return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (c <= -2.55e+69) tmp = c; elseif (c <= 4.5e+137) 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 <= -2.55e+69) tmp = c; elseif (c <= 4.5e+137) tmp = x * y; else tmp = c; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[c, -2.55e+69], c, If[LessEqual[c, 4.5e+137], N[(x * y), $MachinePrecision], c]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;c \leq -2.55 \cdot 10^{+69}:\\
\;\;\;\;c\\
\mathbf{elif}\;c \leq 4.5 \cdot 10^{+137}:\\
\;\;\;\;x \cdot y\\
\mathbf{else}:\\
\;\;\;\;c\\
\end{array}
\end{array}
if c < -2.54999999999999999e69 or 4.5000000000000001e137 < c Initial program 98.7%
Taylor expanded in c around inf 43.9%
if -2.54999999999999999e69 < c < 4.5000000000000001e137Initial program 97.8%
Taylor expanded in x around inf 89.0%
Taylor expanded in a around 0 66.9%
Taylor expanded in x around inf 37.8%
Final simplification39.8%
(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 98.1%
Taylor expanded in c around inf 18.5%
Final simplification18.5%
herbie shell --seed 2024079
(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))