
(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.8%
associate-/l*98.8%
fma-neg99.6%
distribute-neg-frac299.6%
metadata-eval99.6%
Simplified99.6%
Final simplification99.6%
(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%
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 (* t (* z 0.0625))) (t_2 (* b (* a -0.25))))
(if (<= (* x y) -2.5e+165)
(* x y)
(if (<= (* x y) -5.7e+51)
t_1
(if (<= (* x y) -4.2e-29)
t_2
(if (<= (* x y) -1e-179)
c
(if (<= (* x y) 4.5e-168)
t_1
(if (<= (* x y) 4.2e+66) t_2 (* x y)))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = t * (z * 0.0625);
double t_2 = b * (a * -0.25);
double tmp;
if ((x * y) <= -2.5e+165) {
tmp = x * y;
} else if ((x * y) <= -5.7e+51) {
tmp = t_1;
} else if ((x * y) <= -4.2e-29) {
tmp = t_2;
} else if ((x * y) <= -1e-179) {
tmp = c;
} else if ((x * y) <= 4.5e-168) {
tmp = t_1;
} else if ((x * y) <= 4.2e+66) {
tmp = t_2;
} 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 = t * (z * 0.0625d0)
t_2 = b * (a * (-0.25d0))
if ((x * y) <= (-2.5d+165)) then
tmp = x * y
else if ((x * y) <= (-5.7d+51)) then
tmp = t_1
else if ((x * y) <= (-4.2d-29)) then
tmp = t_2
else if ((x * y) <= (-1d-179)) then
tmp = c
else if ((x * y) <= 4.5d-168) then
tmp = t_1
else if ((x * y) <= 4.2d+66) then
tmp = t_2
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 = t * (z * 0.0625);
double t_2 = b * (a * -0.25);
double tmp;
if ((x * y) <= -2.5e+165) {
tmp = x * y;
} else if ((x * y) <= -5.7e+51) {
tmp = t_1;
} else if ((x * y) <= -4.2e-29) {
tmp = t_2;
} else if ((x * y) <= -1e-179) {
tmp = c;
} else if ((x * y) <= 4.5e-168) {
tmp = t_1;
} else if ((x * y) <= 4.2e+66) {
tmp = t_2;
} else {
tmp = x * y;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = t * (z * 0.0625) t_2 = b * (a * -0.25) tmp = 0 if (x * y) <= -2.5e+165: tmp = x * y elif (x * y) <= -5.7e+51: tmp = t_1 elif (x * y) <= -4.2e-29: tmp = t_2 elif (x * y) <= -1e-179: tmp = c elif (x * y) <= 4.5e-168: tmp = t_1 elif (x * y) <= 4.2e+66: tmp = t_2 else: tmp = x * y return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(t * Float64(z * 0.0625)) t_2 = Float64(b * Float64(a * -0.25)) tmp = 0.0 if (Float64(x * y) <= -2.5e+165) tmp = Float64(x * y); elseif (Float64(x * y) <= -5.7e+51) tmp = t_1; elseif (Float64(x * y) <= -4.2e-29) tmp = t_2; elseif (Float64(x * y) <= -1e-179) tmp = c; elseif (Float64(x * y) <= 4.5e-168) tmp = t_1; elseif (Float64(x * y) <= 4.2e+66) tmp = t_2; else tmp = Float64(x * y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = t * (z * 0.0625); t_2 = b * (a * -0.25); tmp = 0.0; if ((x * y) <= -2.5e+165) tmp = x * y; elseif ((x * y) <= -5.7e+51) tmp = t_1; elseif ((x * y) <= -4.2e-29) tmp = t_2; elseif ((x * y) <= -1e-179) tmp = c; elseif ((x * y) <= 4.5e-168) tmp = t_1; elseif ((x * y) <= 4.2e+66) tmp = t_2; else tmp = x * y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(t * N[(z * 0.0625), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(b * N[(a * -0.25), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(x * y), $MachinePrecision], -2.5e+165], N[(x * y), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], -5.7e+51], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], -4.2e-29], t$95$2, If[LessEqual[N[(x * y), $MachinePrecision], -1e-179], c, If[LessEqual[N[(x * y), $MachinePrecision], 4.5e-168], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], 4.2e+66], t$95$2, N[(x * y), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \left(z \cdot 0.0625\right)\\
t_2 := b \cdot \left(a \cdot -0.25\right)\\
\mathbf{if}\;x \cdot y \leq -2.5 \cdot 10^{+165}:\\
\;\;\;\;x \cdot y\\
\mathbf{elif}\;x \cdot y \leq -5.7 \cdot 10^{+51}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \cdot y \leq -4.2 \cdot 10^{-29}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x \cdot y \leq -1 \cdot 10^{-179}:\\
\;\;\;\;c\\
\mathbf{elif}\;x \cdot y \leq 4.5 \cdot 10^{-168}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \cdot y \leq 4.2 \cdot 10^{+66}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;x \cdot y\\
\end{array}
\end{array}
if (*.f64 x y) < -2.49999999999999985e165 or 4.20000000000000011e66 < (*.f64 x y) Initial program 97.8%
Taylor expanded in z around 0 83.5%
Taylor expanded in x around inf 72.9%
if -2.49999999999999985e165 < (*.f64 x y) < -5.7000000000000002e51 or -1e-179 < (*.f64 x y) < 4.5000000000000001e-168Initial program 100.0%
Taylor expanded in x around 0 96.3%
Taylor expanded in c around 0 76.7%
Taylor expanded in t around inf 44.5%
*-commutative44.5%
associate-*r*44.5%
*-commutative44.5%
Simplified44.5%
if -5.7000000000000002e51 < (*.f64 x y) < -4.19999999999999979e-29 or 4.5000000000000001e-168 < (*.f64 x y) < 4.20000000000000011e66Initial program 96.6%
Taylor expanded in z around 0 77.6%
Taylor expanded in a around inf 50.7%
associate-*r*50.7%
*-commutative50.7%
*-commutative50.7%
Simplified50.7%
if -4.19999999999999979e-29 < (*.f64 x y) < -1e-179Initial program 100.0%
Taylor expanded in c around inf 49.6%
Final simplification56.4%
(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) -8.2e+160)
t_2
(if (<= (* x y) -3.9e-244)
t_1
(if (<= (* x y) 1.95e-200)
(+ c (* 0.0625 (* z t)))
(if (<= (* x y) 1.25e+54) 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) <= -8.2e+160) {
tmp = t_2;
} else if ((x * y) <= -3.9e-244) {
tmp = t_1;
} else if ((x * y) <= 1.95e-200) {
tmp = c + (0.0625 * (z * t));
} else if ((x * y) <= 1.25e+54) {
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) <= (-8.2d+160)) then
tmp = t_2
else if ((x * y) <= (-3.9d-244)) then
tmp = t_1
else if ((x * y) <= 1.95d-200) then
tmp = c + (0.0625d0 * (z * t))
else if ((x * y) <= 1.25d+54) 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) <= -8.2e+160) {
tmp = t_2;
} else if ((x * y) <= -3.9e-244) {
tmp = t_1;
} else if ((x * y) <= 1.95e-200) {
tmp = c + (0.0625 * (z * t));
} else if ((x * y) <= 1.25e+54) {
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) <= -8.2e+160: tmp = t_2 elif (x * y) <= -3.9e-244: tmp = t_1 elif (x * y) <= 1.95e-200: tmp = c + (0.0625 * (z * t)) elif (x * y) <= 1.25e+54: 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) <= -8.2e+160) tmp = t_2; elseif (Float64(x * y) <= -3.9e-244) tmp = t_1; elseif (Float64(x * y) <= 1.95e-200) tmp = Float64(c + Float64(0.0625 * Float64(z * t))); elseif (Float64(x * y) <= 1.25e+54) 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) <= -8.2e+160) tmp = t_2; elseif ((x * y) <= -3.9e-244) tmp = t_1; elseif ((x * y) <= 1.95e-200) tmp = c + (0.0625 * (z * t)); elseif ((x * y) <= 1.25e+54) 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], -8.2e+160], t$95$2, If[LessEqual[N[(x * y), $MachinePrecision], -3.9e-244], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], 1.95e-200], N[(c + N[(0.0625 * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 1.25e+54], 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 -8.2 \cdot 10^{+160}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x \cdot y \leq -3.9 \cdot 10^{-244}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \cdot y \leq 1.95 \cdot 10^{-200}:\\
\;\;\;\;c + 0.0625 \cdot \left(z \cdot t\right)\\
\mathbf{elif}\;x \cdot y \leq 1.25 \cdot 10^{+54}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if (*.f64 x y) < -8.19999999999999996e160 or 1.25000000000000001e54 < (*.f64 x y) Initial program 97.8%
Taylor expanded in x around inf 75.7%
if -8.19999999999999996e160 < (*.f64 x y) < -3.8999999999999999e-244 or 1.94999999999999999e-200 < (*.f64 x y) < 1.25000000000000001e54Initial program 98.3%
Taylor expanded in a around inf 66.9%
associate-*r*66.9%
Simplified66.9%
if -3.8999999999999999e-244 < (*.f64 x y) < 1.94999999999999999e-200Initial program 100.0%
Taylor expanded in z around inf 71.0%
Final simplification70.7%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (+ c (* b (* a -0.25)))))
(if (<= (* x y) -6.2e+48)
(- (* x y) (* (* a b) 0.25))
(if (<= (* x y) -5.1e-244)
t_1
(if (<= (* x y) 4.2e-201)
(+ c (* 0.0625 (* z t)))
(if (<= (* x y) 4e+59) t_1 (+ c (* x y))))))))
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 tmp;
if ((x * y) <= -6.2e+48) {
tmp = (x * y) - ((a * b) * 0.25);
} else if ((x * y) <= -5.1e-244) {
tmp = t_1;
} else if ((x * y) <= 4.2e-201) {
tmp = c + (0.0625 * (z * t));
} else if ((x * y) <= 4e+59) {
tmp = t_1;
} 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) :: tmp
t_1 = c + (b * (a * (-0.25d0)))
if ((x * y) <= (-6.2d+48)) then
tmp = (x * y) - ((a * b) * 0.25d0)
else if ((x * y) <= (-5.1d-244)) then
tmp = t_1
else if ((x * y) <= 4.2d-201) then
tmp = c + (0.0625d0 * (z * t))
else if ((x * y) <= 4d+59) then
tmp = t_1
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 + (b * (a * -0.25));
double tmp;
if ((x * y) <= -6.2e+48) {
tmp = (x * y) - ((a * b) * 0.25);
} else if ((x * y) <= -5.1e-244) {
tmp = t_1;
} else if ((x * y) <= 4.2e-201) {
tmp = c + (0.0625 * (z * t));
} else if ((x * y) <= 4e+59) {
tmp = t_1;
} else {
tmp = c + (x * y);
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = c + (b * (a * -0.25)) tmp = 0 if (x * y) <= -6.2e+48: tmp = (x * y) - ((a * b) * 0.25) elif (x * y) <= -5.1e-244: tmp = t_1 elif (x * y) <= 4.2e-201: tmp = c + (0.0625 * (z * t)) elif (x * y) <= 4e+59: tmp = t_1 else: tmp = c + (x * y) return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(c + Float64(b * Float64(a * -0.25))) tmp = 0.0 if (Float64(x * y) <= -6.2e+48) tmp = Float64(Float64(x * y) - Float64(Float64(a * b) * 0.25)); elseif (Float64(x * y) <= -5.1e-244) tmp = t_1; elseif (Float64(x * y) <= 4.2e-201) tmp = Float64(c + Float64(0.0625 * Float64(z * t))); elseif (Float64(x * y) <= 4e+59) tmp = t_1; 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 + (b * (a * -0.25)); tmp = 0.0; if ((x * y) <= -6.2e+48) tmp = (x * y) - ((a * b) * 0.25); elseif ((x * y) <= -5.1e-244) tmp = t_1; elseif ((x * y) <= 4.2e-201) tmp = c + (0.0625 * (z * t)); elseif ((x * y) <= 4e+59) tmp = t_1; 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[(b * N[(a * -0.25), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(x * y), $MachinePrecision], -6.2e+48], N[(N[(x * y), $MachinePrecision] - N[(N[(a * b), $MachinePrecision] * 0.25), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], -5.1e-244], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], 4.2e-201], N[(c + N[(0.0625 * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 4e+59], t$95$1, N[(c + N[(x * y), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := c + b \cdot \left(a \cdot -0.25\right)\\
\mathbf{if}\;x \cdot y \leq -6.2 \cdot 10^{+48}:\\
\;\;\;\;x \cdot y - \left(a \cdot b\right) \cdot 0.25\\
\mathbf{elif}\;x \cdot y \leq -5.1 \cdot 10^{-244}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \cdot y \leq 4.2 \cdot 10^{-201}:\\
\;\;\;\;c + 0.0625 \cdot \left(z \cdot t\right)\\
\mathbf{elif}\;x \cdot y \leq 4 \cdot 10^{+59}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;c + x \cdot y\\
\end{array}
\end{array}
if (*.f64 x y) < -6.20000000000000011e48Initial program 96.1%
Taylor expanded in z around 0 76.9%
Taylor expanded in c around 0 73.3%
if -6.20000000000000011e48 < (*.f64 x y) < -5.09999999999999981e-244 or 4.20000000000000024e-201 < (*.f64 x y) < 3.99999999999999989e59Initial program 98.1%
Taylor expanded in a around inf 71.0%
associate-*r*71.0%
Simplified71.0%
if -5.09999999999999981e-244 < (*.f64 x y) < 4.20000000000000024e-201Initial program 100.0%
Taylor expanded in z around inf 71.0%
if 3.99999999999999989e59 < (*.f64 x y) Initial program 100.0%
Taylor expanded in x around inf 77.3%
Final simplification72.8%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* 0.0625 (* z t))))
(if (or (<= (* x y) -6.5e+164) (not (<= (* x y) 2.3e+34)))
(+ c (+ (* x y) t_1))
(- (+ c t_1) (* (* a b) 0.25)))))
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 (((x * y) <= -6.5e+164) || !((x * y) <= 2.3e+34)) {
tmp = c + ((x * y) + t_1);
} else {
tmp = (c + t_1) - ((a * b) * 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) :: t_1
real(8) :: tmp
t_1 = 0.0625d0 * (z * t)
if (((x * y) <= (-6.5d+164)) .or. (.not. ((x * y) <= 2.3d+34))) then
tmp = c + ((x * y) + t_1)
else
tmp = (c + t_1) - ((a * b) * 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 t_1 = 0.0625 * (z * t);
double tmp;
if (((x * y) <= -6.5e+164) || !((x * y) <= 2.3e+34)) {
tmp = c + ((x * y) + t_1);
} else {
tmp = (c + t_1) - ((a * b) * 0.25);
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = 0.0625 * (z * t) tmp = 0 if ((x * y) <= -6.5e+164) or not ((x * y) <= 2.3e+34): tmp = c + ((x * y) + t_1) else: tmp = (c + t_1) - ((a * b) * 0.25) return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(0.0625 * Float64(z * t)) tmp = 0.0 if ((Float64(x * y) <= -6.5e+164) || !(Float64(x * y) <= 2.3e+34)) tmp = Float64(c + Float64(Float64(x * y) + t_1)); else tmp = Float64(Float64(c + t_1) - Float64(Float64(a * b) * 0.25)); 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 (((x * y) <= -6.5e+164) || ~(((x * y) <= 2.3e+34))) tmp = c + ((x * y) + t_1); else tmp = (c + t_1) - ((a * b) * 0.25); 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[(x * y), $MachinePrecision], -6.5e+164], N[Not[LessEqual[N[(x * y), $MachinePrecision], 2.3e+34]], $MachinePrecision]], N[(c + N[(N[(x * y), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision], N[(N[(c + t$95$1), $MachinePrecision] - N[(N[(a * b), $MachinePrecision] * 0.25), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 0.0625 \cdot \left(z \cdot t\right)\\
\mathbf{if}\;x \cdot y \leq -6.5 \cdot 10^{+164} \lor \neg \left(x \cdot y \leq 2.3 \cdot 10^{+34}\right):\\
\;\;\;\;c + \left(x \cdot y + t\_1\right)\\
\mathbf{else}:\\
\;\;\;\;\left(c + t\_1\right) - \left(a \cdot b\right) \cdot 0.25\\
\end{array}
\end{array}
if (*.f64 x y) < -6.5000000000000003e164 or 2.2999999999999998e34 < (*.f64 x y) Initial program 97.9%
Taylor expanded in a around 0 91.0%
if -6.5000000000000003e164 < (*.f64 x y) < 2.2999999999999998e34Initial program 98.7%
Taylor expanded in x around 0 92.4%
Final simplification91.9%
(FPCore (x y z t a b c) :precision binary64 (if (or (<= (* a b) -1e+78) (not (<= (* a b) 1e+152))) (- (* x y) (* (* a b) 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 * b) <= -1e+78) || !((a * b) <= 1e+152)) {
tmp = (x * y) - ((a * b) * 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 * b) <= (-1d+78)) .or. (.not. ((a * b) <= 1d+152))) then
tmp = (x * y) - ((a * b) * 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 * b) <= -1e+78) || !((a * b) <= 1e+152)) {
tmp = (x * y) - ((a * b) * 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 * b) <= -1e+78) or not ((a * b) <= 1e+152): tmp = (x * y) - ((a * b) * 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 ((Float64(a * b) <= -1e+78) || !(Float64(a * b) <= 1e+152)) tmp = Float64(Float64(x * y) - Float64(Float64(a * b) * 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 * b) <= -1e+78) || ~(((a * b) <= 1e+152))) tmp = (x * y) - ((a * b) * 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[N[(a * b), $MachinePrecision], -1e+78], N[Not[LessEqual[N[(a * b), $MachinePrecision], 1e+152]], $MachinePrecision]], N[(N[(x * y), $MachinePrecision] - N[(N[(a * b), $MachinePrecision] * 0.25), $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 \cdot b \leq -1 \cdot 10^{+78} \lor \neg \left(a \cdot b \leq 10^{+152}\right):\\
\;\;\;\;x \cdot y - \left(a \cdot b\right) \cdot 0.25\\
\mathbf{else}:\\
\;\;\;\;c + \left(x \cdot y + 0.0625 \cdot \left(z \cdot t\right)\right)\\
\end{array}
\end{array}
if (*.f64 a b) < -1.00000000000000001e78 or 1e152 < (*.f64 a b) Initial program 94.8%
Taylor expanded in z around 0 92.3%
Taylor expanded in c around 0 89.1%
if -1.00000000000000001e78 < (*.f64 a b) < 1e152Initial program 100.0%
Taylor expanded in a around 0 90.9%
Final simplification90.4%
(FPCore (x y z t a b c) :precision binary64 (if (or (<= (* a b) -1e+78) (not (<= (* a b) 2e+66))) (- (+ c (* x y)) (* (* a b) 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 * b) <= -1e+78) || !((a * b) <= 2e+66)) {
tmp = (c + (x * y)) - ((a * b) * 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 * b) <= (-1d+78)) .or. (.not. ((a * b) <= 2d+66))) then
tmp = (c + (x * y)) - ((a * b) * 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 * b) <= -1e+78) || !((a * b) <= 2e+66)) {
tmp = (c + (x * y)) - ((a * b) * 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 * b) <= -1e+78) or not ((a * b) <= 2e+66): tmp = (c + (x * y)) - ((a * b) * 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 ((Float64(a * b) <= -1e+78) || !(Float64(a * b) <= 2e+66)) tmp = Float64(Float64(c + Float64(x * y)) - Float64(Float64(a * b) * 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 * b) <= -1e+78) || ~(((a * b) <= 2e+66))) tmp = (c + (x * y)) - ((a * b) * 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[N[(a * b), $MachinePrecision], -1e+78], N[Not[LessEqual[N[(a * b), $MachinePrecision], 2e+66]], $MachinePrecision]], N[(N[(c + N[(x * y), $MachinePrecision]), $MachinePrecision] - N[(N[(a * b), $MachinePrecision] * 0.25), $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 \cdot b \leq -1 \cdot 10^{+78} \lor \neg \left(a \cdot b \leq 2 \cdot 10^{+66}\right):\\
\;\;\;\;\left(c + x \cdot y\right) - \left(a \cdot b\right) \cdot 0.25\\
\mathbf{else}:\\
\;\;\;\;c + \left(x \cdot y + 0.0625 \cdot \left(z \cdot t\right)\right)\\
\end{array}
\end{array}
if (*.f64 a b) < -1.00000000000000001e78 or 1.99999999999999989e66 < (*.f64 a b) Initial program 95.4%
Taylor expanded in z around 0 91.0%
if -1.00000000000000001e78 < (*.f64 a b) < 1.99999999999999989e66Initial program 100.0%
Taylor expanded in a around 0 92.1%
Final simplification91.7%
(FPCore (x y z t a b c) :precision binary64 (if (or (<= (* x y) -8.2e+160) (not (<= (* x y) 1.8e+72))) (* 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 (((x * y) <= -8.2e+160) || !((x * y) <= 1.8e+72)) {
tmp = x * y;
} else {
tmp = 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 (((x * y) <= (-8.2d+160)) .or. (.not. ((x * y) <= 1.8d+72))) then
tmp = x * y
else
tmp = 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 (((x * y) <= -8.2e+160) || !((x * y) <= 1.8e+72)) {
tmp = x * y;
} else {
tmp = b * (a * -0.25);
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if ((x * y) <= -8.2e+160) or not ((x * y) <= 1.8e+72): tmp = x * y else: tmp = b * (a * -0.25) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if ((Float64(x * y) <= -8.2e+160) || !(Float64(x * y) <= 1.8e+72)) tmp = Float64(x * y); else tmp = Float64(b * Float64(a * -0.25)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (((x * y) <= -8.2e+160) || ~(((x * y) <= 1.8e+72))) tmp = x * y; else tmp = b * (a * -0.25); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[N[(x * y), $MachinePrecision], -8.2e+160], N[Not[LessEqual[N[(x * y), $MachinePrecision], 1.8e+72]], $MachinePrecision]], N[(x * y), $MachinePrecision], N[(b * N[(a * -0.25), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \cdot y \leq -8.2 \cdot 10^{+160} \lor \neg \left(x \cdot y \leq 1.8 \cdot 10^{+72}\right):\\
\;\;\;\;x \cdot y\\
\mathbf{else}:\\
\;\;\;\;b \cdot \left(a \cdot -0.25\right)\\
\end{array}
\end{array}
if (*.f64 x y) < -8.19999999999999996e160 or 1.80000000000000017e72 < (*.f64 x y) Initial program 97.8%
Taylor expanded in z around 0 81.7%
Taylor expanded in x around inf 71.4%
if -8.19999999999999996e160 < (*.f64 x y) < 1.80000000000000017e72Initial program 98.8%
Taylor expanded in z around 0 71.0%
Taylor expanded in a around inf 40.7%
associate-*r*40.7%
*-commutative40.7%
*-commutative40.7%
Simplified40.7%
Final simplification51.6%
(FPCore (x y z t a b c) :precision binary64 (if (or (<= (* x y) -6.2e+38) (not (<= (* x y) 2.8e+73))) (* x y) c))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (((x * y) <= -6.2e+38) || !((x * y) <= 2.8e+73)) {
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 (((x * y) <= (-6.2d+38)) .or. (.not. ((x * y) <= 2.8d+73))) 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 (((x * y) <= -6.2e+38) || !((x * y) <= 2.8e+73)) {
tmp = x * y;
} else {
tmp = c;
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if ((x * y) <= -6.2e+38) or not ((x * y) <= 2.8e+73): tmp = x * y else: tmp = c return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if ((Float64(x * y) <= -6.2e+38) || !(Float64(x * y) <= 2.8e+73)) 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 (((x * y) <= -6.2e+38) || ~(((x * y) <= 2.8e+73))) tmp = x * y; else tmp = c; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[N[(x * y), $MachinePrecision], -6.2e+38], N[Not[LessEqual[N[(x * y), $MachinePrecision], 2.8e+73]], $MachinePrecision]], N[(x * y), $MachinePrecision], c]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \cdot y \leq -6.2 \cdot 10^{+38} \lor \neg \left(x \cdot y \leq 2.8 \cdot 10^{+73}\right):\\
\;\;\;\;x \cdot y\\
\mathbf{else}:\\
\;\;\;\;c\\
\end{array}
\end{array}
if (*.f64 x y) < -6.20000000000000035e38 or 2.80000000000000008e73 < (*.f64 x y) Initial program 98.1%
Taylor expanded in z around 0 79.8%
Taylor expanded in x around inf 64.7%
if -6.20000000000000035e38 < (*.f64 x y) < 2.80000000000000008e73Initial program 98.6%
Taylor expanded in c around inf 27.8%
Final simplification43.2%
(FPCore (x y z t a b c) :precision binary64 (if (or (<= x -0.68) (not (<= x 1.55e-49))) (+ c (* x y)) (+ c (* 0.0625 (* z t)))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((x <= -0.68) || !(x <= 1.55e-49)) {
tmp = c + (x * y);
} else {
tmp = c + (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 ((x <= (-0.68d0)) .or. (.not. (x <= 1.55d-49))) then
tmp = c + (x * y)
else
tmp = c + (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 ((x <= -0.68) || !(x <= 1.55e-49)) {
tmp = c + (x * y);
} else {
tmp = c + (0.0625 * (z * t));
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if (x <= -0.68) or not (x <= 1.55e-49): tmp = c + (x * y) else: tmp = c + (0.0625 * (z * t)) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if ((x <= -0.68) || !(x <= 1.55e-49)) tmp = Float64(c + Float64(x * y)); else tmp = Float64(c + 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 ((x <= -0.68) || ~((x <= 1.55e-49))) tmp = c + (x * y); else tmp = c + (0.0625 * (z * t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[x, -0.68], N[Not[LessEqual[x, 1.55e-49]], $MachinePrecision]], N[(c + N[(x * y), $MachinePrecision]), $MachinePrecision], N[(c + N[(0.0625 * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -0.68 \lor \neg \left(x \leq 1.55 \cdot 10^{-49}\right):\\
\;\;\;\;c + x \cdot y\\
\mathbf{else}:\\
\;\;\;\;c + 0.0625 \cdot \left(z \cdot t\right)\\
\end{array}
\end{array}
if x < -0.680000000000000049 or 1.55e-49 < x Initial program 97.8%
Taylor expanded in x around inf 62.6%
if -0.680000000000000049 < x < 1.55e-49Initial program 99.2%
Taylor expanded in z around inf 57.1%
Final simplification60.0%
(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 -1.12e+39) (not (<= b 9e+203))) (* 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 <= -1.12e+39) || !(b <= 9e+203)) {
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 <= (-1.12d+39)) .or. (.not. (b <= 9d+203))) 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 <= -1.12e+39) || !(b <= 9e+203)) {
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 <= -1.12e+39) or not (b <= 9e+203): 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 <= -1.12e+39) || !(b <= 9e+203)) 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 <= -1.12e+39) || ~((b <= 9e+203))) 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, -1.12e+39], N[Not[LessEqual[b, 9e+203]], $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.12 \cdot 10^{+39} \lor \neg \left(b \leq 9 \cdot 10^{+203}\right):\\
\;\;\;\;b \cdot \left(a \cdot -0.25\right)\\
\mathbf{else}:\\
\;\;\;\;c + x \cdot y\\
\end{array}
\end{array}
if b < -1.12e39 or 9.0000000000000006e203 < b Initial program 95.0%
Taylor expanded in z around 0 78.1%
Taylor expanded in a around inf 55.6%
associate-*r*55.6%
*-commutative55.6%
*-commutative55.6%
Simplified55.6%
if -1.12e39 < b < 9.0000000000000006e203Initial program 100.0%
Taylor expanded in x around inf 56.7%
Final simplification56.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 18.5%
Final simplification18.5%
herbie shell --seed 2024043
(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))