
(FPCore (x y z t a b c) :precision binary64 (+ (- (+ (* x y) (/ (* z t) 16.0)) (/ (* a b) 4.0)) c))
double code(double x, double y, double z, double t, double a, double b, double c) {
return (((x * y) + ((z * t) / 16.0)) - ((a * b) / 4.0)) + c;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
code = (((x * y) + ((z * t) / 16.0d0)) - ((a * b) / 4.0d0)) + c
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
return (((x * y) + ((z * t) / 16.0)) - ((a * b) / 4.0)) + c;
}
def code(x, y, z, t, a, b, c): return (((x * y) + ((z * t) / 16.0)) - ((a * b) / 4.0)) + c
function code(x, y, z, t, a, b, c) return Float64(Float64(Float64(Float64(x * y) + Float64(Float64(z * t) / 16.0)) - Float64(Float64(a * b) / 4.0)) + c) end
function tmp = code(x, y, z, t, a, b, c) tmp = (((x * y) + ((z * t) / 16.0)) - ((a * b) / 4.0)) + c; end
code[x_, y_, z_, t_, a_, b_, c_] := N[(N[(N[(N[(x * y), $MachinePrecision] + N[(N[(z * t), $MachinePrecision] / 16.0), $MachinePrecision]), $MachinePrecision] - N[(N[(a * b), $MachinePrecision] / 4.0), $MachinePrecision]), $MachinePrecision] + c), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(x \cdot y + \frac{z \cdot t}{16}\right) - \frac{a \cdot b}{4}\right) + c
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 16 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b c) :precision binary64 (+ (- (+ (* x y) (/ (* z t) 16.0)) (/ (* a b) 4.0)) c))
double code(double x, double y, double z, double t, double a, double b, double c) {
return (((x * y) + ((z * t) / 16.0)) - ((a * b) / 4.0)) + c;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
code = (((x * y) + ((z * t) / 16.0d0)) - ((a * b) / 4.0d0)) + c
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
return (((x * y) + ((z * t) / 16.0)) - ((a * b) / 4.0)) + c;
}
def code(x, y, z, t, a, b, c): return (((x * y) + ((z * t) / 16.0)) - ((a * b) / 4.0)) + c
function code(x, y, z, t, a, b, c) return Float64(Float64(Float64(Float64(x * y) + Float64(Float64(z * t) / 16.0)) - Float64(Float64(a * b) / 4.0)) + c) end
function tmp = code(x, y, z, t, a, b, c) tmp = (((x * y) + ((z * t) / 16.0)) - ((a * b) / 4.0)) + c; end
code[x_, y_, z_, t_, a_, b_, c_] := N[(N[(N[(N[(x * y), $MachinePrecision] + N[(N[(z * t), $MachinePrecision] / 16.0), $MachinePrecision]), $MachinePrecision] - N[(N[(a * b), $MachinePrecision] / 4.0), $MachinePrecision]), $MachinePrecision] + c), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(x \cdot y + \frac{z \cdot t}{16}\right) - \frac{a \cdot b}{4}\right) + c
\end{array}
(FPCore (x y z t a b c) :precision binary64 (fma t (/ z 16.0) (fma x y (- c (* b (/ a 4.0))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
return fma(t, (z / 16.0), fma(x, y, (c - (b * (a / 4.0)))));
}
function code(x, y, z, t, a, b, c) return fma(t, Float64(z / 16.0), fma(x, y, Float64(c - Float64(b * Float64(a / 4.0))))) end
code[x_, y_, z_, t_, a_, b_, c_] := N[(t * N[(z / 16.0), $MachinePrecision] + N[(x * y + N[(c - N[(b * N[(a / 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(t, \frac{z}{16}, \mathsf{fma}\left(x, y, c - b \cdot \frac{a}{4}\right)\right)
\end{array}
Initial program 96.8%
associate-+l-96.8%
+-commutative96.8%
associate--l+96.8%
associate-*l/96.8%
*-commutative96.8%
fma-def98.0%
fma-neg99.2%
neg-sub099.2%
associate-+l-99.2%
neg-sub099.2%
+-commutative99.2%
unsub-neg99.2%
*-commutative99.2%
associate-*r/99.2%
Simplified99.2%
Final simplification99.2%
(FPCore (x y z t a b c) :precision binary64 (let* ((t_1 (- (+ (/ (* t z) 16.0) (* x y)) (/ (* b a) 4.0)))) (if (<= t_1 INFINITY) (+ c t_1) (fma y x (* (* b a) -0.25)))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = (((t * z) / 16.0) + (x * y)) - ((b * a) / 4.0);
double tmp;
if (t_1 <= ((double) INFINITY)) {
tmp = c + t_1;
} else {
tmp = fma(y, x, ((b * a) * -0.25));
}
return tmp;
}
function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(Float64(Float64(t * z) / 16.0) + Float64(x * y)) - Float64(Float64(b * a) / 4.0)) tmp = 0.0 if (t_1 <= Inf) tmp = Float64(c + t_1); else tmp = fma(y, x, Float64(Float64(b * a) * -0.25)); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(N[(N[(t * z), $MachinePrecision] / 16.0), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision] - N[(N[(b * a), $MachinePrecision] / 4.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, Infinity], N[(c + t$95$1), $MachinePrecision], N[(y * x + N[(N[(b * a), $MachinePrecision] * -0.25), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(\frac{t \cdot z}{16} + x \cdot y\right) - \frac{b \cdot a}{4}\\
\mathbf{if}\;t_1 \leq \infty:\\
\;\;\;\;c + t_1\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(y, x, \left(b \cdot a\right) \cdot -0.25\right)\\
\end{array}
\end{array}
if (-.f64 (+.f64 (*.f64 x y) (/.f64 (*.f64 z t) 16)) (/.f64 (*.f64 a b) 4)) < +inf.0Initial program 100.0%
if +inf.0 < (-.f64 (+.f64 (*.f64 x y) (/.f64 (*.f64 z t) 16)) (/.f64 (*.f64 a b) 4)) Initial program 0.0%
Taylor expanded in z around 0 37.5%
Taylor expanded in c around 0 37.5%
cancel-sign-sub-inv37.5%
metadata-eval37.5%
fma-def75.0%
Simplified75.0%
Final simplification99.2%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (+ c (* x y)))
(t_2 (+ (* x y) (* 0.0625 (* t z))))
(t_3 (* (* b a) -0.25))
(t_4 (+ c t_3)))
(if (<= (* b a) -1e+247)
t_4
(if (<= (* b a) -1e-215)
t_2
(if (<= (* b a) 2e-290)
t_1
(if (<= (* b a) 1e-250)
t_2
(if (<= (* b a) 1e-161)
t_1
(if (<= (* b a) 2e-120)
(+ c (* t (* z 0.0625)))
(if (<= (* b a) 1e+95)
t_2
(if (<= (* b a) 2e+142)
t_4
(if (<= (* b a) 3e+233) t_2 t_3)))))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = c + (x * y);
double t_2 = (x * y) + (0.0625 * (t * z));
double t_3 = (b * a) * -0.25;
double t_4 = c + t_3;
double tmp;
if ((b * a) <= -1e+247) {
tmp = t_4;
} else if ((b * a) <= -1e-215) {
tmp = t_2;
} else if ((b * a) <= 2e-290) {
tmp = t_1;
} else if ((b * a) <= 1e-250) {
tmp = t_2;
} else if ((b * a) <= 1e-161) {
tmp = t_1;
} else if ((b * a) <= 2e-120) {
tmp = c + (t * (z * 0.0625));
} else if ((b * a) <= 1e+95) {
tmp = t_2;
} else if ((b * a) <= 2e+142) {
tmp = t_4;
} else if ((b * a) <= 3e+233) {
tmp = t_2;
} else {
tmp = t_3;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: tmp
t_1 = c + (x * y)
t_2 = (x * y) + (0.0625d0 * (t * z))
t_3 = (b * a) * (-0.25d0)
t_4 = c + t_3
if ((b * a) <= (-1d+247)) then
tmp = t_4
else if ((b * a) <= (-1d-215)) then
tmp = t_2
else if ((b * a) <= 2d-290) then
tmp = t_1
else if ((b * a) <= 1d-250) then
tmp = t_2
else if ((b * a) <= 1d-161) then
tmp = t_1
else if ((b * a) <= 2d-120) then
tmp = c + (t * (z * 0.0625d0))
else if ((b * a) <= 1d+95) then
tmp = t_2
else if ((b * a) <= 2d+142) then
tmp = t_4
else if ((b * a) <= 3d+233) then
tmp = t_2
else
tmp = t_3
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = c + (x * y);
double t_2 = (x * y) + (0.0625 * (t * z));
double t_3 = (b * a) * -0.25;
double t_4 = c + t_3;
double tmp;
if ((b * a) <= -1e+247) {
tmp = t_4;
} else if ((b * a) <= -1e-215) {
tmp = t_2;
} else if ((b * a) <= 2e-290) {
tmp = t_1;
} else if ((b * a) <= 1e-250) {
tmp = t_2;
} else if ((b * a) <= 1e-161) {
tmp = t_1;
} else if ((b * a) <= 2e-120) {
tmp = c + (t * (z * 0.0625));
} else if ((b * a) <= 1e+95) {
tmp = t_2;
} else if ((b * a) <= 2e+142) {
tmp = t_4;
} else if ((b * a) <= 3e+233) {
tmp = t_2;
} else {
tmp = t_3;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = c + (x * y) t_2 = (x * y) + (0.0625 * (t * z)) t_3 = (b * a) * -0.25 t_4 = c + t_3 tmp = 0 if (b * a) <= -1e+247: tmp = t_4 elif (b * a) <= -1e-215: tmp = t_2 elif (b * a) <= 2e-290: tmp = t_1 elif (b * a) <= 1e-250: tmp = t_2 elif (b * a) <= 1e-161: tmp = t_1 elif (b * a) <= 2e-120: tmp = c + (t * (z * 0.0625)) elif (b * a) <= 1e+95: tmp = t_2 elif (b * a) <= 2e+142: tmp = t_4 elif (b * a) <= 3e+233: tmp = t_2 else: tmp = t_3 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(c + Float64(x * y)) t_2 = Float64(Float64(x * y) + Float64(0.0625 * Float64(t * z))) t_3 = Float64(Float64(b * a) * -0.25) t_4 = Float64(c + t_3) tmp = 0.0 if (Float64(b * a) <= -1e+247) tmp = t_4; elseif (Float64(b * a) <= -1e-215) tmp = t_2; elseif (Float64(b * a) <= 2e-290) tmp = t_1; elseif (Float64(b * a) <= 1e-250) tmp = t_2; elseif (Float64(b * a) <= 1e-161) tmp = t_1; elseif (Float64(b * a) <= 2e-120) tmp = Float64(c + Float64(t * Float64(z * 0.0625))); elseif (Float64(b * a) <= 1e+95) tmp = t_2; elseif (Float64(b * a) <= 2e+142) tmp = t_4; elseif (Float64(b * a) <= 3e+233) tmp = t_2; else tmp = t_3; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = c + (x * y); t_2 = (x * y) + (0.0625 * (t * z)); t_3 = (b * a) * -0.25; t_4 = c + t_3; tmp = 0.0; if ((b * a) <= -1e+247) tmp = t_4; elseif ((b * a) <= -1e-215) tmp = t_2; elseif ((b * a) <= 2e-290) tmp = t_1; elseif ((b * a) <= 1e-250) tmp = t_2; elseif ((b * a) <= 1e-161) tmp = t_1; elseif ((b * a) <= 2e-120) tmp = c + (t * (z * 0.0625)); elseif ((b * a) <= 1e+95) tmp = t_2; elseif ((b * a) <= 2e+142) tmp = t_4; elseif ((b * a) <= 3e+233) tmp = t_2; else tmp = t_3; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(c + N[(x * y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x * y), $MachinePrecision] + N[(0.0625 * N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(b * a), $MachinePrecision] * -0.25), $MachinePrecision]}, Block[{t$95$4 = N[(c + t$95$3), $MachinePrecision]}, If[LessEqual[N[(b * a), $MachinePrecision], -1e+247], t$95$4, If[LessEqual[N[(b * a), $MachinePrecision], -1e-215], t$95$2, If[LessEqual[N[(b * a), $MachinePrecision], 2e-290], t$95$1, If[LessEqual[N[(b * a), $MachinePrecision], 1e-250], t$95$2, If[LessEqual[N[(b * a), $MachinePrecision], 1e-161], t$95$1, If[LessEqual[N[(b * a), $MachinePrecision], 2e-120], N[(c + N[(t * N[(z * 0.0625), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * a), $MachinePrecision], 1e+95], t$95$2, If[LessEqual[N[(b * a), $MachinePrecision], 2e+142], t$95$4, If[LessEqual[N[(b * a), $MachinePrecision], 3e+233], t$95$2, t$95$3]]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := c + x \cdot y\\
t_2 := x \cdot y + 0.0625 \cdot \left(t \cdot z\right)\\
t_3 := \left(b \cdot a\right) \cdot -0.25\\
t_4 := c + t_3\\
\mathbf{if}\;b \cdot a \leq -1 \cdot 10^{+247}:\\
\;\;\;\;t_4\\
\mathbf{elif}\;b \cdot a \leq -1 \cdot 10^{-215}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;b \cdot a \leq 2 \cdot 10^{-290}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \cdot a \leq 10^{-250}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;b \cdot a \leq 10^{-161}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \cdot a \leq 2 \cdot 10^{-120}:\\
\;\;\;\;c + t \cdot \left(z \cdot 0.0625\right)\\
\mathbf{elif}\;b \cdot a \leq 10^{+95}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;b \cdot a \leq 2 \cdot 10^{+142}:\\
\;\;\;\;t_4\\
\mathbf{elif}\;b \cdot a \leq 3 \cdot 10^{+233}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_3\\
\end{array}
\end{array}
if (*.f64 a b) < -9.99999999999999952e246 or 1.00000000000000002e95 < (*.f64 a b) < 2.0000000000000001e142Initial program 94.3%
Taylor expanded in a around inf 86.2%
*-commutative86.2%
Simplified86.2%
if -9.99999999999999952e246 < (*.f64 a b) < -1.00000000000000004e-215 or 2.0000000000000001e-290 < (*.f64 a b) < 1.0000000000000001e-250 or 1.99999999999999996e-120 < (*.f64 a b) < 1.00000000000000002e95 or 2.0000000000000001e142 < (*.f64 a b) < 3.00000000000000014e233Initial program 99.9%
associate-+l-99.9%
+-commutative99.9%
associate--l+99.9%
+-commutative99.9%
associate-+l-99.9%
fma-neg100.0%
neg-sub0100.0%
associate--l-100.0%
associate-+l-100.0%
neg-sub0100.0%
*-commutative100.0%
associate-*r/100.0%
distribute-rgt-neg-in100.0%
fma-def100.0%
distribute-frac-neg100.0%
neg-mul-1100.0%
associate-/l*100.0%
associate-/r/100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in b around 0 88.9%
Taylor expanded in c around 0 76.0%
if -1.00000000000000004e-215 < (*.f64 a b) < 2.0000000000000001e-290 or 1.0000000000000001e-250 < (*.f64 a b) < 1.00000000000000003e-161Initial program 98.4%
Taylor expanded in x around inf 86.4%
if 1.00000000000000003e-161 < (*.f64 a b) < 1.99999999999999996e-120Initial program 100.0%
Taylor expanded in z around inf 100.0%
*-commutative100.0%
associate-*r*100.0%
*-commutative100.0%
Simplified100.0%
if 3.00000000000000014e233 < (*.f64 a b) Initial program 80.0%
Taylor expanded in a around inf 84.9%
*-commutative84.9%
Simplified84.9%
Taylor expanded in a around inf 84.9%
Final simplification81.6%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (+ c (* t (* z 0.0625))))
(t_2 (+ c (* x y)))
(t_3 (* (* b a) -0.25)))
(if (<= (* b a) -5e+185)
t_3
(if (<= (* b a) -1e-215)
t_1
(if (<= (* b a) 1e-161)
t_2
(if (<= (* b a) 2e-120)
t_1
(if (<= (* b a) 1e+26)
t_2
(if (<= (* b a) 1e+159)
t_1
(if (<= (* b a) 3e+233) t_2 t_3)))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = c + (t * (z * 0.0625));
double t_2 = c + (x * y);
double t_3 = (b * a) * -0.25;
double tmp;
if ((b * a) <= -5e+185) {
tmp = t_3;
} else if ((b * a) <= -1e-215) {
tmp = t_1;
} else if ((b * a) <= 1e-161) {
tmp = t_2;
} else if ((b * a) <= 2e-120) {
tmp = t_1;
} else if ((b * a) <= 1e+26) {
tmp = t_2;
} else if ((b * a) <= 1e+159) {
tmp = t_1;
} else if ((b * a) <= 3e+233) {
tmp = t_2;
} else {
tmp = t_3;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = c + (t * (z * 0.0625d0))
t_2 = c + (x * y)
t_3 = (b * a) * (-0.25d0)
if ((b * a) <= (-5d+185)) then
tmp = t_3
else if ((b * a) <= (-1d-215)) then
tmp = t_1
else if ((b * a) <= 1d-161) then
tmp = t_2
else if ((b * a) <= 2d-120) then
tmp = t_1
else if ((b * a) <= 1d+26) then
tmp = t_2
else if ((b * a) <= 1d+159) then
tmp = t_1
else if ((b * a) <= 3d+233) then
tmp = t_2
else
tmp = t_3
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = c + (t * (z * 0.0625));
double t_2 = c + (x * y);
double t_3 = (b * a) * -0.25;
double tmp;
if ((b * a) <= -5e+185) {
tmp = t_3;
} else if ((b * a) <= -1e-215) {
tmp = t_1;
} else if ((b * a) <= 1e-161) {
tmp = t_2;
} else if ((b * a) <= 2e-120) {
tmp = t_1;
} else if ((b * a) <= 1e+26) {
tmp = t_2;
} else if ((b * a) <= 1e+159) {
tmp = t_1;
} else if ((b * a) <= 3e+233) {
tmp = t_2;
} else {
tmp = t_3;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = c + (t * (z * 0.0625)) t_2 = c + (x * y) t_3 = (b * a) * -0.25 tmp = 0 if (b * a) <= -5e+185: tmp = t_3 elif (b * a) <= -1e-215: tmp = t_1 elif (b * a) <= 1e-161: tmp = t_2 elif (b * a) <= 2e-120: tmp = t_1 elif (b * a) <= 1e+26: tmp = t_2 elif (b * a) <= 1e+159: tmp = t_1 elif (b * a) <= 3e+233: tmp = t_2 else: tmp = t_3 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(c + Float64(t * Float64(z * 0.0625))) t_2 = Float64(c + Float64(x * y)) t_3 = Float64(Float64(b * a) * -0.25) tmp = 0.0 if (Float64(b * a) <= -5e+185) tmp = t_3; elseif (Float64(b * a) <= -1e-215) tmp = t_1; elseif (Float64(b * a) <= 1e-161) tmp = t_2; elseif (Float64(b * a) <= 2e-120) tmp = t_1; elseif (Float64(b * a) <= 1e+26) tmp = t_2; elseif (Float64(b * a) <= 1e+159) tmp = t_1; elseif (Float64(b * a) <= 3e+233) tmp = t_2; else tmp = t_3; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = c + (t * (z * 0.0625)); t_2 = c + (x * y); t_3 = (b * a) * -0.25; tmp = 0.0; if ((b * a) <= -5e+185) tmp = t_3; elseif ((b * a) <= -1e-215) tmp = t_1; elseif ((b * a) <= 1e-161) tmp = t_2; elseif ((b * a) <= 2e-120) tmp = t_1; elseif ((b * a) <= 1e+26) tmp = t_2; elseif ((b * a) <= 1e+159) tmp = t_1; elseif ((b * a) <= 3e+233) tmp = t_2; else tmp = t_3; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(c + N[(t * N[(z * 0.0625), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(c + N[(x * y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(b * a), $MachinePrecision] * -0.25), $MachinePrecision]}, If[LessEqual[N[(b * a), $MachinePrecision], -5e+185], t$95$3, If[LessEqual[N[(b * a), $MachinePrecision], -1e-215], t$95$1, If[LessEqual[N[(b * a), $MachinePrecision], 1e-161], t$95$2, If[LessEqual[N[(b * a), $MachinePrecision], 2e-120], t$95$1, If[LessEqual[N[(b * a), $MachinePrecision], 1e+26], t$95$2, If[LessEqual[N[(b * a), $MachinePrecision], 1e+159], t$95$1, If[LessEqual[N[(b * a), $MachinePrecision], 3e+233], t$95$2, t$95$3]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := c + t \cdot \left(z \cdot 0.0625\right)\\
t_2 := c + x \cdot y\\
t_3 := \left(b \cdot a\right) \cdot -0.25\\
\mathbf{if}\;b \cdot a \leq -5 \cdot 10^{+185}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;b \cdot a \leq -1 \cdot 10^{-215}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \cdot a \leq 10^{-161}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;b \cdot a \leq 2 \cdot 10^{-120}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \cdot a \leq 10^{+26}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;b \cdot a \leq 10^{+159}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \cdot a \leq 3 \cdot 10^{+233}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_3\\
\end{array}
\end{array}
if (*.f64 a b) < -4.9999999999999999e185 or 3.00000000000000014e233 < (*.f64 a b) Initial program 87.9%
Taylor expanded in a around inf 80.4%
*-commutative80.4%
Simplified80.4%
Taylor expanded in a around inf 78.7%
if -4.9999999999999999e185 < (*.f64 a b) < -1.00000000000000004e-215 or 1.00000000000000003e-161 < (*.f64 a b) < 1.99999999999999996e-120 or 1.00000000000000005e26 < (*.f64 a b) < 9.9999999999999993e158Initial program 99.9%
Taylor expanded in z around inf 64.1%
*-commutative64.1%
associate-*r*64.1%
*-commutative64.1%
Simplified64.1%
if -1.00000000000000004e-215 < (*.f64 a b) < 1.00000000000000003e-161 or 1.99999999999999996e-120 < (*.f64 a b) < 1.00000000000000005e26 or 9.9999999999999993e158 < (*.f64 a b) < 3.00000000000000014e233Initial program 99.0%
Taylor expanded in x around inf 77.6%
Final simplification72.9%
(FPCore (x y z t a b c) :precision binary64 (let* ((t_1 (- (+ (/ (* t z) 16.0) (* x y)) (/ (* b a) 4.0)))) (if (<= t_1 INFINITY) (+ c t_1) (+ c (* (* b a) -0.25)))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = (((t * z) / 16.0) + (x * y)) - ((b * a) / 4.0);
double tmp;
if (t_1 <= ((double) INFINITY)) {
tmp = c + t_1;
} else {
tmp = c + ((b * a) * -0.25);
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = (((t * z) / 16.0) + (x * y)) - ((b * a) / 4.0);
double tmp;
if (t_1 <= Double.POSITIVE_INFINITY) {
tmp = c + t_1;
} else {
tmp = c + ((b * a) * -0.25);
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = (((t * z) / 16.0) + (x * y)) - ((b * a) / 4.0) tmp = 0 if t_1 <= math.inf: tmp = c + t_1 else: tmp = c + ((b * a) * -0.25) return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(Float64(Float64(t * z) / 16.0) + Float64(x * y)) - Float64(Float64(b * a) / 4.0)) tmp = 0.0 if (t_1 <= Inf) tmp = Float64(c + t_1); else tmp = Float64(c + Float64(Float64(b * a) * -0.25)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = (((t * z) / 16.0) + (x * y)) - ((b * a) / 4.0); tmp = 0.0; if (t_1 <= Inf) tmp = c + t_1; else tmp = c + ((b * a) * -0.25); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(N[(N[(t * z), $MachinePrecision] / 16.0), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision] - N[(N[(b * a), $MachinePrecision] / 4.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, Infinity], N[(c + t$95$1), $MachinePrecision], N[(c + N[(N[(b * a), $MachinePrecision] * -0.25), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(\frac{t \cdot z}{16} + x \cdot y\right) - \frac{b \cdot a}{4}\\
\mathbf{if}\;t_1 \leq \infty:\\
\;\;\;\;c + t_1\\
\mathbf{else}:\\
\;\;\;\;c + \left(b \cdot a\right) \cdot -0.25\\
\end{array}
\end{array}
if (-.f64 (+.f64 (*.f64 x y) (/.f64 (*.f64 z t) 16)) (/.f64 (*.f64 a b) 4)) < +inf.0Initial program 100.0%
if +inf.0 < (-.f64 (+.f64 (*.f64 x y) (/.f64 (*.f64 z t) 16)) (/.f64 (*.f64 a b) 4)) Initial program 0.0%
Taylor expanded in a around inf 62.9%
*-commutative62.9%
Simplified62.9%
Final simplification98.8%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (+ c (* t (* z 0.0625))))
(t_2 (+ c (* (* b a) -0.25)))
(t_3 (+ c (* x y))))
(if (<= (* b a) -5e+185)
t_2
(if (<= (* b a) -1e-215)
t_1
(if (<= (* b a) 1e-161)
t_3
(if (<= (* b a) 2e-120) t_1 (if (<= (* b a) 1e+27) 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 = c + ((b * a) * -0.25);
double t_3 = c + (x * y);
double tmp;
if ((b * a) <= -5e+185) {
tmp = t_2;
} else if ((b * a) <= -1e-215) {
tmp = t_1;
} else if ((b * a) <= 1e-161) {
tmp = t_3;
} else if ((b * a) <= 2e-120) {
tmp = t_1;
} else if ((b * a) <= 1e+27) {
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 = c + ((b * a) * (-0.25d0))
t_3 = c + (x * y)
if ((b * a) <= (-5d+185)) then
tmp = t_2
else if ((b * a) <= (-1d-215)) then
tmp = t_1
else if ((b * a) <= 1d-161) then
tmp = t_3
else if ((b * a) <= 2d-120) then
tmp = t_1
else if ((b * a) <= 1d+27) 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 = c + ((b * a) * -0.25);
double t_3 = c + (x * y);
double tmp;
if ((b * a) <= -5e+185) {
tmp = t_2;
} else if ((b * a) <= -1e-215) {
tmp = t_1;
} else if ((b * a) <= 1e-161) {
tmp = t_3;
} else if ((b * a) <= 2e-120) {
tmp = t_1;
} else if ((b * a) <= 1e+27) {
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 = c + ((b * a) * -0.25) t_3 = c + (x * y) tmp = 0 if (b * a) <= -5e+185: tmp = t_2 elif (b * a) <= -1e-215: tmp = t_1 elif (b * a) <= 1e-161: tmp = t_3 elif (b * a) <= 2e-120: tmp = t_1 elif (b * a) <= 1e+27: 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(c + Float64(Float64(b * a) * -0.25)) t_3 = Float64(c + Float64(x * y)) tmp = 0.0 if (Float64(b * a) <= -5e+185) tmp = t_2; elseif (Float64(b * a) <= -1e-215) tmp = t_1; elseif (Float64(b * a) <= 1e-161) tmp = t_3; elseif (Float64(b * a) <= 2e-120) tmp = t_1; elseif (Float64(b * a) <= 1e+27) 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 = c + ((b * a) * -0.25); t_3 = c + (x * y); tmp = 0.0; if ((b * a) <= -5e+185) tmp = t_2; elseif ((b * a) <= -1e-215) tmp = t_1; elseif ((b * a) <= 1e-161) tmp = t_3; elseif ((b * a) <= 2e-120) tmp = t_1; elseif ((b * a) <= 1e+27) 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[(c + N[(N[(b * a), $MachinePrecision] * -0.25), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(c + N[(x * y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b * a), $MachinePrecision], -5e+185], t$95$2, If[LessEqual[N[(b * a), $MachinePrecision], -1e-215], t$95$1, If[LessEqual[N[(b * a), $MachinePrecision], 1e-161], t$95$3, If[LessEqual[N[(b * a), $MachinePrecision], 2e-120], t$95$1, If[LessEqual[N[(b * a), $MachinePrecision], 1e+27], 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 := c + \left(b \cdot a\right) \cdot -0.25\\
t_3 := c + x \cdot y\\
\mathbf{if}\;b \cdot a \leq -5 \cdot 10^{+185}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;b \cdot a \leq -1 \cdot 10^{-215}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \cdot a \leq 10^{-161}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;b \cdot a \leq 2 \cdot 10^{-120}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \cdot a \leq 10^{+27}:\\
\;\;\;\;t_3\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if (*.f64 a b) < -4.9999999999999999e185 or 1e27 < (*.f64 a b) Initial program 92.0%
Taylor expanded in a around inf 69.2%
*-commutative69.2%
Simplified69.2%
if -4.9999999999999999e185 < (*.f64 a b) < -1.00000000000000004e-215 or 1.00000000000000003e-161 < (*.f64 a b) < 1.99999999999999996e-120Initial program 99.9%
Taylor expanded in z around inf 66.6%
*-commutative66.6%
associate-*r*66.6%
*-commutative66.6%
Simplified66.6%
if -1.00000000000000004e-215 < (*.f64 a b) < 1.00000000000000003e-161 or 1.99999999999999996e-120 < (*.f64 a b) < 1e27Initial program 99.0%
Taylor expanded in x around inf 77.9%
Final simplification71.7%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* 0.0625 (* t z))) (t_2 (* (* b a) -0.25)))
(if (<= (* b a) -5e+185)
t_2
(if (<= (* b a) -5e-102)
t_1
(if (<= (* b a) 5e-157)
(* x y)
(if (<= (* b a) 2e-120) t_1 (if (<= (* b a) 1e+27) (* 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 * (t * z);
double t_2 = (b * a) * -0.25;
double tmp;
if ((b * a) <= -5e+185) {
tmp = t_2;
} else if ((b * a) <= -5e-102) {
tmp = t_1;
} else if ((b * a) <= 5e-157) {
tmp = x * y;
} else if ((b * a) <= 2e-120) {
tmp = t_1;
} else if ((b * a) <= 1e+27) {
tmp = x * y;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = 0.0625d0 * (t * z)
t_2 = (b * a) * (-0.25d0)
if ((b * a) <= (-5d+185)) then
tmp = t_2
else if ((b * a) <= (-5d-102)) then
tmp = t_1
else if ((b * a) <= 5d-157) then
tmp = x * y
else if ((b * a) <= 2d-120) then
tmp = t_1
else if ((b * a) <= 1d+27) then
tmp = x * y
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = 0.0625 * (t * z);
double t_2 = (b * a) * -0.25;
double tmp;
if ((b * a) <= -5e+185) {
tmp = t_2;
} else if ((b * a) <= -5e-102) {
tmp = t_1;
} else if ((b * a) <= 5e-157) {
tmp = x * y;
} else if ((b * a) <= 2e-120) {
tmp = t_1;
} else if ((b * a) <= 1e+27) {
tmp = x * y;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = 0.0625 * (t * z) t_2 = (b * a) * -0.25 tmp = 0 if (b * a) <= -5e+185: tmp = t_2 elif (b * a) <= -5e-102: tmp = t_1 elif (b * a) <= 5e-157: tmp = x * y elif (b * a) <= 2e-120: tmp = t_1 elif (b * a) <= 1e+27: tmp = x * y else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(0.0625 * Float64(t * z)) t_2 = Float64(Float64(b * a) * -0.25) tmp = 0.0 if (Float64(b * a) <= -5e+185) tmp = t_2; elseif (Float64(b * a) <= -5e-102) tmp = t_1; elseif (Float64(b * a) <= 5e-157) tmp = Float64(x * y); elseif (Float64(b * a) <= 2e-120) tmp = t_1; elseif (Float64(b * a) <= 1e+27) tmp = Float64(x * y); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = 0.0625 * (t * z); t_2 = (b * a) * -0.25; tmp = 0.0; if ((b * a) <= -5e+185) tmp = t_2; elseif ((b * a) <= -5e-102) tmp = t_1; elseif ((b * a) <= 5e-157) tmp = x * y; elseif ((b * a) <= 2e-120) tmp = t_1; elseif ((b * a) <= 1e+27) tmp = x * y; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(0.0625 * N[(t * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(b * a), $MachinePrecision] * -0.25), $MachinePrecision]}, If[LessEqual[N[(b * a), $MachinePrecision], -5e+185], t$95$2, If[LessEqual[N[(b * a), $MachinePrecision], -5e-102], t$95$1, If[LessEqual[N[(b * a), $MachinePrecision], 5e-157], N[(x * y), $MachinePrecision], If[LessEqual[N[(b * a), $MachinePrecision], 2e-120], t$95$1, If[LessEqual[N[(b * a), $MachinePrecision], 1e+27], N[(x * y), $MachinePrecision], t$95$2]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 0.0625 \cdot \left(t \cdot z\right)\\
t_2 := \left(b \cdot a\right) \cdot -0.25\\
\mathbf{if}\;b \cdot a \leq -5 \cdot 10^{+185}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;b \cdot a \leq -5 \cdot 10^{-102}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \cdot a \leq 5 \cdot 10^{-157}:\\
\;\;\;\;x \cdot y\\
\mathbf{elif}\;b \cdot a \leq 2 \cdot 10^{-120}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \cdot a \leq 10^{+27}:\\
\;\;\;\;x \cdot y\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if (*.f64 a b) < -4.9999999999999999e185 or 1e27 < (*.f64 a b) Initial program 92.0%
Taylor expanded in a around inf 69.2%
*-commutative69.2%
Simplified69.2%
Taylor expanded in a around inf 63.6%
if -4.9999999999999999e185 < (*.f64 a b) < -5.00000000000000026e-102 or 5.0000000000000002e-157 < (*.f64 a b) < 1.99999999999999996e-120Initial program 99.9%
associate-+l-99.9%
+-commutative99.9%
associate--l+99.9%
+-commutative99.9%
associate-+l-99.9%
fma-neg99.9%
neg-sub099.9%
associate--l-99.9%
associate-+l-99.9%
neg-sub099.9%
*-commutative99.9%
associate-*r/99.9%
distribute-rgt-neg-in99.9%
fma-def99.9%
distribute-frac-neg99.9%
neg-mul-199.9%
associate-/l*99.9%
associate-/r/99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in b around 0 88.5%
Taylor expanded in t around inf 48.7%
if -5.00000000000000026e-102 < (*.f64 a b) < 5.0000000000000002e-157 or 1.99999999999999996e-120 < (*.f64 a b) < 1e27Initial program 99.1%
associate-+l-99.1%
+-commutative99.1%
associate--l+99.1%
+-commutative99.1%
associate-+l-99.1%
fma-neg99.1%
neg-sub099.1%
associate--l-99.1%
associate-+l-99.1%
neg-sub099.1%
*-commutative99.1%
associate-*r/99.1%
distribute-rgt-neg-in99.1%
fma-def99.1%
distribute-frac-neg99.1%
neg-mul-199.1%
associate-/l*99.1%
associate-/r/99.1%
metadata-eval99.1%
Simplified99.1%
Taylor expanded in b around 0 98.7%
Taylor expanded in x around inf 48.3%
Final simplification53.6%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (+ (* x y) (* 0.0625 (* t z))))
(t_2 (- (* x y) (* (* b a) 0.25)))
(t_3 (+ c (* x y))))
(if (<= a -1.15e+74)
t_2
(if (<= a -6.2e-15)
t_1
(if (<= a -2.1e-60)
t_3
(if (<= a -9.8e-210)
t_1
(if (<= a 1.6e-194)
t_3
(if (<= a 9.6e-27) (+ c (* t (* z 0.0625))) t_2))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = (x * y) + (0.0625 * (t * z));
double t_2 = (x * y) - ((b * a) * 0.25);
double t_3 = c + (x * y);
double tmp;
if (a <= -1.15e+74) {
tmp = t_2;
} else if (a <= -6.2e-15) {
tmp = t_1;
} else if (a <= -2.1e-60) {
tmp = t_3;
} else if (a <= -9.8e-210) {
tmp = t_1;
} else if (a <= 1.6e-194) {
tmp = t_3;
} else if (a <= 9.6e-27) {
tmp = c + (t * (z * 0.0625));
} 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 = (x * y) + (0.0625d0 * (t * z))
t_2 = (x * y) - ((b * a) * 0.25d0)
t_3 = c + (x * y)
if (a <= (-1.15d+74)) then
tmp = t_2
else if (a <= (-6.2d-15)) then
tmp = t_1
else if (a <= (-2.1d-60)) then
tmp = t_3
else if (a <= (-9.8d-210)) then
tmp = t_1
else if (a <= 1.6d-194) then
tmp = t_3
else if (a <= 9.6d-27) then
tmp = c + (t * (z * 0.0625d0))
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 = (x * y) + (0.0625 * (t * z));
double t_2 = (x * y) - ((b * a) * 0.25);
double t_3 = c + (x * y);
double tmp;
if (a <= -1.15e+74) {
tmp = t_2;
} else if (a <= -6.2e-15) {
tmp = t_1;
} else if (a <= -2.1e-60) {
tmp = t_3;
} else if (a <= -9.8e-210) {
tmp = t_1;
} else if (a <= 1.6e-194) {
tmp = t_3;
} else if (a <= 9.6e-27) {
tmp = c + (t * (z * 0.0625));
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = (x * y) + (0.0625 * (t * z)) t_2 = (x * y) - ((b * a) * 0.25) t_3 = c + (x * y) tmp = 0 if a <= -1.15e+74: tmp = t_2 elif a <= -6.2e-15: tmp = t_1 elif a <= -2.1e-60: tmp = t_3 elif a <= -9.8e-210: tmp = t_1 elif a <= 1.6e-194: tmp = t_3 elif a <= 9.6e-27: tmp = c + (t * (z * 0.0625)) else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(x * y) + Float64(0.0625 * Float64(t * z))) t_2 = Float64(Float64(x * y) - Float64(Float64(b * a) * 0.25)) t_3 = Float64(c + Float64(x * y)) tmp = 0.0 if (a <= -1.15e+74) tmp = t_2; elseif (a <= -6.2e-15) tmp = t_1; elseif (a <= -2.1e-60) tmp = t_3; elseif (a <= -9.8e-210) tmp = t_1; elseif (a <= 1.6e-194) tmp = t_3; elseif (a <= 9.6e-27) tmp = Float64(c + Float64(t * Float64(z * 0.0625))); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = (x * y) + (0.0625 * (t * z)); t_2 = (x * y) - ((b * a) * 0.25); t_3 = c + (x * y); tmp = 0.0; if (a <= -1.15e+74) tmp = t_2; elseif (a <= -6.2e-15) tmp = t_1; elseif (a <= -2.1e-60) tmp = t_3; elseif (a <= -9.8e-210) tmp = t_1; elseif (a <= 1.6e-194) tmp = t_3; elseif (a <= 9.6e-27) tmp = c + (t * (z * 0.0625)); else tmp = t_2; 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[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x * y), $MachinePrecision] - N[(N[(b * a), $MachinePrecision] * 0.25), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(c + N[(x * y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -1.15e+74], t$95$2, If[LessEqual[a, -6.2e-15], t$95$1, If[LessEqual[a, -2.1e-60], t$95$3, If[LessEqual[a, -9.8e-210], t$95$1, If[LessEqual[a, 1.6e-194], t$95$3, If[LessEqual[a, 9.6e-27], N[(c + N[(t * N[(z * 0.0625), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot y + 0.0625 \cdot \left(t \cdot z\right)\\
t_2 := x \cdot y - \left(b \cdot a\right) \cdot 0.25\\
t_3 := c + x \cdot y\\
\mathbf{if}\;a \leq -1.15 \cdot 10^{+74}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;a \leq -6.2 \cdot 10^{-15}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq -2.1 \cdot 10^{-60}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;a \leq -9.8 \cdot 10^{-210}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq 1.6 \cdot 10^{-194}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;a \leq 9.6 \cdot 10^{-27}:\\
\;\;\;\;c + t \cdot \left(z \cdot 0.0625\right)\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if a < -1.1499999999999999e74 or 9.60000000000000008e-27 < a Initial program 92.5%
Taylor expanded in z around 0 72.9%
Taylor expanded in c around 0 67.4%
if -1.1499999999999999e74 < a < -6.1999999999999998e-15 or -2.09999999999999991e-60 < a < -9.7999999999999996e-210Initial program 100.0%
associate-+l-100.0%
+-commutative100.0%
associate--l+100.0%
+-commutative100.0%
associate-+l-100.0%
fma-neg100.0%
neg-sub0100.0%
associate--l-100.0%
associate-+l-100.0%
neg-sub0100.0%
*-commutative100.0%
associate-*r/100.0%
distribute-rgt-neg-in100.0%
fma-def100.0%
distribute-frac-neg100.0%
neg-mul-1100.0%
associate-/l*100.0%
associate-/r/100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in b around 0 95.9%
Taylor expanded in c around 0 70.2%
if -6.1999999999999998e-15 < a < -2.09999999999999991e-60 or -9.7999999999999996e-210 < a < 1.6000000000000001e-194Initial program 100.0%
Taylor expanded in x around inf 74.0%
if 1.6000000000000001e-194 < a < 9.60000000000000008e-27Initial program 99.9%
Taylor expanded in z around inf 59.2%
*-commutative59.2%
associate-*r*59.2%
*-commutative59.2%
Simplified59.2%
Final simplification68.7%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (+ c (* x y))) (t_2 (* (* b a) -0.25)))
(if (<= (* b a) -5e+258)
t_2
(if (<= (* b a) -2000000000000.0)
t_1
(if (<= (* b a) -5e-23)
(* 0.0625 (* t z))
(if (<= (* b a) 3e+233) 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 ((b * a) <= -5e+258) {
tmp = t_2;
} else if ((b * a) <= -2000000000000.0) {
tmp = t_1;
} else if ((b * a) <= -5e-23) {
tmp = 0.0625 * (t * z);
} else if ((b * a) <= 3e+233) {
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 ((b * a) <= (-5d+258)) then
tmp = t_2
else if ((b * a) <= (-2000000000000.0d0)) then
tmp = t_1
else if ((b * a) <= (-5d-23)) then
tmp = 0.0625d0 * (t * z)
else if ((b * a) <= 3d+233) 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 ((b * a) <= -5e+258) {
tmp = t_2;
} else if ((b * a) <= -2000000000000.0) {
tmp = t_1;
} else if ((b * a) <= -5e-23) {
tmp = 0.0625 * (t * z);
} else if ((b * a) <= 3e+233) {
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 (b * a) <= -5e+258: tmp = t_2 elif (b * a) <= -2000000000000.0: tmp = t_1 elif (b * a) <= -5e-23: tmp = 0.0625 * (t * z) elif (b * a) <= 3e+233: 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(Float64(b * a) * -0.25) tmp = 0.0 if (Float64(b * a) <= -5e+258) tmp = t_2; elseif (Float64(b * a) <= -2000000000000.0) tmp = t_1; elseif (Float64(b * a) <= -5e-23) tmp = Float64(0.0625 * Float64(t * z)); elseif (Float64(b * a) <= 3e+233) 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 ((b * a) <= -5e+258) tmp = t_2; elseif ((b * a) <= -2000000000000.0) tmp = t_1; elseif ((b * a) <= -5e-23) tmp = 0.0625 * (t * z); elseif ((b * a) <= 3e+233) 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[(N[(b * a), $MachinePrecision] * -0.25), $MachinePrecision]}, If[LessEqual[N[(b * a), $MachinePrecision], -5e+258], t$95$2, If[LessEqual[N[(b * a), $MachinePrecision], -2000000000000.0], t$95$1, If[LessEqual[N[(b * a), $MachinePrecision], -5e-23], N[(0.0625 * N[(t * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * a), $MachinePrecision], 3e+233], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := c + x \cdot y\\
t_2 := \left(b \cdot a\right) \cdot -0.25\\
\mathbf{if}\;b \cdot a \leq -5 \cdot 10^{+258}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;b \cdot a \leq -2000000000000:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \cdot a \leq -5 \cdot 10^{-23}:\\
\;\;\;\;0.0625 \cdot \left(t \cdot z\right)\\
\mathbf{elif}\;b \cdot a \leq 3 \cdot 10^{+233}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if (*.f64 a b) < -5e258 or 3.00000000000000014e233 < (*.f64 a b) Initial program 86.0%
Taylor expanded in a around inf 86.6%
*-commutative86.6%
Simplified86.6%
Taylor expanded in a around inf 86.6%
if -5e258 < (*.f64 a b) < -2e12 or -5.0000000000000002e-23 < (*.f64 a b) < 3.00000000000000014e233Initial program 99.5%
Taylor expanded in x around inf 63.3%
if -2e12 < (*.f64 a b) < -5.0000000000000002e-23Initial program 100.0%
associate-+l-100.0%
+-commutative100.0%
associate--l+100.0%
+-commutative100.0%
associate-+l-100.0%
fma-neg100.0%
neg-sub0100.0%
associate--l-100.0%
associate-+l-100.0%
neg-sub0100.0%
*-commutative100.0%
associate-*r/100.0%
distribute-rgt-neg-in100.0%
fma-def100.0%
distribute-frac-neg100.0%
neg-mul-1100.0%
associate-/l*100.0%
associate-/r/100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in b around 0 100.0%
Taylor expanded in t around inf 100.0%
Final simplification68.9%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* (* b a) 0.25)) (t_2 (* 0.0625 (* t z))))
(if (<= (* b a) -5e+185)
(- (+ c (* x y)) t_1)
(if (<= (* b a) 5e+54) (+ c (+ (* x y) t_2)) (- (+ c t_2) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = (b * a) * 0.25;
double t_2 = 0.0625 * (t * z);
double tmp;
if ((b * a) <= -5e+185) {
tmp = (c + (x * y)) - t_1;
} else if ((b * a) <= 5e+54) {
tmp = c + ((x * y) + t_2);
} else {
tmp = (c + t_2) - t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (b * a) * 0.25d0
t_2 = 0.0625d0 * (t * z)
if ((b * a) <= (-5d+185)) then
tmp = (c + (x * y)) - t_1
else if ((b * a) <= 5d+54) then
tmp = c + ((x * y) + t_2)
else
tmp = (c + t_2) - t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = (b * a) * 0.25;
double t_2 = 0.0625 * (t * z);
double tmp;
if ((b * a) <= -5e+185) {
tmp = (c + (x * y)) - t_1;
} else if ((b * a) <= 5e+54) {
tmp = c + ((x * y) + t_2);
} else {
tmp = (c + t_2) - t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = (b * a) * 0.25 t_2 = 0.0625 * (t * z) tmp = 0 if (b * a) <= -5e+185: tmp = (c + (x * y)) - t_1 elif (b * a) <= 5e+54: tmp = c + ((x * y) + t_2) else: tmp = (c + t_2) - t_1 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(b * a) * 0.25) t_2 = Float64(0.0625 * Float64(t * z)) tmp = 0.0 if (Float64(b * a) <= -5e+185) tmp = Float64(Float64(c + Float64(x * y)) - t_1); elseif (Float64(b * a) <= 5e+54) tmp = Float64(c + Float64(Float64(x * y) + t_2)); else tmp = Float64(Float64(c + t_2) - t_1); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = (b * a) * 0.25; t_2 = 0.0625 * (t * z); tmp = 0.0; if ((b * a) <= -5e+185) tmp = (c + (x * y)) - t_1; elseif ((b * a) <= 5e+54) tmp = c + ((x * y) + t_2); else tmp = (c + t_2) - t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(b * a), $MachinePrecision] * 0.25), $MachinePrecision]}, Block[{t$95$2 = N[(0.0625 * N[(t * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b * a), $MachinePrecision], -5e+185], N[(N[(c + N[(x * y), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[N[(b * a), $MachinePrecision], 5e+54], N[(c + N[(N[(x * y), $MachinePrecision] + t$95$2), $MachinePrecision]), $MachinePrecision], N[(N[(c + t$95$2), $MachinePrecision] - t$95$1), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(b \cdot a\right) \cdot 0.25\\
t_2 := 0.0625 \cdot \left(t \cdot z\right)\\
\mathbf{if}\;b \cdot a \leq -5 \cdot 10^{+185}:\\
\;\;\;\;\left(c + x \cdot y\right) - t_1\\
\mathbf{elif}\;b \cdot a \leq 5 \cdot 10^{+54}:\\
\;\;\;\;c + \left(x \cdot y + t_2\right)\\
\mathbf{else}:\\
\;\;\;\;\left(c + t_2\right) - t_1\\
\end{array}
\end{array}
if (*.f64 a b) < -4.9999999999999999e185Initial program 93.9%
Taylor expanded in z around 0 88.3%
if -4.9999999999999999e185 < (*.f64 a b) < 5.00000000000000005e54Initial program 99.4%
Taylor expanded in a around 0 94.4%
if 5.00000000000000005e54 < (*.f64 a b) Initial program 89.4%
Taylor expanded in x around 0 79.5%
Final simplification90.8%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* (* b a) -0.25)))
(if (<= (* b a) -1e+247)
(+ c t_1)
(if (<= (* b a) 3e+233) (+ c (+ (* x y) (* 0.0625 (* t z)))) 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 ((b * a) <= -1e+247) {
tmp = c + t_1;
} else if ((b * a) <= 3e+233) {
tmp = c + ((x * y) + (0.0625 * (t * z)));
} 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 ((b * a) <= (-1d+247)) then
tmp = c + t_1
else if ((b * a) <= 3d+233) then
tmp = c + ((x * y) + (0.0625d0 * (t * z)))
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 ((b * a) <= -1e+247) {
tmp = c + t_1;
} else if ((b * a) <= 3e+233) {
tmp = c + ((x * y) + (0.0625 * (t * z)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = (b * a) * -0.25 tmp = 0 if (b * a) <= -1e+247: tmp = c + t_1 elif (b * a) <= 3e+233: tmp = c + ((x * y) + (0.0625 * (t * z))) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(b * a) * -0.25) tmp = 0.0 if (Float64(b * a) <= -1e+247) tmp = Float64(c + t_1); elseif (Float64(b * a) <= 3e+233) tmp = Float64(c + Float64(Float64(x * y) + Float64(0.0625 * Float64(t * z)))); 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 ((b * a) <= -1e+247) tmp = c + t_1; elseif ((b * a) <= 3e+233) tmp = c + ((x * y) + (0.0625 * (t * z))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(b * a), $MachinePrecision] * -0.25), $MachinePrecision]}, If[LessEqual[N[(b * a), $MachinePrecision], -1e+247], N[(c + t$95$1), $MachinePrecision], If[LessEqual[N[(b * a), $MachinePrecision], 3e+233], N[(c + N[(N[(x * y), $MachinePrecision] + N[(0.0625 * N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(b \cdot a\right) \cdot -0.25\\
\mathbf{if}\;b \cdot a \leq -1 \cdot 10^{+247}:\\
\;\;\;\;c + t_1\\
\mathbf{elif}\;b \cdot a \leq 3 \cdot 10^{+233}:\\
\;\;\;\;c + \left(x \cdot y + 0.0625 \cdot \left(t \cdot z\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if (*.f64 a b) < -9.99999999999999952e246Initial program 92.9%
Taylor expanded in a around inf 86.3%
*-commutative86.3%
Simplified86.3%
if -9.99999999999999952e246 < (*.f64 a b) < 3.00000000000000014e233Initial program 99.5%
Taylor expanded in a around 0 91.3%
if 3.00000000000000014e233 < (*.f64 a b) Initial program 80.0%
Taylor expanded in a around inf 84.9%
*-commutative84.9%
Simplified84.9%
Taylor expanded in a around inf 84.9%
Final simplification90.1%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* 0.0625 (* t z))))
(if (<= (* b a) -5e+258)
(- t_1 (* (* b a) 0.25))
(if (<= (* b a) 3e+233) (+ c (+ (* x y) t_1)) (* (* b a) -0.25)))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = 0.0625 * (t * z);
double tmp;
if ((b * a) <= -5e+258) {
tmp = t_1 - ((b * a) * 0.25);
} else if ((b * a) <= 3e+233) {
tmp = c + ((x * y) + t_1);
} 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) :: t_1
real(8) :: tmp
t_1 = 0.0625d0 * (t * z)
if ((b * a) <= (-5d+258)) then
tmp = t_1 - ((b * a) * 0.25d0)
else if ((b * a) <= 3d+233) then
tmp = c + ((x * y) + t_1)
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 t_1 = 0.0625 * (t * z);
double tmp;
if ((b * a) <= -5e+258) {
tmp = t_1 - ((b * a) * 0.25);
} else if ((b * a) <= 3e+233) {
tmp = c + ((x * y) + t_1);
} else {
tmp = (b * a) * -0.25;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = 0.0625 * (t * z) tmp = 0 if (b * a) <= -5e+258: tmp = t_1 - ((b * a) * 0.25) elif (b * a) <= 3e+233: tmp = c + ((x * y) + t_1) else: tmp = (b * a) * -0.25 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(0.0625 * Float64(t * z)) tmp = 0.0 if (Float64(b * a) <= -5e+258) tmp = Float64(t_1 - Float64(Float64(b * a) * 0.25)); elseif (Float64(b * a) <= 3e+233) tmp = Float64(c + Float64(Float64(x * y) + t_1)); else tmp = Float64(Float64(b * a) * -0.25); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = 0.0625 * (t * z); tmp = 0.0; if ((b * a) <= -5e+258) tmp = t_1 - ((b * a) * 0.25); elseif ((b * a) <= 3e+233) tmp = c + ((x * y) + t_1); else tmp = (b * a) * -0.25; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(0.0625 * N[(t * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b * a), $MachinePrecision], -5e+258], N[(t$95$1 - N[(N[(b * a), $MachinePrecision] * 0.25), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * a), $MachinePrecision], 3e+233], N[(c + N[(N[(x * y), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision], N[(N[(b * a), $MachinePrecision] * -0.25), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 0.0625 \cdot \left(t \cdot z\right)\\
\mathbf{if}\;b \cdot a \leq -5 \cdot 10^{+258}:\\
\;\;\;\;t_1 - \left(b \cdot a\right) \cdot 0.25\\
\mathbf{elif}\;b \cdot a \leq 3 \cdot 10^{+233}:\\
\;\;\;\;c + \left(x \cdot y + t_1\right)\\
\mathbf{else}:\\
\;\;\;\;\left(b \cdot a\right) \cdot -0.25\\
\end{array}
\end{array}
if (*.f64 a b) < -5e258Initial program 92.0%
Taylor expanded in x around 0 92.0%
Taylor expanded in c around 0 92.0%
if -5e258 < (*.f64 a b) < 3.00000000000000014e233Initial program 99.5%
Taylor expanded in a around 0 90.9%
if 3.00000000000000014e233 < (*.f64 a b) Initial program 80.0%
Taylor expanded in a around inf 84.9%
*-commutative84.9%
Simplified84.9%
Taylor expanded in a around inf 84.9%
Final simplification90.4%
(FPCore (x y z t a b c)
:precision binary64
(if (<= (* b a) -5e+185)
(- (+ c (* x y)) (* (* b a) 0.25))
(if (<= (* b a) 3e+233)
(+ c (+ (* x y) (* 0.0625 (* t z))))
(* (* b a) -0.25))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((b * a) <= -5e+185) {
tmp = (c + (x * y)) - ((b * a) * 0.25);
} else if ((b * a) <= 3e+233) {
tmp = c + ((x * y) + (0.0625 * (t * z)));
} 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 ((b * a) <= (-5d+185)) then
tmp = (c + (x * y)) - ((b * a) * 0.25d0)
else if ((b * a) <= 3d+233) then
tmp = c + ((x * y) + (0.0625d0 * (t * z)))
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 ((b * a) <= -5e+185) {
tmp = (c + (x * y)) - ((b * a) * 0.25);
} else if ((b * a) <= 3e+233) {
tmp = c + ((x * y) + (0.0625 * (t * z)));
} else {
tmp = (b * a) * -0.25;
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if (b * a) <= -5e+185: tmp = (c + (x * y)) - ((b * a) * 0.25) elif (b * a) <= 3e+233: tmp = c + ((x * y) + (0.0625 * (t * z))) else: tmp = (b * a) * -0.25 return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (Float64(b * a) <= -5e+185) tmp = Float64(Float64(c + Float64(x * y)) - Float64(Float64(b * a) * 0.25)); elseif (Float64(b * a) <= 3e+233) tmp = Float64(c + Float64(Float64(x * y) + Float64(0.0625 * Float64(t * z)))); else tmp = Float64(Float64(b * a) * -0.25); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if ((b * a) <= -5e+185) tmp = (c + (x * y)) - ((b * a) * 0.25); elseif ((b * a) <= 3e+233) tmp = c + ((x * y) + (0.0625 * (t * z))); else tmp = (b * a) * -0.25; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[N[(b * a), $MachinePrecision], -5e+185], N[(N[(c + N[(x * y), $MachinePrecision]), $MachinePrecision] - N[(N[(b * a), $MachinePrecision] * 0.25), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * a), $MachinePrecision], 3e+233], N[(c + N[(N[(x * y), $MachinePrecision] + N[(0.0625 * N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b * a), $MachinePrecision] * -0.25), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \cdot a \leq -5 \cdot 10^{+185}:\\
\;\;\;\;\left(c + x \cdot y\right) - \left(b \cdot a\right) \cdot 0.25\\
\mathbf{elif}\;b \cdot a \leq 3 \cdot 10^{+233}:\\
\;\;\;\;c + \left(x \cdot y + 0.0625 \cdot \left(t \cdot z\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(b \cdot a\right) \cdot -0.25\\
\end{array}
\end{array}
if (*.f64 a b) < -4.9999999999999999e185Initial program 93.9%
Taylor expanded in z around 0 88.3%
if -4.9999999999999999e185 < (*.f64 a b) < 3.00000000000000014e233Initial program 99.4%
Taylor expanded in a around 0 91.6%
if 3.00000000000000014e233 < (*.f64 a b) Initial program 80.0%
Taylor expanded in a around inf 84.9%
*-commutative84.9%
Simplified84.9%
Taylor expanded in a around inf 84.9%
Final simplification90.5%
(FPCore (x y z t a b c) :precision binary64 (if (or (<= (* b a) -7.2e+243) (not (<= (* b a) 1.65e+28))) (* (* b a) -0.25) (* x y)))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (((b * a) <= -7.2e+243) || !((b * a) <= 1.65e+28)) {
tmp = (b * a) * -0.25;
} 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) :: tmp
if (((b * a) <= (-7.2d+243)) .or. (.not. ((b * a) <= 1.65d+28))) then
tmp = (b * a) * (-0.25d0)
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 tmp;
if (((b * a) <= -7.2e+243) || !((b * a) <= 1.65e+28)) {
tmp = (b * a) * -0.25;
} else {
tmp = x * y;
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if ((b * a) <= -7.2e+243) or not ((b * a) <= 1.65e+28): tmp = (b * a) * -0.25 else: tmp = x * y return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if ((Float64(b * a) <= -7.2e+243) || !(Float64(b * a) <= 1.65e+28)) tmp = Float64(Float64(b * a) * -0.25); else tmp = Float64(x * y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (((b * a) <= -7.2e+243) || ~(((b * a) <= 1.65e+28))) tmp = (b * a) * -0.25; else tmp = x * y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[N[(b * a), $MachinePrecision], -7.2e+243], N[Not[LessEqual[N[(b * a), $MachinePrecision], 1.65e+28]], $MachinePrecision]], N[(N[(b * a), $MachinePrecision] * -0.25), $MachinePrecision], N[(x * y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \cdot a \leq -7.2 \cdot 10^{+243} \lor \neg \left(b \cdot a \leq 1.65 \cdot 10^{+28}\right):\\
\;\;\;\;\left(b \cdot a\right) \cdot -0.25\\
\mathbf{else}:\\
\;\;\;\;x \cdot y\\
\end{array}
\end{array}
if (*.f64 a b) < -7.1999999999999993e243 or 1.65e28 < (*.f64 a b) Initial program 91.5%
Taylor expanded in a around inf 71.9%
*-commutative71.9%
Simplified71.9%
Taylor expanded in a around inf 66.0%
if -7.1999999999999993e243 < (*.f64 a b) < 1.65e28Initial program 99.4%
associate-+l-99.4%
+-commutative99.4%
associate--l+99.4%
+-commutative99.4%
associate-+l-99.4%
fma-neg99.4%
neg-sub099.4%
associate--l-99.4%
associate-+l-99.4%
neg-sub099.4%
*-commutative99.4%
associate-*r/99.4%
distribute-rgt-neg-in99.4%
fma-def99.4%
distribute-frac-neg99.4%
neg-mul-199.4%
associate-/l*99.4%
associate-/r/99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in b around 0 94.8%
Taylor expanded in x around inf 40.6%
Final simplification48.7%
(FPCore (x y z t a b c)
:precision binary64
(if (<= x -5e+79)
(* x y)
(if (<= x -1.9e-39)
c
(if (<= x -1.65e-77) (* x y) (if (<= x 1e-10) c (* x y))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (x <= -5e+79) {
tmp = x * y;
} else if (x <= -1.9e-39) {
tmp = c;
} else if (x <= -1.65e-77) {
tmp = x * y;
} else if (x <= 1e-10) {
tmp = c;
} 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) :: tmp
if (x <= (-5d+79)) then
tmp = x * y
else if (x <= (-1.9d-39)) then
tmp = c
else if (x <= (-1.65d-77)) then
tmp = x * y
else if (x <= 1d-10) then
tmp = c
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 tmp;
if (x <= -5e+79) {
tmp = x * y;
} else if (x <= -1.9e-39) {
tmp = c;
} else if (x <= -1.65e-77) {
tmp = x * y;
} else if (x <= 1e-10) {
tmp = c;
} else {
tmp = x * y;
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if x <= -5e+79: tmp = x * y elif x <= -1.9e-39: tmp = c elif x <= -1.65e-77: tmp = x * y elif x <= 1e-10: tmp = c else: tmp = x * y return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (x <= -5e+79) tmp = Float64(x * y); elseif (x <= -1.9e-39) tmp = c; elseif (x <= -1.65e-77) tmp = Float64(x * y); elseif (x <= 1e-10) tmp = c; else tmp = Float64(x * y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (x <= -5e+79) tmp = x * y; elseif (x <= -1.9e-39) tmp = c; elseif (x <= -1.65e-77) tmp = x * y; elseif (x <= 1e-10) tmp = c; else tmp = x * y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[x, -5e+79], N[(x * y), $MachinePrecision], If[LessEqual[x, -1.9e-39], c, If[LessEqual[x, -1.65e-77], N[(x * y), $MachinePrecision], If[LessEqual[x, 1e-10], c, N[(x * y), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -5 \cdot 10^{+79}:\\
\;\;\;\;x \cdot y\\
\mathbf{elif}\;x \leq -1.9 \cdot 10^{-39}:\\
\;\;\;\;c\\
\mathbf{elif}\;x \leq -1.65 \cdot 10^{-77}:\\
\;\;\;\;x \cdot y\\
\mathbf{elif}\;x \leq 10^{-10}:\\
\;\;\;\;c\\
\mathbf{else}:\\
\;\;\;\;x \cdot y\\
\end{array}
\end{array}
if x < -5e79 or -1.9000000000000001e-39 < x < -1.64999999999999996e-77 or 1.00000000000000004e-10 < x Initial program 95.5%
associate-+l-95.5%
+-commutative95.5%
associate--l+95.5%
+-commutative95.5%
associate-+l-95.5%
fma-neg97.7%
neg-sub097.7%
associate--l-97.7%
associate-+l-97.7%
neg-sub097.7%
*-commutative97.7%
associate-*r/97.7%
distribute-rgt-neg-in97.7%
fma-def97.7%
distribute-frac-neg97.7%
neg-mul-197.7%
associate-/l*97.7%
associate-/r/97.7%
metadata-eval97.7%
Simplified97.7%
Taylor expanded in b around 0 85.8%
Taylor expanded in x around inf 54.9%
if -5e79 < x < -1.9000000000000001e-39 or -1.64999999999999996e-77 < x < 1.00000000000000004e-10Initial program 98.3%
Taylor expanded in c around inf 29.5%
Final simplification42.9%
(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 96.8%
Taylor expanded in c around inf 20.2%
Final simplification20.2%
herbie shell --seed 2023176
(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))