
(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 17 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.2%
distribute-neg-frac299.2%
metadata-eval99.2%
Simplified99.2%
(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.8%
*-commutative98.8%
associate-/l*98.8%
associate-/l*98.8%
Simplified98.8%
Final simplification98.8%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (+ (* x y) (* 0.0625 (* z t)))) (t_2 (* b (* a -0.25))))
(if (<= (* a b) -5e+299)
t_2
(if (<= (* a b) -2e+200)
t_1
(if (<= (* a b) -5e+47)
(+ c t_2)
(if (<= (* a b) -2e-311)
t_1
(if (<= (* a b) 2e-212)
(+ c (* x y))
(if (<= (* a b) 5e+36) t_1 (- (* x y) (* (* a b) 0.25))))))))))
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));
double t_2 = b * (a * -0.25);
double tmp;
if ((a * b) <= -5e+299) {
tmp = t_2;
} else if ((a * b) <= -2e+200) {
tmp = t_1;
} else if ((a * b) <= -5e+47) {
tmp = c + t_2;
} else if ((a * b) <= -2e-311) {
tmp = t_1;
} else if ((a * b) <= 2e-212) {
tmp = c + (x * y);
} else if ((a * b) <= 5e+36) {
tmp = t_1;
} else {
tmp = (x * y) - ((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) :: t_2
real(8) :: tmp
t_1 = (x * y) + (0.0625d0 * (z * t))
t_2 = b * (a * (-0.25d0))
if ((a * b) <= (-5d+299)) then
tmp = t_2
else if ((a * b) <= (-2d+200)) then
tmp = t_1
else if ((a * b) <= (-5d+47)) then
tmp = c + t_2
else if ((a * b) <= (-2d-311)) then
tmp = t_1
else if ((a * b) <= 2d-212) then
tmp = c + (x * y)
else if ((a * b) <= 5d+36) then
tmp = t_1
else
tmp = (x * y) - ((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 = (x * y) + (0.0625 * (z * t));
double t_2 = b * (a * -0.25);
double tmp;
if ((a * b) <= -5e+299) {
tmp = t_2;
} else if ((a * b) <= -2e+200) {
tmp = t_1;
} else if ((a * b) <= -5e+47) {
tmp = c + t_2;
} else if ((a * b) <= -2e-311) {
tmp = t_1;
} else if ((a * b) <= 2e-212) {
tmp = c + (x * y);
} else if ((a * b) <= 5e+36) {
tmp = t_1;
} else {
tmp = (x * y) - ((a * b) * 0.25);
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = (x * y) + (0.0625 * (z * t)) t_2 = b * (a * -0.25) tmp = 0 if (a * b) <= -5e+299: tmp = t_2 elif (a * b) <= -2e+200: tmp = t_1 elif (a * b) <= -5e+47: tmp = c + t_2 elif (a * b) <= -2e-311: tmp = t_1 elif (a * b) <= 2e-212: tmp = c + (x * y) elif (a * b) <= 5e+36: tmp = t_1 else: tmp = (x * y) - ((a * b) * 0.25) return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(x * y) + Float64(0.0625 * Float64(z * t))) t_2 = Float64(b * Float64(a * -0.25)) tmp = 0.0 if (Float64(a * b) <= -5e+299) tmp = t_2; elseif (Float64(a * b) <= -2e+200) tmp = t_1; elseif (Float64(a * b) <= -5e+47) tmp = Float64(c + t_2); elseif (Float64(a * b) <= -2e-311) tmp = t_1; elseif (Float64(a * b) <= 2e-212) tmp = Float64(c + Float64(x * y)); elseif (Float64(a * b) <= 5e+36) tmp = t_1; else tmp = Float64(Float64(x * y) - Float64(Float64(a * b) * 0.25)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = (x * y) + (0.0625 * (z * t)); t_2 = b * (a * -0.25); tmp = 0.0; if ((a * b) <= -5e+299) tmp = t_2; elseif ((a * b) <= -2e+200) tmp = t_1; elseif ((a * b) <= -5e+47) tmp = c + t_2; elseif ((a * b) <= -2e-311) tmp = t_1; elseif ((a * b) <= 2e-212) tmp = c + (x * y); elseif ((a * b) <= 5e+36) tmp = t_1; else tmp = (x * y) - ((a * b) * 0.25); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(x * y), $MachinePrecision] + N[(0.0625 * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(b * N[(a * -0.25), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(a * b), $MachinePrecision], -5e+299], t$95$2, If[LessEqual[N[(a * b), $MachinePrecision], -2e+200], t$95$1, If[LessEqual[N[(a * b), $MachinePrecision], -5e+47], N[(c + t$95$2), $MachinePrecision], If[LessEqual[N[(a * b), $MachinePrecision], -2e-311], t$95$1, If[LessEqual[N[(a * b), $MachinePrecision], 2e-212], N[(c + N[(x * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * b), $MachinePrecision], 5e+36], t$95$1, N[(N[(x * y), $MachinePrecision] - N[(N[(a * b), $MachinePrecision] * 0.25), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot y + 0.0625 \cdot \left(z \cdot t\right)\\
t_2 := b \cdot \left(a \cdot -0.25\right)\\
\mathbf{if}\;a \cdot b \leq -5 \cdot 10^{+299}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;a \cdot b \leq -2 \cdot 10^{+200}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \cdot b \leq -5 \cdot 10^{+47}:\\
\;\;\;\;c + t\_2\\
\mathbf{elif}\;a \cdot b \leq -2 \cdot 10^{-311}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \cdot b \leq 2 \cdot 10^{-212}:\\
\;\;\;\;c + x \cdot y\\
\mathbf{elif}\;a \cdot b \leq 5 \cdot 10^{+36}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x \cdot y - \left(a \cdot b\right) \cdot 0.25\\
\end{array}
\end{array}
if (*.f64 a b) < -5.0000000000000003e299Initial program 93.3%
Taylor expanded in a around inf 94.1%
*-commutative94.1%
*-commutative94.1%
associate-*r*94.1%
Simplified94.1%
Taylor expanded in b around inf 94.1%
Taylor expanded in a around inf 94.1%
*-commutative94.1%
Simplified94.1%
if -5.0000000000000003e299 < (*.f64 a b) < -1.9999999999999999e200 or -5.00000000000000022e47 < (*.f64 a b) < -1.9999999999999e-311 or 1.99999999999999991e-212 < (*.f64 a b) < 4.99999999999999977e36Initial program 100.0%
Taylor expanded in a around 0 96.4%
Taylor expanded in c around 0 79.4%
if -1.9999999999999999e200 < (*.f64 a b) < -5.00000000000000022e47Initial program 99.9%
Taylor expanded in a around inf 65.6%
*-commutative65.6%
*-commutative65.6%
associate-*r*65.6%
Simplified65.6%
if -1.9999999999999e-311 < (*.f64 a b) < 1.99999999999999991e-212Initial program 100.0%
Taylor expanded in x around inf 81.5%
if 4.99999999999999977e36 < (*.f64 a b) Initial program 95.5%
Taylor expanded in z around 0 95.6%
Taylor expanded in c around 0 84.3%
Final simplification80.4%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* b (* a -0.25))))
(if (<= (* x y) -1.45e+154)
(* x y)
(if (<= (* x y) -8.5e-146)
t_1
(if (<= (* x y) -4e-305)
c
(if (<= (* x y) 2.8e-130)
t_1
(if (<= (* x y) 1.2e+15)
c
(if (<= (* x y) 7.5e+68) 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.45e+154) {
tmp = x * y;
} else if ((x * y) <= -8.5e-146) {
tmp = t_1;
} else if ((x * y) <= -4e-305) {
tmp = c;
} else if ((x * y) <= 2.8e-130) {
tmp = t_1;
} else if ((x * y) <= 1.2e+15) {
tmp = c;
} else if ((x * y) <= 7.5e+68) {
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.45d+154)) then
tmp = x * y
else if ((x * y) <= (-8.5d-146)) then
tmp = t_1
else if ((x * y) <= (-4d-305)) then
tmp = c
else if ((x * y) <= 2.8d-130) then
tmp = t_1
else if ((x * y) <= 1.2d+15) then
tmp = c
else if ((x * y) <= 7.5d+68) 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.45e+154) {
tmp = x * y;
} else if ((x * y) <= -8.5e-146) {
tmp = t_1;
} else if ((x * y) <= -4e-305) {
tmp = c;
} else if ((x * y) <= 2.8e-130) {
tmp = t_1;
} else if ((x * y) <= 1.2e+15) {
tmp = c;
} else if ((x * y) <= 7.5e+68) {
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.45e+154: tmp = x * y elif (x * y) <= -8.5e-146: tmp = t_1 elif (x * y) <= -4e-305: tmp = c elif (x * y) <= 2.8e-130: tmp = t_1 elif (x * y) <= 1.2e+15: tmp = c elif (x * y) <= 7.5e+68: 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.45e+154) tmp = Float64(x * y); elseif (Float64(x * y) <= -8.5e-146) tmp = t_1; elseif (Float64(x * y) <= -4e-305) tmp = c; elseif (Float64(x * y) <= 2.8e-130) tmp = t_1; elseif (Float64(x * y) <= 1.2e+15) tmp = c; elseif (Float64(x * y) <= 7.5e+68) 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.45e+154) tmp = x * y; elseif ((x * y) <= -8.5e-146) tmp = t_1; elseif ((x * y) <= -4e-305) tmp = c; elseif ((x * y) <= 2.8e-130) tmp = t_1; elseif ((x * y) <= 1.2e+15) tmp = c; elseif ((x * y) <= 7.5e+68) 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.45e+154], N[(x * y), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], -8.5e-146], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], -4e-305], c, If[LessEqual[N[(x * y), $MachinePrecision], 2.8e-130], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], 1.2e+15], c, If[LessEqual[N[(x * y), $MachinePrecision], 7.5e+68], 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.45 \cdot 10^{+154}:\\
\;\;\;\;x \cdot y\\
\mathbf{elif}\;x \cdot y \leq -8.5 \cdot 10^{-146}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \cdot y \leq -4 \cdot 10^{-305}:\\
\;\;\;\;c\\
\mathbf{elif}\;x \cdot y \leq 2.8 \cdot 10^{-130}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \cdot y \leq 1.2 \cdot 10^{+15}:\\
\;\;\;\;c\\
\mathbf{elif}\;x \cdot y \leq 7.5 \cdot 10^{+68}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x \cdot y\\
\end{array}
\end{array}
if (*.f64 x y) < -1.4499999999999999e154 or 7.49999999999999959e68 < (*.f64 x y) Initial program 97.7%
Taylor expanded in z around 0 84.1%
Taylor expanded in x around inf 66.7%
if -1.4499999999999999e154 < (*.f64 x y) < -8.4999999999999997e-146 or -3.99999999999999999e-305 < (*.f64 x y) < 2.80000000000000016e-130 or 1.2e15 < (*.f64 x y) < 7.49999999999999959e68Initial program 98.3%
Taylor expanded in a around inf 64.2%
*-commutative64.2%
*-commutative64.2%
associate-*r*64.2%
Simplified64.2%
Taylor expanded in b around inf 58.9%
Taylor expanded in a around inf 45.8%
*-commutative45.8%
Simplified45.8%
if -8.4999999999999997e-146 < (*.f64 x y) < -3.99999999999999999e-305 or 2.80000000000000016e-130 < (*.f64 x y) < 1.2e15Initial program 100.0%
Taylor expanded in c around inf 46.4%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (+ c (* x y))) (t_2 (* 0.0625 (* z t))) (t_3 (+ (* x y) t_2)))
(if (<= (* a b) -2e+70)
(+ t_2 (* (* a b) -0.25))
(if (<= (* a b) -4e-20)
t_1
(if (<= (* a b) -2e-311)
t_3
(if (<= (* a b) 2e-212)
t_1
(if (<= (* a b) 5e+36) t_3 (- (* x y) (* (* a b) 0.25)))))))))
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 = 0.0625 * (z * t);
double t_3 = (x * y) + t_2;
double tmp;
if ((a * b) <= -2e+70) {
tmp = t_2 + ((a * b) * -0.25);
} else if ((a * b) <= -4e-20) {
tmp = t_1;
} else if ((a * b) <= -2e-311) {
tmp = t_3;
} else if ((a * b) <= 2e-212) {
tmp = t_1;
} else if ((a * b) <= 5e+36) {
tmp = t_3;
} else {
tmp = (x * y) - ((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) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = c + (x * y)
t_2 = 0.0625d0 * (z * t)
t_3 = (x * y) + t_2
if ((a * b) <= (-2d+70)) then
tmp = t_2 + ((a * b) * (-0.25d0))
else if ((a * b) <= (-4d-20)) then
tmp = t_1
else if ((a * b) <= (-2d-311)) then
tmp = t_3
else if ((a * b) <= 2d-212) then
tmp = t_1
else if ((a * b) <= 5d+36) then
tmp = t_3
else
tmp = (x * y) - ((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 = c + (x * y);
double t_2 = 0.0625 * (z * t);
double t_3 = (x * y) + t_2;
double tmp;
if ((a * b) <= -2e+70) {
tmp = t_2 + ((a * b) * -0.25);
} else if ((a * b) <= -4e-20) {
tmp = t_1;
} else if ((a * b) <= -2e-311) {
tmp = t_3;
} else if ((a * b) <= 2e-212) {
tmp = t_1;
} else if ((a * b) <= 5e+36) {
tmp = t_3;
} else {
tmp = (x * y) - ((a * b) * 0.25);
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = c + (x * y) t_2 = 0.0625 * (z * t) t_3 = (x * y) + t_2 tmp = 0 if (a * b) <= -2e+70: tmp = t_2 + ((a * b) * -0.25) elif (a * b) <= -4e-20: tmp = t_1 elif (a * b) <= -2e-311: tmp = t_3 elif (a * b) <= 2e-212: tmp = t_1 elif (a * b) <= 5e+36: tmp = t_3 else: tmp = (x * y) - ((a * b) * 0.25) return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(c + Float64(x * y)) t_2 = Float64(0.0625 * Float64(z * t)) t_3 = Float64(Float64(x * y) + t_2) tmp = 0.0 if (Float64(a * b) <= -2e+70) tmp = Float64(t_2 + Float64(Float64(a * b) * -0.25)); elseif (Float64(a * b) <= -4e-20) tmp = t_1; elseif (Float64(a * b) <= -2e-311) tmp = t_3; elseif (Float64(a * b) <= 2e-212) tmp = t_1; elseif (Float64(a * b) <= 5e+36) tmp = t_3; else tmp = Float64(Float64(x * y) - Float64(Float64(a * b) * 0.25)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = c + (x * y); t_2 = 0.0625 * (z * t); t_3 = (x * y) + t_2; tmp = 0.0; if ((a * b) <= -2e+70) tmp = t_2 + ((a * b) * -0.25); elseif ((a * b) <= -4e-20) tmp = t_1; elseif ((a * b) <= -2e-311) tmp = t_3; elseif ((a * b) <= 2e-212) tmp = t_1; elseif ((a * b) <= 5e+36) tmp = t_3; else tmp = (x * y) - ((a * b) * 0.25); 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[(0.0625 * N[(z * t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(x * y), $MachinePrecision] + t$95$2), $MachinePrecision]}, If[LessEqual[N[(a * b), $MachinePrecision], -2e+70], N[(t$95$2 + N[(N[(a * b), $MachinePrecision] * -0.25), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * b), $MachinePrecision], -4e-20], t$95$1, If[LessEqual[N[(a * b), $MachinePrecision], -2e-311], t$95$3, If[LessEqual[N[(a * b), $MachinePrecision], 2e-212], t$95$1, If[LessEqual[N[(a * b), $MachinePrecision], 5e+36], t$95$3, N[(N[(x * y), $MachinePrecision] - N[(N[(a * b), $MachinePrecision] * 0.25), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := c + x \cdot y\\
t_2 := 0.0625 \cdot \left(z \cdot t\right)\\
t_3 := x \cdot y + t\_2\\
\mathbf{if}\;a \cdot b \leq -2 \cdot 10^{+70}:\\
\;\;\;\;t\_2 + \left(a \cdot b\right) \cdot -0.25\\
\mathbf{elif}\;a \cdot b \leq -4 \cdot 10^{-20}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \cdot b \leq -2 \cdot 10^{-311}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;a \cdot b \leq 2 \cdot 10^{-212}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \cdot b \leq 5 \cdot 10^{+36}:\\
\;\;\;\;t\_3\\
\mathbf{else}:\\
\;\;\;\;x \cdot y - \left(a \cdot b\right) \cdot 0.25\\
\end{array}
\end{array}
if (*.f64 a b) < -2.00000000000000015e70Initial program 97.7%
Taylor expanded in x around 0 89.4%
Taylor expanded in z around inf 72.0%
Taylor expanded in c around 0 70.3%
Taylor expanded in z around 0 80.6%
if -2.00000000000000015e70 < (*.f64 a b) < -3.99999999999999978e-20 or -1.9999999999999e-311 < (*.f64 a b) < 1.99999999999999991e-212Initial program 100.0%
Taylor expanded in x around inf 81.6%
if -3.99999999999999978e-20 < (*.f64 a b) < -1.9999999999999e-311 or 1.99999999999999991e-212 < (*.f64 a b) < 4.99999999999999977e36Initial program 100.0%
Taylor expanded in a around 0 96.7%
Taylor expanded in c around 0 79.7%
if 4.99999999999999977e36 < (*.f64 a b) Initial program 95.5%
Taylor expanded in z around 0 95.6%
Taylor expanded in c around 0 84.3%
Final simplification81.5%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (+ c (* t (* z 0.0625))))
(t_2 (+ (* x y) (* 0.0625 (* z t))))
(t_3 (+ c (* b (* a -0.25)))))
(if (<= y -400.0)
t_2
(if (<= y -1.9e-184)
t_1
(if (<= y 6e-267)
t_3
(if (<= y 1.4e-101) t_1 (if (<= y 6.4e+87) t_3 t_2)))))))
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 = (x * y) + (0.0625 * (z * t));
double t_3 = c + (b * (a * -0.25));
double tmp;
if (y <= -400.0) {
tmp = t_2;
} else if (y <= -1.9e-184) {
tmp = t_1;
} else if (y <= 6e-267) {
tmp = t_3;
} else if (y <= 1.4e-101) {
tmp = t_1;
} else if (y <= 6.4e+87) {
tmp = t_3;
} 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) :: t_3
real(8) :: tmp
t_1 = c + (t * (z * 0.0625d0))
t_2 = (x * y) + (0.0625d0 * (z * t))
t_3 = c + (b * (a * (-0.25d0)))
if (y <= (-400.0d0)) then
tmp = t_2
else if (y <= (-1.9d-184)) then
tmp = t_1
else if (y <= 6d-267) then
tmp = t_3
else if (y <= 1.4d-101) then
tmp = t_1
else if (y <= 6.4d+87) then
tmp = t_3
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 + (t * (z * 0.0625));
double t_2 = (x * y) + (0.0625 * (z * t));
double t_3 = c + (b * (a * -0.25));
double tmp;
if (y <= -400.0) {
tmp = t_2;
} else if (y <= -1.9e-184) {
tmp = t_1;
} else if (y <= 6e-267) {
tmp = t_3;
} else if (y <= 1.4e-101) {
tmp = t_1;
} else if (y <= 6.4e+87) {
tmp = t_3;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = c + (t * (z * 0.0625)) t_2 = (x * y) + (0.0625 * (z * t)) t_3 = c + (b * (a * -0.25)) tmp = 0 if y <= -400.0: tmp = t_2 elif y <= -1.9e-184: tmp = t_1 elif y <= 6e-267: tmp = t_3 elif y <= 1.4e-101: tmp = t_1 elif y <= 6.4e+87: tmp = t_3 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(c + Float64(t * Float64(z * 0.0625))) t_2 = Float64(Float64(x * y) + Float64(0.0625 * Float64(z * t))) t_3 = Float64(c + Float64(b * Float64(a * -0.25))) tmp = 0.0 if (y <= -400.0) tmp = t_2; elseif (y <= -1.9e-184) tmp = t_1; elseif (y <= 6e-267) tmp = t_3; elseif (y <= 1.4e-101) tmp = t_1; elseif (y <= 6.4e+87) tmp = t_3; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = c + (t * (z * 0.0625)); t_2 = (x * y) + (0.0625 * (z * t)); t_3 = c + (b * (a * -0.25)); tmp = 0.0; if (y <= -400.0) tmp = t_2; elseif (y <= -1.9e-184) tmp = t_1; elseif (y <= 6e-267) tmp = t_3; elseif (y <= 1.4e-101) tmp = t_1; elseif (y <= 6.4e+87) tmp = t_3; else tmp = t_2; 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[(N[(x * y), $MachinePrecision] + N[(0.0625 * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(c + N[(b * N[(a * -0.25), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -400.0], t$95$2, If[LessEqual[y, -1.9e-184], t$95$1, If[LessEqual[y, 6e-267], t$95$3, If[LessEqual[y, 1.4e-101], t$95$1, If[LessEqual[y, 6.4e+87], t$95$3, t$95$2]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := c + t \cdot \left(z \cdot 0.0625\right)\\
t_2 := x \cdot y + 0.0625 \cdot \left(z \cdot t\right)\\
t_3 := c + b \cdot \left(a \cdot -0.25\right)\\
\mathbf{if}\;y \leq -400:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq -1.9 \cdot 10^{-184}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 6 \cdot 10^{-267}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;y \leq 1.4 \cdot 10^{-101}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 6.4 \cdot 10^{+87}:\\
\;\;\;\;t\_3\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if y < -400 or 6.4000000000000001e87 < y Initial program 97.2%
Taylor expanded in a around 0 77.8%
Taylor expanded in c around 0 65.6%
if -400 < y < -1.90000000000000008e-184 or 5.9999999999999999e-267 < y < 1.39999999999999995e-101Initial program 98.6%
Taylor expanded in z around inf 64.6%
associate-*r*64.6%
*-commutative64.6%
associate-*r*64.6%
Simplified64.6%
if -1.90000000000000008e-184 < y < 5.9999999999999999e-267 or 1.39999999999999995e-101 < y < 6.4000000000000001e87Initial program 100.0%
Taylor expanded in a around inf 64.8%
*-commutative64.8%
*-commutative64.8%
associate-*r*64.8%
Simplified64.8%
Final simplification65.1%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (+ c (* x y))))
(if (<= a -1.52e+109)
(+ c (* b (* a -0.25)))
(if (<= a -5e+65)
t_1
(if (<= a -1.55e-258)
(+ c (* t (* z 0.0625)))
(if (<= a 3.75e-6) t_1 (* b (+ (* a -0.25) (/ c b)))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = c + (x * y);
double tmp;
if (a <= -1.52e+109) {
tmp = c + (b * (a * -0.25));
} else if (a <= -5e+65) {
tmp = t_1;
} else if (a <= -1.55e-258) {
tmp = c + (t * (z * 0.0625));
} else if (a <= 3.75e-6) {
tmp = t_1;
} else {
tmp = b * ((a * -0.25) + (c / b));
}
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 + (x * y)
if (a <= (-1.52d+109)) then
tmp = c + (b * (a * (-0.25d0)))
else if (a <= (-5d+65)) then
tmp = t_1
else if (a <= (-1.55d-258)) then
tmp = c + (t * (z * 0.0625d0))
else if (a <= 3.75d-6) then
tmp = t_1
else
tmp = b * ((a * (-0.25d0)) + (c / b))
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 tmp;
if (a <= -1.52e+109) {
tmp = c + (b * (a * -0.25));
} else if (a <= -5e+65) {
tmp = t_1;
} else if (a <= -1.55e-258) {
tmp = c + (t * (z * 0.0625));
} else if (a <= 3.75e-6) {
tmp = t_1;
} else {
tmp = b * ((a * -0.25) + (c / b));
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = c + (x * y) tmp = 0 if a <= -1.52e+109: tmp = c + (b * (a * -0.25)) elif a <= -5e+65: tmp = t_1 elif a <= -1.55e-258: tmp = c + (t * (z * 0.0625)) elif a <= 3.75e-6: tmp = t_1 else: tmp = b * ((a * -0.25) + (c / b)) return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(c + Float64(x * y)) tmp = 0.0 if (a <= -1.52e+109) tmp = Float64(c + Float64(b * Float64(a * -0.25))); elseif (a <= -5e+65) tmp = t_1; elseif (a <= -1.55e-258) tmp = Float64(c + Float64(t * Float64(z * 0.0625))); elseif (a <= 3.75e-6) tmp = t_1; else tmp = Float64(b * Float64(Float64(a * -0.25) + Float64(c / b))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = c + (x * y); tmp = 0.0; if (a <= -1.52e+109) tmp = c + (b * (a * -0.25)); elseif (a <= -5e+65) tmp = t_1; elseif (a <= -1.55e-258) tmp = c + (t * (z * 0.0625)); elseif (a <= 3.75e-6) tmp = t_1; else tmp = b * ((a * -0.25) + (c / b)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(c + N[(x * y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -1.52e+109], N[(c + N[(b * N[(a * -0.25), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -5e+65], t$95$1, If[LessEqual[a, -1.55e-258], N[(c + N[(t * N[(z * 0.0625), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 3.75e-6], t$95$1, N[(b * N[(N[(a * -0.25), $MachinePrecision] + N[(c / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := c + x \cdot y\\
\mathbf{if}\;a \leq -1.52 \cdot 10^{+109}:\\
\;\;\;\;c + b \cdot \left(a \cdot -0.25\right)\\
\mathbf{elif}\;a \leq -5 \cdot 10^{+65}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq -1.55 \cdot 10^{-258}:\\
\;\;\;\;c + t \cdot \left(z \cdot 0.0625\right)\\
\mathbf{elif}\;a \leq 3.75 \cdot 10^{-6}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;b \cdot \left(a \cdot -0.25 + \frac{c}{b}\right)\\
\end{array}
\end{array}
if a < -1.52000000000000003e109Initial program 96.1%
Taylor expanded in a around inf 75.4%
*-commutative75.4%
*-commutative75.4%
associate-*r*75.4%
Simplified75.4%
if -1.52000000000000003e109 < a < -4.99999999999999973e65 or -1.54999999999999999e-258 < a < 3.7500000000000001e-6Initial program 100.0%
Taylor expanded in x around inf 58.6%
if -4.99999999999999973e65 < a < -1.54999999999999999e-258Initial program 100.0%
Taylor expanded in z around inf 68.6%
associate-*r*68.6%
*-commutative68.6%
associate-*r*68.6%
Simplified68.6%
if 3.7500000000000001e-6 < a Initial program 96.1%
Taylor expanded in a around inf 57.7%
*-commutative57.7%
*-commutative57.7%
associate-*r*57.7%
Simplified57.7%
Taylor expanded in b around inf 57.7%
Final simplification64.3%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (+ c (* x y))) (t_2 (+ c (* b (* a -0.25)))))
(if (<= a -1.7e+109)
t_2
(if (<= a -5.2e+64)
t_1
(if (<= a -4e-263)
(+ c (* t (* z 0.0625)))
(if (<= a 0.19) 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 = c + (b * (a * -0.25));
double tmp;
if (a <= -1.7e+109) {
tmp = t_2;
} else if (a <= -5.2e+64) {
tmp = t_1;
} else if (a <= -4e-263) {
tmp = c + (t * (z * 0.0625));
} else if (a <= 0.19) {
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 = c + (b * (a * (-0.25d0)))
if (a <= (-1.7d+109)) then
tmp = t_2
else if (a <= (-5.2d+64)) then
tmp = t_1
else if (a <= (-4d-263)) then
tmp = c + (t * (z * 0.0625d0))
else if (a <= 0.19d0) 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 = c + (b * (a * -0.25));
double tmp;
if (a <= -1.7e+109) {
tmp = t_2;
} else if (a <= -5.2e+64) {
tmp = t_1;
} else if (a <= -4e-263) {
tmp = c + (t * (z * 0.0625));
} else if (a <= 0.19) {
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 = c + (b * (a * -0.25)) tmp = 0 if a <= -1.7e+109: tmp = t_2 elif a <= -5.2e+64: tmp = t_1 elif a <= -4e-263: tmp = c + (t * (z * 0.0625)) elif a <= 0.19: 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(c + Float64(b * Float64(a * -0.25))) tmp = 0.0 if (a <= -1.7e+109) tmp = t_2; elseif (a <= -5.2e+64) tmp = t_1; elseif (a <= -4e-263) tmp = Float64(c + Float64(t * Float64(z * 0.0625))); elseif (a <= 0.19) 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 = c + (b * (a * -0.25)); tmp = 0.0; if (a <= -1.7e+109) tmp = t_2; elseif (a <= -5.2e+64) tmp = t_1; elseif (a <= -4e-263) tmp = c + (t * (z * 0.0625)); elseif (a <= 0.19) 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[(c + N[(b * N[(a * -0.25), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -1.7e+109], t$95$2, If[LessEqual[a, -5.2e+64], t$95$1, If[LessEqual[a, -4e-263], N[(c + N[(t * N[(z * 0.0625), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 0.19], t$95$1, t$95$2]]]]]]
\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}\;a \leq -1.7 \cdot 10^{+109}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;a \leq -5.2 \cdot 10^{+64}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq -4 \cdot 10^{-263}:\\
\;\;\;\;c + t \cdot \left(z \cdot 0.0625\right)\\
\mathbf{elif}\;a \leq 0.19:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if a < -1.70000000000000003e109 or 0.19 < a Initial program 96.1%
Taylor expanded in a around inf 67.0%
*-commutative67.0%
*-commutative67.0%
associate-*r*67.0%
Simplified67.0%
if -1.70000000000000003e109 < a < -5.19999999999999994e64 or -4e-263 < a < 0.19Initial program 100.0%
Taylor expanded in x around inf 57.9%
if -5.19999999999999994e64 < a < -4e-263Initial program 100.0%
Taylor expanded in z around inf 68.6%
associate-*r*68.6%
*-commutative68.6%
associate-*r*68.6%
Simplified68.6%
Final simplification64.3%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (+ c (* x y))) (t_2 (* b (* a -0.25))))
(if (<= a -2.2e+162)
t_2
(if (<= a -2.8e+64)
t_1
(if (<= a -8.5e-11) (* z (* t 0.0625)) (if (<= a 6.8) 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 = b * (a * -0.25);
double tmp;
if (a <= -2.2e+162) {
tmp = t_2;
} else if (a <= -2.8e+64) {
tmp = t_1;
} else if (a <= -8.5e-11) {
tmp = z * (t * 0.0625);
} else if (a <= 6.8) {
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 = b * (a * (-0.25d0))
if (a <= (-2.2d+162)) then
tmp = t_2
else if (a <= (-2.8d+64)) then
tmp = t_1
else if (a <= (-8.5d-11)) then
tmp = z * (t * 0.0625d0)
else if (a <= 6.8d0) 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 = b * (a * -0.25);
double tmp;
if (a <= -2.2e+162) {
tmp = t_2;
} else if (a <= -2.8e+64) {
tmp = t_1;
} else if (a <= -8.5e-11) {
tmp = z * (t * 0.0625);
} else if (a <= 6.8) {
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 = b * (a * -0.25) tmp = 0 if a <= -2.2e+162: tmp = t_2 elif a <= -2.8e+64: tmp = t_1 elif a <= -8.5e-11: tmp = z * (t * 0.0625) elif a <= 6.8: 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(b * Float64(a * -0.25)) tmp = 0.0 if (a <= -2.2e+162) tmp = t_2; elseif (a <= -2.8e+64) tmp = t_1; elseif (a <= -8.5e-11) tmp = Float64(z * Float64(t * 0.0625)); elseif (a <= 6.8) 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 = b * (a * -0.25); tmp = 0.0; if (a <= -2.2e+162) tmp = t_2; elseif (a <= -2.8e+64) tmp = t_1; elseif (a <= -8.5e-11) tmp = z * (t * 0.0625); elseif (a <= 6.8) 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[(b * N[(a * -0.25), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -2.2e+162], t$95$2, If[LessEqual[a, -2.8e+64], t$95$1, If[LessEqual[a, -8.5e-11], N[(z * N[(t * 0.0625), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 6.8], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := c + x \cdot y\\
t_2 := b \cdot \left(a \cdot -0.25\right)\\
\mathbf{if}\;a \leq -2.2 \cdot 10^{+162}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;a \leq -2.8 \cdot 10^{+64}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq -8.5 \cdot 10^{-11}:\\
\;\;\;\;z \cdot \left(t \cdot 0.0625\right)\\
\mathbf{elif}\;a \leq 6.8:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if a < -2.2000000000000002e162 or 6.79999999999999982 < a Initial program 95.4%
Taylor expanded in a around inf 66.3%
*-commutative66.3%
*-commutative66.3%
associate-*r*66.3%
Simplified66.3%
Taylor expanded in b around inf 63.0%
Taylor expanded in a around inf 55.1%
*-commutative55.1%
Simplified55.1%
if -2.2000000000000002e162 < a < -2.80000000000000024e64 or -8.50000000000000037e-11 < a < 6.79999999999999982Initial program 100.0%
Taylor expanded in x around inf 57.2%
if -2.80000000000000024e64 < a < -8.50000000000000037e-11Initial program 99.9%
Taylor expanded in x around 0 92.2%
Taylor expanded in z around inf 84.4%
Taylor expanded in t around inf 51.5%
Final simplification56.2%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* b (* a -0.25))))
(if (<= a -1.52e+109)
t_1
(if (<= a -1.85e+64)
(* x y)
(if (<= a -4.1e-262)
(* z (* t 0.0625))
(if (<= a 1.04e-7) (* x y) t_1))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = b * (a * -0.25);
double tmp;
if (a <= -1.52e+109) {
tmp = t_1;
} else if (a <= -1.85e+64) {
tmp = x * y;
} else if (a <= -4.1e-262) {
tmp = z * (t * 0.0625);
} else if (a <= 1.04e-7) {
tmp = x * y;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: t_1
real(8) :: tmp
t_1 = b * (a * (-0.25d0))
if (a <= (-1.52d+109)) then
tmp = t_1
else if (a <= (-1.85d+64)) then
tmp = x * y
else if (a <= (-4.1d-262)) then
tmp = z * (t * 0.0625d0)
else if (a <= 1.04d-7) then
tmp = x * y
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = b * (a * -0.25);
double tmp;
if (a <= -1.52e+109) {
tmp = t_1;
} else if (a <= -1.85e+64) {
tmp = x * y;
} else if (a <= -4.1e-262) {
tmp = z * (t * 0.0625);
} else if (a <= 1.04e-7) {
tmp = x * y;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = b * (a * -0.25) tmp = 0 if a <= -1.52e+109: tmp = t_1 elif a <= -1.85e+64: tmp = x * y elif a <= -4.1e-262: tmp = z * (t * 0.0625) elif a <= 1.04e-7: tmp = x * y else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(b * Float64(a * -0.25)) tmp = 0.0 if (a <= -1.52e+109) tmp = t_1; elseif (a <= -1.85e+64) tmp = Float64(x * y); elseif (a <= -4.1e-262) tmp = Float64(z * Float64(t * 0.0625)); elseif (a <= 1.04e-7) tmp = Float64(x * y); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = b * (a * -0.25); tmp = 0.0; if (a <= -1.52e+109) tmp = t_1; elseif (a <= -1.85e+64) tmp = x * y; elseif (a <= -4.1e-262) tmp = z * (t * 0.0625); elseif (a <= 1.04e-7) tmp = x * y; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(b * N[(a * -0.25), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -1.52e+109], t$95$1, If[LessEqual[a, -1.85e+64], N[(x * y), $MachinePrecision], If[LessEqual[a, -4.1e-262], N[(z * N[(t * 0.0625), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.04e-7], N[(x * y), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \left(a \cdot -0.25\right)\\
\mathbf{if}\;a \leq -1.52 \cdot 10^{+109}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq -1.85 \cdot 10^{+64}:\\
\;\;\;\;x \cdot y\\
\mathbf{elif}\;a \leq -4.1 \cdot 10^{-262}:\\
\;\;\;\;z \cdot \left(t \cdot 0.0625\right)\\
\mathbf{elif}\;a \leq 1.04 \cdot 10^{-7}:\\
\;\;\;\;x \cdot y\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -1.52000000000000003e109 or 1.04e-7 < a Initial program 96.1%
Taylor expanded in a around inf 66.5%
*-commutative66.5%
*-commutative66.5%
associate-*r*66.5%
Simplified66.5%
Taylor expanded in b around inf 61.0%
Taylor expanded in a around inf 52.8%
*-commutative52.8%
Simplified52.8%
if -1.52000000000000003e109 < a < -1.84999999999999992e64 or -4.10000000000000026e-262 < a < 1.04e-7Initial program 100.0%
Taylor expanded in z around 0 70.5%
Taylor expanded in x around inf 38.8%
if -1.84999999999999992e64 < a < -4.10000000000000026e-262Initial program 100.0%
Taylor expanded in x around 0 79.2%
Taylor expanded in z around inf 61.7%
Taylor expanded in t around inf 41.6%
Final simplification45.1%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* 0.0625 (* z t))) (t_2 (* (* a b) 0.25)))
(if (<= (* a b) -2e+70)
(- (+ c t_1) t_2)
(if (<= (* a b) 5e+36) (+ c (+ (* x y) t_1)) (- (+ c (* x y)) t_2)))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = 0.0625 * (z * t);
double t_2 = (a * b) * 0.25;
double tmp;
if ((a * b) <= -2e+70) {
tmp = (c + t_1) - t_2;
} else if ((a * b) <= 5e+36) {
tmp = c + ((x * y) + t_1);
} else {
tmp = (c + (x * y)) - t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = 0.0625d0 * (z * t)
t_2 = (a * b) * 0.25d0
if ((a * b) <= (-2d+70)) then
tmp = (c + t_1) - t_2
else if ((a * b) <= 5d+36) then
tmp = c + ((x * y) + t_1)
else
tmp = (c + (x * y)) - t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = 0.0625 * (z * t);
double t_2 = (a * b) * 0.25;
double tmp;
if ((a * b) <= -2e+70) {
tmp = (c + t_1) - t_2;
} else if ((a * b) <= 5e+36) {
tmp = c + ((x * y) + t_1);
} else {
tmp = (c + (x * y)) - t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = 0.0625 * (z * t) t_2 = (a * b) * 0.25 tmp = 0 if (a * b) <= -2e+70: tmp = (c + t_1) - t_2 elif (a * b) <= 5e+36: tmp = c + ((x * y) + t_1) else: tmp = (c + (x * y)) - t_2 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(0.0625 * Float64(z * t)) t_2 = Float64(Float64(a * b) * 0.25) tmp = 0.0 if (Float64(a * b) <= -2e+70) tmp = Float64(Float64(c + t_1) - t_2); elseif (Float64(a * b) <= 5e+36) tmp = Float64(c + Float64(Float64(x * y) + t_1)); else tmp = Float64(Float64(c + Float64(x * y)) - t_2); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = 0.0625 * (z * t); t_2 = (a * b) * 0.25; tmp = 0.0; if ((a * b) <= -2e+70) tmp = (c + t_1) - t_2; elseif ((a * b) <= 5e+36) tmp = c + ((x * y) + t_1); else tmp = (c + (x * y)) - t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(0.0625 * N[(z * t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(a * b), $MachinePrecision] * 0.25), $MachinePrecision]}, If[LessEqual[N[(a * b), $MachinePrecision], -2e+70], N[(N[(c + t$95$1), $MachinePrecision] - t$95$2), $MachinePrecision], If[LessEqual[N[(a * b), $MachinePrecision], 5e+36], N[(c + N[(N[(x * y), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision], N[(N[(c + N[(x * y), $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 0.0625 \cdot \left(z \cdot t\right)\\
t_2 := \left(a \cdot b\right) \cdot 0.25\\
\mathbf{if}\;a \cdot b \leq -2 \cdot 10^{+70}:\\
\;\;\;\;\left(c + t\_1\right) - t\_2\\
\mathbf{elif}\;a \cdot b \leq 5 \cdot 10^{+36}:\\
\;\;\;\;c + \left(x \cdot y + t\_1\right)\\
\mathbf{else}:\\
\;\;\;\;\left(c + x \cdot y\right) - t\_2\\
\end{array}
\end{array}
if (*.f64 a b) < -2.00000000000000015e70Initial program 97.7%
Taylor expanded in x around 0 89.4%
if -2.00000000000000015e70 < (*.f64 a b) < 4.99999999999999977e36Initial program 100.0%
Taylor expanded in a around 0 96.7%
if 4.99999999999999977e36 < (*.f64 a b) Initial program 95.5%
Taylor expanded in z around 0 95.6%
Final simplification95.1%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* 0.0625 (* z t))))
(if (<= (* a b) -5e+141)
(+ t_1 (* (* a b) -0.25))
(if (<= (* a b) 5e+36)
(+ c (+ (* x y) t_1))
(- (+ c (* x y)) (* (* 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 ((a * b) <= -5e+141) {
tmp = t_1 + ((a * b) * -0.25);
} else if ((a * b) <= 5e+36) {
tmp = c + ((x * y) + t_1);
} else {
tmp = (c + (x * y)) - ((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 ((a * b) <= (-5d+141)) then
tmp = t_1 + ((a * b) * (-0.25d0))
else if ((a * b) <= 5d+36) then
tmp = c + ((x * y) + t_1)
else
tmp = (c + (x * y)) - ((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 ((a * b) <= -5e+141) {
tmp = t_1 + ((a * b) * -0.25);
} else if ((a * b) <= 5e+36) {
tmp = c + ((x * y) + t_1);
} else {
tmp = (c + (x * y)) - ((a * b) * 0.25);
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = 0.0625 * (z * t) tmp = 0 if (a * b) <= -5e+141: tmp = t_1 + ((a * b) * -0.25) elif (a * b) <= 5e+36: tmp = c + ((x * y) + t_1) else: tmp = (c + (x * y)) - ((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(a * b) <= -5e+141) tmp = Float64(t_1 + Float64(Float64(a * b) * -0.25)); elseif (Float64(a * b) <= 5e+36) tmp = Float64(c + Float64(Float64(x * y) + t_1)); else tmp = Float64(Float64(c + Float64(x * y)) - 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 ((a * b) <= -5e+141) tmp = t_1 + ((a * b) * -0.25); elseif ((a * b) <= 5e+36) tmp = c + ((x * y) + t_1); else tmp = (c + (x * y)) - ((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[LessEqual[N[(a * b), $MachinePrecision], -5e+141], N[(t$95$1 + N[(N[(a * b), $MachinePrecision] * -0.25), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * b), $MachinePrecision], 5e+36], N[(c + N[(N[(x * y), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision], N[(N[(c + N[(x * y), $MachinePrecision]), $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}\;a \cdot b \leq -5 \cdot 10^{+141}:\\
\;\;\;\;t\_1 + \left(a \cdot b\right) \cdot -0.25\\
\mathbf{elif}\;a \cdot b \leq 5 \cdot 10^{+36}:\\
\;\;\;\;c + \left(x \cdot y + t\_1\right)\\
\mathbf{else}:\\
\;\;\;\;\left(c + x \cdot y\right) - \left(a \cdot b\right) \cdot 0.25\\
\end{array}
\end{array}
if (*.f64 a b) < -5.00000000000000025e141Initial program 97.0%
Taylor expanded in x around 0 91.6%
Taylor expanded in z around inf 74.3%
Taylor expanded in c around 0 77.8%
Taylor expanded in z around 0 88.6%
if -5.00000000000000025e141 < (*.f64 a b) < 4.99999999999999977e36Initial program 100.0%
Taylor expanded in a around 0 94.9%
if 4.99999999999999977e36 < (*.f64 a b) Initial program 95.5%
Taylor expanded in z around 0 95.6%
Final simplification94.2%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* 0.0625 (* z t))))
(if (<= (* a b) -5e+141)
(+ t_1 (* (* a b) -0.25))
(if (<= (* a b) 2e+66)
(+ c (+ (* x y) t_1))
(- (* x y) (* (* 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 ((a * b) <= -5e+141) {
tmp = t_1 + ((a * b) * -0.25);
} else if ((a * b) <= 2e+66) {
tmp = c + ((x * y) + t_1);
} else {
tmp = (x * y) - ((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 ((a * b) <= (-5d+141)) then
tmp = t_1 + ((a * b) * (-0.25d0))
else if ((a * b) <= 2d+66) then
tmp = c + ((x * y) + t_1)
else
tmp = (x * y) - ((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 ((a * b) <= -5e+141) {
tmp = t_1 + ((a * b) * -0.25);
} else if ((a * b) <= 2e+66) {
tmp = c + ((x * y) + t_1);
} else {
tmp = (x * y) - ((a * b) * 0.25);
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = 0.0625 * (z * t) tmp = 0 if (a * b) <= -5e+141: tmp = t_1 + ((a * b) * -0.25) elif (a * b) <= 2e+66: tmp = c + ((x * y) + t_1) else: tmp = (x * y) - ((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(a * b) <= -5e+141) tmp = Float64(t_1 + Float64(Float64(a * b) * -0.25)); elseif (Float64(a * b) <= 2e+66) tmp = Float64(c + Float64(Float64(x * y) + t_1)); else tmp = Float64(Float64(x * y) - 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 ((a * b) <= -5e+141) tmp = t_1 + ((a * b) * -0.25); elseif ((a * b) <= 2e+66) tmp = c + ((x * y) + t_1); else tmp = (x * y) - ((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[LessEqual[N[(a * b), $MachinePrecision], -5e+141], N[(t$95$1 + N[(N[(a * b), $MachinePrecision] * -0.25), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * b), $MachinePrecision], 2e+66], N[(c + N[(N[(x * y), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision], N[(N[(x * y), $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}\;a \cdot b \leq -5 \cdot 10^{+141}:\\
\;\;\;\;t\_1 + \left(a \cdot b\right) \cdot -0.25\\
\mathbf{elif}\;a \cdot b \leq 2 \cdot 10^{+66}:\\
\;\;\;\;c + \left(x \cdot y + t\_1\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot y - \left(a \cdot b\right) \cdot 0.25\\
\end{array}
\end{array}
if (*.f64 a b) < -5.00000000000000025e141Initial program 97.0%
Taylor expanded in x around 0 91.6%
Taylor expanded in z around inf 74.3%
Taylor expanded in c around 0 77.8%
Taylor expanded in z around 0 88.6%
if -5.00000000000000025e141 < (*.f64 a b) < 1.99999999999999989e66Initial program 100.0%
Taylor expanded in a around 0 94.5%
if 1.99999999999999989e66 < (*.f64 a b) Initial program 95.0%
Taylor expanded in z around 0 95.2%
Taylor expanded in c around 0 84.3%
Final simplification91.3%
(FPCore (x y z t a b c) :precision binary64 (if (or (<= (* x y) -1e+155) (not (<= (* x y) 2e+65))) (+ c (* x y)) (+ c (* 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) <= -1e+155) || !((x * y) <= 2e+65)) {
tmp = c + (x * y);
} else {
tmp = c + (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) <= (-1d+155)) .or. (.not. ((x * y) <= 2d+65))) then
tmp = c + (x * y)
else
tmp = c + (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) <= -1e+155) || !((x * y) <= 2e+65)) {
tmp = c + (x * y);
} else {
tmp = c + (b * (a * -0.25));
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if ((x * y) <= -1e+155) or not ((x * y) <= 2e+65): tmp = c + (x * y) else: tmp = c + (b * (a * -0.25)) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if ((Float64(x * y) <= -1e+155) || !(Float64(x * y) <= 2e+65)) tmp = Float64(c + Float64(x * y)); else tmp = Float64(c + 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) <= -1e+155) || ~(((x * y) <= 2e+65))) tmp = c + (x * y); else tmp = c + (b * (a * -0.25)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[N[(x * y), $MachinePrecision], -1e+155], N[Not[LessEqual[N[(x * y), $MachinePrecision], 2e+65]], $MachinePrecision]], N[(c + N[(x * y), $MachinePrecision]), $MachinePrecision], N[(c + N[(b * N[(a * -0.25), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \cdot y \leq -1 \cdot 10^{+155} \lor \neg \left(x \cdot y \leq 2 \cdot 10^{+65}\right):\\
\;\;\;\;c + x \cdot y\\
\mathbf{else}:\\
\;\;\;\;c + b \cdot \left(a \cdot -0.25\right)\\
\end{array}
\end{array}
if (*.f64 x y) < -1.00000000000000001e155 or 2e65 < (*.f64 x y) Initial program 97.7%
Taylor expanded in x around inf 74.7%
if -1.00000000000000001e155 < (*.f64 x y) < 2e65Initial program 98.8%
Taylor expanded in a around inf 62.5%
*-commutative62.5%
*-commutative62.5%
associate-*r*62.5%
Simplified62.5%
Final simplification66.6%
(FPCore (x y z t a b c) :precision binary64 (if (or (<= (* x y) -1700.0) (not (<= (* x y) 7e+123))) (* x y) c))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (((x * y) <= -1700.0) || !((x * y) <= 7e+123)) {
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) <= (-1700.0d0)) .or. (.not. ((x * y) <= 7d+123))) 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) <= -1700.0) || !((x * y) <= 7e+123)) {
tmp = x * y;
} else {
tmp = c;
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if ((x * y) <= -1700.0) or not ((x * y) <= 7e+123): tmp = x * y else: tmp = c return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if ((Float64(x * y) <= -1700.0) || !(Float64(x * y) <= 7e+123)) 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) <= -1700.0) || ~(((x * y) <= 7e+123))) 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], -1700.0], N[Not[LessEqual[N[(x * y), $MachinePrecision], 7e+123]], $MachinePrecision]], N[(x * y), $MachinePrecision], c]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \cdot y \leq -1700 \lor \neg \left(x \cdot y \leq 7 \cdot 10^{+123}\right):\\
\;\;\;\;x \cdot y\\
\mathbf{else}:\\
\;\;\;\;c\\
\end{array}
\end{array}
if (*.f64 x y) < -1700 or 6.99999999999999999e123 < (*.f64 x y) Initial program 97.0%
Taylor expanded in z around 0 83.1%
Taylor expanded in x around inf 60.3%
if -1700 < (*.f64 x y) < 6.99999999999999999e123Initial program 99.3%
Taylor expanded in c around inf 30.4%
Final simplification42.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 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.4%
herbie shell --seed 2024100
(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))