
(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 14 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.4%
associate--l+98.4%
fma-define98.4%
associate-/l*98.4%
fmm-def98.8%
distribute-neg-frac298.8%
metadata-eval98.8%
Simplified98.8%
Final simplification98.8%
(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.4%
associate-+l-98.4%
+-commutative98.4%
*-commutative98.4%
+-commutative98.4%
associate-+l-98.4%
fma-define98.4%
*-commutative98.4%
associate-/l*98.4%
associate-/l*98.4%
Simplified98.4%
Final simplification98.4%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (+ c (* t (* z 0.0625)))) (t_2 (+ c (* b (* a -0.25)))))
(if (<= (* x y) -1e+49)
(* y (+ x (/ c y)))
(if (<= (* x y) 1e-89)
t_1
(if (<= (* x y) 5e+36)
t_2
(if (<= (* x y) 5e+98)
t_1
(if (<= (* x y) 5e+125) t_2 (+ c (* x y)))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = c + (t * (z * 0.0625));
double t_2 = c + (b * (a * -0.25));
double tmp;
if ((x * y) <= -1e+49) {
tmp = y * (x + (c / y));
} else if ((x * y) <= 1e-89) {
tmp = t_1;
} else if ((x * y) <= 5e+36) {
tmp = t_2;
} else if ((x * y) <= 5e+98) {
tmp = t_1;
} else if ((x * y) <= 5e+125) {
tmp = t_2;
} 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) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = c + (t * (z * 0.0625d0))
t_2 = c + (b * (a * (-0.25d0)))
if ((x * y) <= (-1d+49)) then
tmp = y * (x + (c / y))
else if ((x * y) <= 1d-89) then
tmp = t_1
else if ((x * y) <= 5d+36) then
tmp = t_2
else if ((x * y) <= 5d+98) then
tmp = t_1
else if ((x * y) <= 5d+125) then
tmp = t_2
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 t_1 = c + (t * (z * 0.0625));
double t_2 = c + (b * (a * -0.25));
double tmp;
if ((x * y) <= -1e+49) {
tmp = y * (x + (c / y));
} else if ((x * y) <= 1e-89) {
tmp = t_1;
} else if ((x * y) <= 5e+36) {
tmp = t_2;
} else if ((x * y) <= 5e+98) {
tmp = t_1;
} else if ((x * y) <= 5e+125) {
tmp = t_2;
} else {
tmp = c + (x * y);
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = c + (t * (z * 0.0625)) t_2 = c + (b * (a * -0.25)) tmp = 0 if (x * y) <= -1e+49: tmp = y * (x + (c / y)) elif (x * y) <= 1e-89: tmp = t_1 elif (x * y) <= 5e+36: tmp = t_2 elif (x * y) <= 5e+98: tmp = t_1 elif (x * y) <= 5e+125: tmp = t_2 else: tmp = c + (x * y) return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(c + Float64(t * Float64(z * 0.0625))) t_2 = Float64(c + Float64(b * Float64(a * -0.25))) tmp = 0.0 if (Float64(x * y) <= -1e+49) tmp = Float64(y * Float64(x + Float64(c / y))); elseif (Float64(x * y) <= 1e-89) tmp = t_1; elseif (Float64(x * y) <= 5e+36) tmp = t_2; elseif (Float64(x * y) <= 5e+98) tmp = t_1; elseif (Float64(x * y) <= 5e+125) tmp = t_2; else tmp = Float64(c + Float64(x * y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = c + (t * (z * 0.0625)); t_2 = c + (b * (a * -0.25)); tmp = 0.0; if ((x * y) <= -1e+49) tmp = y * (x + (c / y)); elseif ((x * y) <= 1e-89) tmp = t_1; elseif ((x * y) <= 5e+36) tmp = t_2; elseif ((x * y) <= 5e+98) tmp = t_1; elseif ((x * y) <= 5e+125) tmp = t_2; else tmp = c + (x * y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(c + N[(t * N[(z * 0.0625), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(c + N[(b * N[(a * -0.25), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(x * y), $MachinePrecision], -1e+49], N[(y * N[(x + N[(c / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 1e-89], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], 5e+36], t$95$2, If[LessEqual[N[(x * y), $MachinePrecision], 5e+98], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], 5e+125], t$95$2, N[(c + N[(x * y), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := c + t \cdot \left(z \cdot 0.0625\right)\\
t_2 := c + b \cdot \left(a \cdot -0.25\right)\\
\mathbf{if}\;x \cdot y \leq -1 \cdot 10^{+49}:\\
\;\;\;\;y \cdot \left(x + \frac{c}{y}\right)\\
\mathbf{elif}\;x \cdot y \leq 10^{-89}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \cdot y \leq 5 \cdot 10^{+36}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x \cdot y \leq 5 \cdot 10^{+98}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \cdot y \leq 5 \cdot 10^{+125}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;c + x \cdot y\\
\end{array}
\end{array}
if (*.f64 x y) < -9.99999999999999946e48Initial program 96.7%
Taylor expanded in x around inf 74.3%
Taylor expanded in y around inf 74.3%
if -9.99999999999999946e48 < (*.f64 x y) < 1.00000000000000004e-89 or 4.99999999999999977e36 < (*.f64 x y) < 4.9999999999999998e98Initial program 100.0%
Taylor expanded in z around inf 70.8%
associate-*r*70.8%
*-commutative70.8%
associate-*r*70.8%
Simplified70.8%
if 1.00000000000000004e-89 < (*.f64 x y) < 4.99999999999999977e36 or 4.9999999999999998e98 < (*.f64 x y) < 4.99999999999999962e125Initial program 97.0%
Taylor expanded in a around inf 74.6%
*-commutative74.6%
*-commutative74.6%
associate-*r*74.6%
Simplified74.6%
if 4.99999999999999962e125 < (*.f64 x y) Initial program 97.9%
Taylor expanded in x around inf 86.5%
Final simplification75.0%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* 0.0625 (* z t))))
(if (<= y -2.4e-69)
(* x y)
(if (<= y -4.5e-254)
t_1
(if (<= y 2.95e-283)
c
(if (<= y 1.38e-226)
t_1
(if (<= y 1.65e-87) c (if (<= y 3.9e+111) t_1 (* x y)))))))))
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 (y <= -2.4e-69) {
tmp = x * y;
} else if (y <= -4.5e-254) {
tmp = t_1;
} else if (y <= 2.95e-283) {
tmp = c;
} else if (y <= 1.38e-226) {
tmp = t_1;
} else if (y <= 1.65e-87) {
tmp = c;
} else if (y <= 3.9e+111) {
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 = 0.0625d0 * (z * t)
if (y <= (-2.4d-69)) then
tmp = x * y
else if (y <= (-4.5d-254)) then
tmp = t_1
else if (y <= 2.95d-283) then
tmp = c
else if (y <= 1.38d-226) then
tmp = t_1
else if (y <= 1.65d-87) then
tmp = c
else if (y <= 3.9d+111) 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 = 0.0625 * (z * t);
double tmp;
if (y <= -2.4e-69) {
tmp = x * y;
} else if (y <= -4.5e-254) {
tmp = t_1;
} else if (y <= 2.95e-283) {
tmp = c;
} else if (y <= 1.38e-226) {
tmp = t_1;
} else if (y <= 1.65e-87) {
tmp = c;
} else if (y <= 3.9e+111) {
tmp = t_1;
} else {
tmp = x * y;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = 0.0625 * (z * t) tmp = 0 if y <= -2.4e-69: tmp = x * y elif y <= -4.5e-254: tmp = t_1 elif y <= 2.95e-283: tmp = c elif y <= 1.38e-226: tmp = t_1 elif y <= 1.65e-87: tmp = c elif y <= 3.9e+111: tmp = t_1 else: tmp = x * y return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(0.0625 * Float64(z * t)) tmp = 0.0 if (y <= -2.4e-69) tmp = Float64(x * y); elseif (y <= -4.5e-254) tmp = t_1; elseif (y <= 2.95e-283) tmp = c; elseif (y <= 1.38e-226) tmp = t_1; elseif (y <= 1.65e-87) tmp = c; elseif (y <= 3.9e+111) 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 = 0.0625 * (z * t); tmp = 0.0; if (y <= -2.4e-69) tmp = x * y; elseif (y <= -4.5e-254) tmp = t_1; elseif (y <= 2.95e-283) tmp = c; elseif (y <= 1.38e-226) tmp = t_1; elseif (y <= 1.65e-87) tmp = c; elseif (y <= 3.9e+111) 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[(0.0625 * N[(z * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2.4e-69], N[(x * y), $MachinePrecision], If[LessEqual[y, -4.5e-254], t$95$1, If[LessEqual[y, 2.95e-283], c, If[LessEqual[y, 1.38e-226], t$95$1, If[LessEqual[y, 1.65e-87], c, If[LessEqual[y, 3.9e+111], t$95$1, N[(x * y), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 0.0625 \cdot \left(z \cdot t\right)\\
\mathbf{if}\;y \leq -2.4 \cdot 10^{-69}:\\
\;\;\;\;x \cdot y\\
\mathbf{elif}\;y \leq -4.5 \cdot 10^{-254}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 2.95 \cdot 10^{-283}:\\
\;\;\;\;c\\
\mathbf{elif}\;y \leq 1.38 \cdot 10^{-226}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 1.65 \cdot 10^{-87}:\\
\;\;\;\;c\\
\mathbf{elif}\;y \leq 3.9 \cdot 10^{+111}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x \cdot y\\
\end{array}
\end{array}
if y < -2.4000000000000001e-69 or 3.89999999999999979e111 < y Initial program 97.1%
Taylor expanded in x around inf 66.9%
Taylor expanded in y around inf 66.8%
Taylor expanded in x around inf 52.2%
if -2.4000000000000001e-69 < y < -4.5e-254 or 2.94999999999999992e-283 < y < 1.37999999999999998e-226 or 1.65e-87 < y < 3.89999999999999979e111Initial program 100.0%
Taylor expanded in a around 0 72.3%
Taylor expanded in c around 0 50.7%
Taylor expanded in t around inf 36.5%
if -4.5e-254 < y < 2.94999999999999992e-283 or 1.37999999999999998e-226 < y < 1.65e-87Initial program 100.0%
Taylor expanded in c around inf 43.0%
Final simplification45.9%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (+ c (* x y))) (t_2 (+ c (* b (* a -0.25)))))
(if (<= t -18.5)
(+ c (* t (* z 0.0625)))
(if (<= t 8e-218)
t_1
(if (<= t 1.95e-113)
t_2
(if (<= t 0.0175)
t_1
(if (<= t 6.7e+109) t_2 (+ (* x y) (* 0.0625 (* z t))))))))))
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 + (b * (a * -0.25));
double tmp;
if (t <= -18.5) {
tmp = c + (t * (z * 0.0625));
} else if (t <= 8e-218) {
tmp = t_1;
} else if (t <= 1.95e-113) {
tmp = t_2;
} else if (t <= 0.0175) {
tmp = t_1;
} else if (t <= 6.7e+109) {
tmp = t_2;
} else {
tmp = (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) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = c + (x * y)
t_2 = c + (b * (a * (-0.25d0)))
if (t <= (-18.5d0)) then
tmp = c + (t * (z * 0.0625d0))
else if (t <= 8d-218) then
tmp = t_1
else if (t <= 1.95d-113) then
tmp = t_2
else if (t <= 0.0175d0) then
tmp = t_1
else if (t <= 6.7d+109) then
tmp = t_2
else
tmp = (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 t_1 = c + (x * y);
double t_2 = c + (b * (a * -0.25));
double tmp;
if (t <= -18.5) {
tmp = c + (t * (z * 0.0625));
} else if (t <= 8e-218) {
tmp = t_1;
} else if (t <= 1.95e-113) {
tmp = t_2;
} else if (t <= 0.0175) {
tmp = t_1;
} else if (t <= 6.7e+109) {
tmp = t_2;
} else {
tmp = (x * y) + (0.0625 * (z * t));
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = c + (x * y) t_2 = c + (b * (a * -0.25)) tmp = 0 if t <= -18.5: tmp = c + (t * (z * 0.0625)) elif t <= 8e-218: tmp = t_1 elif t <= 1.95e-113: tmp = t_2 elif t <= 0.0175: tmp = t_1 elif t <= 6.7e+109: tmp = t_2 else: tmp = (x * y) + (0.0625 * (z * t)) return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(c + Float64(x * y)) t_2 = Float64(c + Float64(b * Float64(a * -0.25))) tmp = 0.0 if (t <= -18.5) tmp = Float64(c + Float64(t * Float64(z * 0.0625))); elseif (t <= 8e-218) tmp = t_1; elseif (t <= 1.95e-113) tmp = t_2; elseif (t <= 0.0175) tmp = t_1; elseif (t <= 6.7e+109) tmp = t_2; else tmp = 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) t_1 = c + (x * y); t_2 = c + (b * (a * -0.25)); tmp = 0.0; if (t <= -18.5) tmp = c + (t * (z * 0.0625)); elseif (t <= 8e-218) tmp = t_1; elseif (t <= 1.95e-113) tmp = t_2; elseif (t <= 0.0175) tmp = t_1; elseif (t <= 6.7e+109) tmp = t_2; else tmp = (x * y) + (0.0625 * (z * t)); 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[(b * N[(a * -0.25), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -18.5], N[(c + N[(t * N[(z * 0.0625), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 8e-218], t$95$1, If[LessEqual[t, 1.95e-113], t$95$2, If[LessEqual[t, 0.0175], t$95$1, If[LessEqual[t, 6.7e+109], t$95$2, N[(N[(x * y), $MachinePrecision] + N[(0.0625 * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := c + x \cdot y\\
t_2 := c + b \cdot \left(a \cdot -0.25\right)\\
\mathbf{if}\;t \leq -18.5:\\
\;\;\;\;c + t \cdot \left(z \cdot 0.0625\right)\\
\mathbf{elif}\;t \leq 8 \cdot 10^{-218}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 1.95 \cdot 10^{-113}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq 0.0175:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 6.7 \cdot 10^{+109}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;x \cdot y + 0.0625 \cdot \left(z \cdot t\right)\\
\end{array}
\end{array}
if t < -18.5Initial program 97.1%
Taylor expanded in z around inf 64.9%
associate-*r*64.9%
*-commutative64.9%
associate-*r*64.9%
Simplified64.9%
if -18.5 < t < 8.0000000000000003e-218 or 1.9499999999999999e-113 < t < 0.017500000000000002Initial program 100.0%
Taylor expanded in x around inf 64.4%
if 8.0000000000000003e-218 < t < 1.9499999999999999e-113 or 0.017500000000000002 < t < 6.70000000000000036e109Initial program 100.0%
Taylor expanded in a around inf 53.7%
*-commutative53.7%
*-commutative53.7%
associate-*r*53.7%
Simplified53.7%
if 6.70000000000000036e109 < t Initial program 94.4%
Taylor expanded in a around 0 84.0%
Taylor expanded in c around 0 76.1%
Final simplification64.3%
(FPCore (x y z t a b c)
:precision binary64
(if (<= t -11800.0)
(+ c (* t (* z 0.0625)))
(if (<= t 3.25e-218)
(+ c (* x y))
(if (<= t 7.5e-90)
(+ c (* b (* a -0.25)))
(if (<= t 5.2e+55)
(- (* x y) (* (* a b) 0.25))
(+ (* 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 (t <= -11800.0) {
tmp = c + (t * (z * 0.0625));
} else if (t <= 3.25e-218) {
tmp = c + (x * y);
} else if (t <= 7.5e-90) {
tmp = c + (b * (a * -0.25));
} else if (t <= 5.2e+55) {
tmp = (x * y) - ((a * b) * 0.25);
} else {
tmp = (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 (t <= (-11800.0d0)) then
tmp = c + (t * (z * 0.0625d0))
else if (t <= 3.25d-218) then
tmp = c + (x * y)
else if (t <= 7.5d-90) then
tmp = c + (b * (a * (-0.25d0)))
else if (t <= 5.2d+55) then
tmp = (x * y) - ((a * b) * 0.25d0)
else
tmp = (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 (t <= -11800.0) {
tmp = c + (t * (z * 0.0625));
} else if (t <= 3.25e-218) {
tmp = c + (x * y);
} else if (t <= 7.5e-90) {
tmp = c + (b * (a * -0.25));
} else if (t <= 5.2e+55) {
tmp = (x * y) - ((a * b) * 0.25);
} else {
tmp = (x * y) + (0.0625 * (z * t));
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if t <= -11800.0: tmp = c + (t * (z * 0.0625)) elif t <= 3.25e-218: tmp = c + (x * y) elif t <= 7.5e-90: tmp = c + (b * (a * -0.25)) elif t <= 5.2e+55: tmp = (x * y) - ((a * b) * 0.25) else: tmp = (x * y) + (0.0625 * (z * t)) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (t <= -11800.0) tmp = Float64(c + Float64(t * Float64(z * 0.0625))); elseif (t <= 3.25e-218) tmp = Float64(c + Float64(x * y)); elseif (t <= 7.5e-90) tmp = Float64(c + Float64(b * Float64(a * -0.25))); elseif (t <= 5.2e+55) tmp = Float64(Float64(x * y) - Float64(Float64(a * b) * 0.25)); else tmp = 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 (t <= -11800.0) tmp = c + (t * (z * 0.0625)); elseif (t <= 3.25e-218) tmp = c + (x * y); elseif (t <= 7.5e-90) tmp = c + (b * (a * -0.25)); elseif (t <= 5.2e+55) tmp = (x * y) - ((a * b) * 0.25); else tmp = (x * y) + (0.0625 * (z * t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[t, -11800.0], N[(c + N[(t * N[(z * 0.0625), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.25e-218], N[(c + N[(x * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 7.5e-90], N[(c + N[(b * N[(a * -0.25), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5.2e+55], N[(N[(x * y), $MachinePrecision] - N[(N[(a * b), $MachinePrecision] * 0.25), $MachinePrecision]), $MachinePrecision], N[(N[(x * y), $MachinePrecision] + N[(0.0625 * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -11800:\\
\;\;\;\;c + t \cdot \left(z \cdot 0.0625\right)\\
\mathbf{elif}\;t \leq 3.25 \cdot 10^{-218}:\\
\;\;\;\;c + x \cdot y\\
\mathbf{elif}\;t \leq 7.5 \cdot 10^{-90}:\\
\;\;\;\;c + b \cdot \left(a \cdot -0.25\right)\\
\mathbf{elif}\;t \leq 5.2 \cdot 10^{+55}:\\
\;\;\;\;x \cdot y - \left(a \cdot b\right) \cdot 0.25\\
\mathbf{else}:\\
\;\;\;\;x \cdot y + 0.0625 \cdot \left(z \cdot t\right)\\
\end{array}
\end{array}
if t < -11800Initial program 97.1%
Taylor expanded in z around inf 65.9%
associate-*r*65.9%
*-commutative65.9%
associate-*r*65.9%
Simplified65.9%
if -11800 < t < 3.24999999999999991e-218Initial program 100.0%
Taylor expanded in x around inf 65.0%
if 3.24999999999999991e-218 < t < 7.4999999999999999e-90Initial program 100.0%
Taylor expanded in a around inf 64.9%
*-commutative64.9%
*-commutative64.9%
associate-*r*64.9%
Simplified64.9%
if 7.4999999999999999e-90 < t < 5.2e55Initial program 100.0%
Taylor expanded in z around 0 76.4%
Taylor expanded in c around 0 63.4%
if 5.2e55 < t Initial program 95.7%
Taylor expanded in a around 0 85.6%
Taylor expanded in c around 0 75.4%
Final simplification66.9%
(FPCore (x y z t a b c)
:precision binary64
(if (<= (* a b) -2e+210)
(- (* x y) (* (* a b) 0.25))
(if (<= (* a b) 2e+166)
(+ c (+ (* x y) (* 0.0625 (* z t))))
(* b (- (/ (* 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 ((a * b) <= -2e+210) {
tmp = (x * y) - ((a * b) * 0.25);
} else if ((a * b) <= 2e+166) {
tmp = c + ((x * y) + (0.0625 * (z * t)));
} else {
tmp = b * (((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 ((a * b) <= (-2d+210)) then
tmp = (x * y) - ((a * b) * 0.25d0)
else if ((a * b) <= 2d+166) then
tmp = c + ((x * y) + (0.0625d0 * (z * t)))
else
tmp = b * (((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 ((a * b) <= -2e+210) {
tmp = (x * y) - ((a * b) * 0.25);
} else if ((a * b) <= 2e+166) {
tmp = c + ((x * y) + (0.0625 * (z * t)));
} else {
tmp = b * (((x * y) / b) - (a * 0.25));
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if (a * b) <= -2e+210: tmp = (x * y) - ((a * b) * 0.25) elif (a * b) <= 2e+166: tmp = c + ((x * y) + (0.0625 * (z * t))) else: tmp = b * (((x * y) / b) - (a * 0.25)) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (Float64(a * b) <= -2e+210) tmp = Float64(Float64(x * y) - Float64(Float64(a * b) * 0.25)); elseif (Float64(a * b) <= 2e+166) tmp = Float64(c + Float64(Float64(x * y) + Float64(0.0625 * Float64(z * t)))); else tmp = Float64(b * Float64(Float64(Float64(x * y) / b) - Float64(a * 0.25))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if ((a * b) <= -2e+210) tmp = (x * y) - ((a * b) * 0.25); elseif ((a * b) <= 2e+166) tmp = c + ((x * y) + (0.0625 * (z * t))); else tmp = b * (((x * y) / b) - (a * 0.25)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[N[(a * b), $MachinePrecision], -2e+210], N[(N[(x * y), $MachinePrecision] - N[(N[(a * b), $MachinePrecision] * 0.25), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * b), $MachinePrecision], 2e+166], N[(c + N[(N[(x * y), $MachinePrecision] + N[(0.0625 * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(b * N[(N[(N[(x * y), $MachinePrecision] / b), $MachinePrecision] - N[(a * 0.25), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \cdot b \leq -2 \cdot 10^{+210}:\\
\;\;\;\;x \cdot y - \left(a \cdot b\right) \cdot 0.25\\
\mathbf{elif}\;a \cdot b \leq 2 \cdot 10^{+166}:\\
\;\;\;\;c + \left(x \cdot y + 0.0625 \cdot \left(z \cdot t\right)\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot \left(\frac{x \cdot y}{b} - a \cdot 0.25\right)\\
\end{array}
\end{array}
if (*.f64 a b) < -1.99999999999999985e210Initial program 100.0%
Taylor expanded in z around 0 96.9%
Taylor expanded in c around 0 96.9%
if -1.99999999999999985e210 < (*.f64 a b) < 1.99999999999999988e166Initial program 100.0%
Taylor expanded in a around 0 92.7%
if 1.99999999999999988e166 < (*.f64 a b) Initial program 89.5%
Taylor expanded in b around inf 94.7%
Taylor expanded in t around 0 89.5%
Taylor expanded in c around 0 89.6%
Final simplification92.6%
(FPCore (x y z t a b c)
:precision binary64
(if (<= (* a b) -1e+156)
(- (+ c (* x y)) (* (* a b) 0.25))
(if (<= (* a b) 2e+166)
(+ c (+ (* x y) (* 0.0625 (* z t))))
(* b (- (/ (* 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 ((a * b) <= -1e+156) {
tmp = (c + (x * y)) - ((a * b) * 0.25);
} else if ((a * b) <= 2e+166) {
tmp = c + ((x * y) + (0.0625 * (z * t)));
} else {
tmp = b * (((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 ((a * b) <= (-1d+156)) then
tmp = (c + (x * y)) - ((a * b) * 0.25d0)
else if ((a * b) <= 2d+166) then
tmp = c + ((x * y) + (0.0625d0 * (z * t)))
else
tmp = b * (((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 ((a * b) <= -1e+156) {
tmp = (c + (x * y)) - ((a * b) * 0.25);
} else if ((a * b) <= 2e+166) {
tmp = c + ((x * y) + (0.0625 * (z * t)));
} else {
tmp = b * (((x * y) / b) - (a * 0.25));
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if (a * b) <= -1e+156: tmp = (c + (x * y)) - ((a * b) * 0.25) elif (a * b) <= 2e+166: tmp = c + ((x * y) + (0.0625 * (z * t))) else: tmp = b * (((x * y) / b) - (a * 0.25)) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (Float64(a * b) <= -1e+156) tmp = Float64(Float64(c + Float64(x * y)) - Float64(Float64(a * b) * 0.25)); elseif (Float64(a * b) <= 2e+166) tmp = Float64(c + Float64(Float64(x * y) + Float64(0.0625 * Float64(z * t)))); else tmp = Float64(b * Float64(Float64(Float64(x * y) / b) - Float64(a * 0.25))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if ((a * b) <= -1e+156) tmp = (c + (x * y)) - ((a * b) * 0.25); elseif ((a * b) <= 2e+166) tmp = c + ((x * y) + (0.0625 * (z * t))); else tmp = b * (((x * y) / b) - (a * 0.25)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[N[(a * b), $MachinePrecision], -1e+156], N[(N[(c + N[(x * y), $MachinePrecision]), $MachinePrecision] - N[(N[(a * b), $MachinePrecision] * 0.25), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * b), $MachinePrecision], 2e+166], N[(c + N[(N[(x * y), $MachinePrecision] + N[(0.0625 * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(b * N[(N[(N[(x * y), $MachinePrecision] / b), $MachinePrecision] - N[(a * 0.25), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \cdot b \leq -1 \cdot 10^{+156}:\\
\;\;\;\;\left(c + x \cdot y\right) - \left(a \cdot b\right) \cdot 0.25\\
\mathbf{elif}\;a \cdot b \leq 2 \cdot 10^{+166}:\\
\;\;\;\;c + \left(x \cdot y + 0.0625 \cdot \left(z \cdot t\right)\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot \left(\frac{x \cdot y}{b} - a \cdot 0.25\right)\\
\end{array}
\end{array}
if (*.f64 a b) < -9.9999999999999998e155Initial program 99.9%
Taylor expanded in z around 0 97.5%
if -9.9999999999999998e155 < (*.f64 a b) < 1.99999999999999988e166Initial program 100.0%
Taylor expanded in a around 0 93.0%
if 1.99999999999999988e166 < (*.f64 a b) Initial program 89.5%
Taylor expanded in b around inf 94.7%
Taylor expanded in t around 0 89.5%
Taylor expanded in c around 0 89.6%
Final simplification92.9%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* b (- (/ (* x y) b) (* a 0.25)))))
(if (<= (* a b) -1e+156)
(+ c t_1)
(if (<= (* a b) 2e+166) (+ c (+ (* x y) (* 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 = b * (((x * y) / b) - (a * 0.25));
double tmp;
if ((a * b) <= -1e+156) {
tmp = c + t_1;
} else if ((a * b) <= 2e+166) {
tmp = c + ((x * y) + (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 = b * (((x * y) / b) - (a * 0.25d0))
if ((a * b) <= (-1d+156)) then
tmp = c + t_1
else if ((a * b) <= 2d+166) then
tmp = c + ((x * y) + (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 = b * (((x * y) / b) - (a * 0.25));
double tmp;
if ((a * b) <= -1e+156) {
tmp = c + t_1;
} else if ((a * b) <= 2e+166) {
tmp = c + ((x * y) + (0.0625 * (z * t)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = b * (((x * y) / b) - (a * 0.25)) tmp = 0 if (a * b) <= -1e+156: tmp = c + t_1 elif (a * b) <= 2e+166: tmp = c + ((x * y) + (0.0625 * (z * t))) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(b * Float64(Float64(Float64(x * y) / b) - Float64(a * 0.25))) tmp = 0.0 if (Float64(a * b) <= -1e+156) tmp = Float64(c + t_1); elseif (Float64(a * b) <= 2e+166) tmp = Float64(c + Float64(Float64(x * y) + 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 = b * (((x * y) / b) - (a * 0.25)); tmp = 0.0; if ((a * b) <= -1e+156) tmp = c + t_1; elseif ((a * b) <= 2e+166) tmp = c + ((x * y) + (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[(b * N[(N[(N[(x * y), $MachinePrecision] / b), $MachinePrecision] - N[(a * 0.25), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(a * b), $MachinePrecision], -1e+156], N[(c + t$95$1), $MachinePrecision], If[LessEqual[N[(a * b), $MachinePrecision], 2e+166], N[(c + N[(N[(x * y), $MachinePrecision] + N[(0.0625 * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \left(\frac{x \cdot y}{b} - a \cdot 0.25\right)\\
\mathbf{if}\;a \cdot b \leq -1 \cdot 10^{+156}:\\
\;\;\;\;c + t\_1\\
\mathbf{elif}\;a \cdot b \leq 2 \cdot 10^{+166}:\\
\;\;\;\;c + \left(x \cdot y + 0.0625 \cdot \left(z \cdot t\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (*.f64 a b) < -9.9999999999999998e155Initial program 99.9%
Taylor expanded in b around inf 100.0%
Taylor expanded in t around 0 97.6%
if -9.9999999999999998e155 < (*.f64 a b) < 1.99999999999999988e166Initial program 100.0%
Taylor expanded in a around 0 93.0%
if 1.99999999999999988e166 < (*.f64 a b) Initial program 89.5%
Taylor expanded in b around inf 94.7%
Taylor expanded in t around 0 89.5%
Taylor expanded in c around 0 89.6%
Final simplification92.9%
(FPCore (x y z t a b c) :precision binary64 (if (<= (* x y) -0.1) (* y (+ x (/ c y))) (if (<= (* x y) 5e+125) (+ c (* b (* a -0.25))) (+ c (* x y)))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((x * y) <= -0.1) {
tmp = y * (x + (c / y));
} else if ((x * y) <= 5e+125) {
tmp = c + (b * (a * -0.25));
} 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 ((x * y) <= (-0.1d0)) then
tmp = y * (x + (c / y))
else if ((x * y) <= 5d+125) then
tmp = c + (b * (a * (-0.25d0)))
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 ((x * y) <= -0.1) {
tmp = y * (x + (c / y));
} else if ((x * y) <= 5e+125) {
tmp = c + (b * (a * -0.25));
} else {
tmp = c + (x * y);
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if (x * y) <= -0.1: tmp = y * (x + (c / y)) elif (x * y) <= 5e+125: tmp = c + (b * (a * -0.25)) else: tmp = c + (x * y) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (Float64(x * y) <= -0.1) tmp = Float64(y * Float64(x + Float64(c / y))); elseif (Float64(x * y) <= 5e+125) tmp = Float64(c + Float64(b * Float64(a * -0.25))); 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 ((x * y) <= -0.1) tmp = y * (x + (c / y)); elseif ((x * y) <= 5e+125) tmp = c + (b * (a * -0.25)); else tmp = c + (x * y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[N[(x * y), $MachinePrecision], -0.1], N[(y * N[(x + N[(c / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 5e+125], N[(c + N[(b * N[(a * -0.25), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(c + N[(x * y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \cdot y \leq -0.1:\\
\;\;\;\;y \cdot \left(x + \frac{c}{y}\right)\\
\mathbf{elif}\;x \cdot y \leq 5 \cdot 10^{+125}:\\
\;\;\;\;c + b \cdot \left(a \cdot -0.25\right)\\
\mathbf{else}:\\
\;\;\;\;c + x \cdot y\\
\end{array}
\end{array}
if (*.f64 x y) < -0.10000000000000001Initial program 97.0%
Taylor expanded in x around inf 72.2%
Taylor expanded in y around inf 72.2%
if -0.10000000000000001 < (*.f64 x y) < 4.99999999999999962e125Initial program 99.3%
Taylor expanded in a around inf 61.8%
*-commutative61.8%
*-commutative61.8%
associate-*r*61.8%
Simplified61.8%
if 4.99999999999999962e125 < (*.f64 x y) Initial program 97.9%
Taylor expanded in x around inf 86.5%
Final simplification69.1%
(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.4%
Final simplification98.4%
(FPCore (x y z t a b c) :precision binary64 (if (or (<= b -1e-28) (not (<= b 2.75e+191))) (* b (* a -0.25)) (+ c (* x y))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((b <= -1e-28) || !(b <= 2.75e+191)) {
tmp = b * (a * -0.25);
} 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 <= (-1d-28)) .or. (.not. (b <= 2.75d+191))) then
tmp = b * (a * (-0.25d0))
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 <= -1e-28) || !(b <= 2.75e+191)) {
tmp = b * (a * -0.25);
} else {
tmp = c + (x * y);
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if (b <= -1e-28) or not (b <= 2.75e+191): tmp = b * (a * -0.25) else: tmp = c + (x * y) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if ((b <= -1e-28) || !(b <= 2.75e+191)) tmp = Float64(b * Float64(a * -0.25)); 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 <= -1e-28) || ~((b <= 2.75e+191))) tmp = b * (a * -0.25); else tmp = c + (x * y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[b, -1e-28], N[Not[LessEqual[b, 2.75e+191]], $MachinePrecision]], N[(b * N[(a * -0.25), $MachinePrecision]), $MachinePrecision], N[(c + N[(x * y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1 \cdot 10^{-28} \lor \neg \left(b \leq 2.75 \cdot 10^{+191}\right):\\
\;\;\;\;b \cdot \left(a \cdot -0.25\right)\\
\mathbf{else}:\\
\;\;\;\;c + x \cdot y\\
\end{array}
\end{array}
if b < -9.99999999999999971e-29 or 2.7500000000000001e191 < b Initial program 96.5%
Taylor expanded in z around 0 78.8%
Taylor expanded in c around 0 58.0%
Taylor expanded in x around 0 43.5%
associate-*r*43.5%
*-commutative43.5%
Simplified43.5%
if -9.99999999999999971e-29 < b < 2.7500000000000001e191Initial program 99.4%
Taylor expanded in x around inf 59.9%
Final simplification54.4%
(FPCore (x y z t a b c) :precision binary64 (if (or (<= y -1.4e-78) (not (<= y 8.2e+96))) (* x y) c))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((y <= -1.4e-78) || !(y <= 8.2e+96)) {
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 ((y <= (-1.4d-78)) .or. (.not. (y <= 8.2d+96))) 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 ((y <= -1.4e-78) || !(y <= 8.2e+96)) {
tmp = x * y;
} else {
tmp = c;
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if (y <= -1.4e-78) or not (y <= 8.2e+96): tmp = x * y else: tmp = c return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if ((y <= -1.4e-78) || !(y <= 8.2e+96)) 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 ((y <= -1.4e-78) || ~((y <= 8.2e+96))) tmp = x * y; else tmp = c; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[y, -1.4e-78], N[Not[LessEqual[y, 8.2e+96]], $MachinePrecision]], N[(x * y), $MachinePrecision], c]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.4 \cdot 10^{-78} \lor \neg \left(y \leq 8.2 \cdot 10^{+96}\right):\\
\;\;\;\;x \cdot y\\
\mathbf{else}:\\
\;\;\;\;c\\
\end{array}
\end{array}
if y < -1.40000000000000012e-78 or 8.19999999999999996e96 < y Initial program 97.2%
Taylor expanded in x around inf 65.3%
Taylor expanded in y around inf 65.3%
Taylor expanded in x around inf 51.2%
if -1.40000000000000012e-78 < y < 8.19999999999999996e96Initial program 100.0%
Taylor expanded in c around inf 30.8%
Final simplification42.3%
(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.4%
Taylor expanded in c around inf 21.9%
Final simplification21.9%
herbie shell --seed 2024095
(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))