
(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 15 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.6%
associate-+l-96.6%
+-commutative96.6%
associate--l+96.6%
associate-*l/96.6%
*-commutative96.6%
fma-def97.0%
fma-neg99.0%
neg-sub099.0%
associate-+l-99.0%
neg-sub099.0%
+-commutative99.0%
unsub-neg99.0%
*-commutative99.0%
associate-*r/99.6%
Simplified99.6%
Final simplification99.6%
(FPCore (x y z t a b c) :precision binary64 (if (<= (- (+ (/ (* t z) 16.0) (* x y)) (/ (* b a) 4.0)) INFINITY) (+ (fma x y (* t (/ z 16.0))) (- c (* b (/ a 4.0)))) (- (* 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 (((((t * z) / 16.0) + (x * y)) - ((b * a) / 4.0)) <= ((double) INFINITY)) {
tmp = fma(x, y, (t * (z / 16.0))) + (c - (b * (a / 4.0)));
} else {
tmp = (0.0625 * (t * z)) - ((b * a) * 0.25);
}
return tmp;
}
function code(x, y, z, t, a, b, c) tmp = 0.0 if (Float64(Float64(Float64(Float64(t * z) / 16.0) + Float64(x * y)) - Float64(Float64(b * a) / 4.0)) <= Inf) tmp = Float64(fma(x, y, Float64(t * Float64(z / 16.0))) + Float64(c - Float64(b * Float64(a / 4.0)))); else tmp = Float64(Float64(0.0625 * Float64(t * z)) - Float64(Float64(b * a) * 0.25)); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[N[(N[(N[(N[(t * z), $MachinePrecision] / 16.0), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision] - N[(N[(b * a), $MachinePrecision] / 4.0), $MachinePrecision]), $MachinePrecision], Infinity], N[(N[(x * y + N[(t * N[(z / 16.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(c - N[(b * N[(a / 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(0.0625 * N[(t * z), $MachinePrecision]), $MachinePrecision] - N[(N[(b * a), $MachinePrecision] * 0.25), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\left(\frac{t \cdot z}{16} + x \cdot y\right) - \frac{b \cdot a}{4} \leq \infty:\\
\;\;\;\;\mathsf{fma}\left(x, y, t \cdot \frac{z}{16}\right) + \left(c - b \cdot \frac{a}{4}\right)\\
\mathbf{else}:\\
\;\;\;\;0.0625 \cdot \left(t \cdot z\right) - \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 99.3%
associate-+l-99.3%
fma-def99.3%
associate-*l/99.3%
associate-*l/100.0%
Simplified100.0%
if +inf.0 < (-.f64 (+.f64 (*.f64 x y) (/.f64 (*.f64 z t) 16)) (/.f64 (*.f64 a b) 4)) Initial program 0.0%
associate-+l-0.0%
fma-def14.3%
associate-*l/14.3%
associate-*l/14.3%
Simplified14.3%
Taylor expanded in x around 0 85.7%
Taylor expanded in c around 0 85.7%
Final simplification99.6%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (+ c (* 0.0625 (* t z))))
(t_2 (+ c (* b (* a -0.25))))
(t_3 (+ c (* x y))))
(if (<= (* b a) -1e+148)
t_2
(if (<= (* b a) -2e+15)
t_1
(if (<= (* b a) -1e-141)
t_3
(if (<= (* b a) -1e-305)
t_1
(if (<= (* b a) 5e-48)
t_3
(if (<= (* b a) 4e+62)
(- (* x y) (* (* b a) 0.25))
(if (<= (* b a) 5e+139) t_3 t_2)))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = c + (0.0625 * (t * z));
double t_2 = c + (b * (a * -0.25));
double t_3 = c + (x * y);
double tmp;
if ((b * a) <= -1e+148) {
tmp = t_2;
} else if ((b * a) <= -2e+15) {
tmp = t_1;
} else if ((b * a) <= -1e-141) {
tmp = t_3;
} else if ((b * a) <= -1e-305) {
tmp = t_1;
} else if ((b * a) <= 5e-48) {
tmp = t_3;
} else if ((b * a) <= 4e+62) {
tmp = (x * y) - ((b * a) * 0.25);
} else if ((b * a) <= 5e+139) {
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 + (0.0625d0 * (t * z))
t_2 = c + (b * (a * (-0.25d0)))
t_3 = c + (x * y)
if ((b * a) <= (-1d+148)) then
tmp = t_2
else if ((b * a) <= (-2d+15)) then
tmp = t_1
else if ((b * a) <= (-1d-141)) then
tmp = t_3
else if ((b * a) <= (-1d-305)) then
tmp = t_1
else if ((b * a) <= 5d-48) then
tmp = t_3
else if ((b * a) <= 4d+62) then
tmp = (x * y) - ((b * a) * 0.25d0)
else if ((b * a) <= 5d+139) 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 + (0.0625 * (t * z));
double t_2 = c + (b * (a * -0.25));
double t_3 = c + (x * y);
double tmp;
if ((b * a) <= -1e+148) {
tmp = t_2;
} else if ((b * a) <= -2e+15) {
tmp = t_1;
} else if ((b * a) <= -1e-141) {
tmp = t_3;
} else if ((b * a) <= -1e-305) {
tmp = t_1;
} else if ((b * a) <= 5e-48) {
tmp = t_3;
} else if ((b * a) <= 4e+62) {
tmp = (x * y) - ((b * a) * 0.25);
} else if ((b * a) <= 5e+139) {
tmp = t_3;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = c + (0.0625 * (t * z)) t_2 = c + (b * (a * -0.25)) t_3 = c + (x * y) tmp = 0 if (b * a) <= -1e+148: tmp = t_2 elif (b * a) <= -2e+15: tmp = t_1 elif (b * a) <= -1e-141: tmp = t_3 elif (b * a) <= -1e-305: tmp = t_1 elif (b * a) <= 5e-48: tmp = t_3 elif (b * a) <= 4e+62: tmp = (x * y) - ((b * a) * 0.25) elif (b * a) <= 5e+139: tmp = t_3 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(c + Float64(0.0625 * Float64(t * z))) t_2 = Float64(c + Float64(b * Float64(a * -0.25))) t_3 = Float64(c + Float64(x * y)) tmp = 0.0 if (Float64(b * a) <= -1e+148) tmp = t_2; elseif (Float64(b * a) <= -2e+15) tmp = t_1; elseif (Float64(b * a) <= -1e-141) tmp = t_3; elseif (Float64(b * a) <= -1e-305) tmp = t_1; elseif (Float64(b * a) <= 5e-48) tmp = t_3; elseif (Float64(b * a) <= 4e+62) tmp = Float64(Float64(x * y) - Float64(Float64(b * a) * 0.25)); elseif (Float64(b * a) <= 5e+139) 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 + (0.0625 * (t * z)); t_2 = c + (b * (a * -0.25)); t_3 = c + (x * y); tmp = 0.0; if ((b * a) <= -1e+148) tmp = t_2; elseif ((b * a) <= -2e+15) tmp = t_1; elseif ((b * a) <= -1e-141) tmp = t_3; elseif ((b * a) <= -1e-305) tmp = t_1; elseif ((b * a) <= 5e-48) tmp = t_3; elseif ((b * a) <= 4e+62) tmp = (x * y) - ((b * a) * 0.25); elseif ((b * a) <= 5e+139) 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[(0.0625 * N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(c + N[(b * N[(a * -0.25), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(c + N[(x * y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b * a), $MachinePrecision], -1e+148], t$95$2, If[LessEqual[N[(b * a), $MachinePrecision], -2e+15], t$95$1, If[LessEqual[N[(b * a), $MachinePrecision], -1e-141], t$95$3, If[LessEqual[N[(b * a), $MachinePrecision], -1e-305], t$95$1, If[LessEqual[N[(b * a), $MachinePrecision], 5e-48], t$95$3, If[LessEqual[N[(b * a), $MachinePrecision], 4e+62], N[(N[(x * y), $MachinePrecision] - N[(N[(b * a), $MachinePrecision] * 0.25), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * a), $MachinePrecision], 5e+139], t$95$3, t$95$2]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := c + 0.0625 \cdot \left(t \cdot z\right)\\
t_2 := c + b \cdot \left(a \cdot -0.25\right)\\
t_3 := c + x \cdot y\\
\mathbf{if}\;b \cdot a \leq -1 \cdot 10^{+148}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;b \cdot a \leq -2 \cdot 10^{+15}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \cdot a \leq -1 \cdot 10^{-141}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;b \cdot a \leq -1 \cdot 10^{-305}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \cdot a \leq 5 \cdot 10^{-48}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;b \cdot a \leq 4 \cdot 10^{+62}:\\
\;\;\;\;x \cdot y - \left(b \cdot a\right) \cdot 0.25\\
\mathbf{elif}\;b \cdot a \leq 5 \cdot 10^{+139}:\\
\;\;\;\;t_3\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if (*.f64 a b) < -1e148 or 5.0000000000000003e139 < (*.f64 a b) Initial program 91.2%
Taylor expanded in a around inf 83.6%
*-commutative83.6%
*-commutative83.6%
associate-*l*85.7%
Simplified85.7%
if -1e148 < (*.f64 a b) < -2e15 or -1e-141 < (*.f64 a b) < -9.99999999999999996e-306Initial program 97.7%
Taylor expanded in z around inf 78.9%
if -2e15 < (*.f64 a b) < -1e-141 or -9.99999999999999996e-306 < (*.f64 a b) < 4.9999999999999999e-48 or 4.00000000000000014e62 < (*.f64 a b) < 5.0000000000000003e139Initial program 99.2%
Taylor expanded in x around inf 73.3%
if 4.9999999999999999e-48 < (*.f64 a b) < 4.00000000000000014e62Initial program 100.0%
associate-+l-100.0%
fma-def100.0%
associate-*l/100.0%
associate-*l/100.0%
Simplified100.0%
Taylor expanded in z around 0 88.4%
Taylor expanded in c around 0 82.2%
Final simplification78.5%
(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) (- (* 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 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 = (0.0625 * (t * z)) - ((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 = (0.0625 * (t * z)) - ((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 = (0.0625 * (t * z)) - ((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(Float64(0.0625 * Float64(t * z)) - 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 = (0.0625 * (t * z)) - ((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[(N[(0.0625 * N[(t * z), $MachinePrecision]), $MachinePrecision] - 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}:\\
\;\;\;\;0.0625 \cdot \left(t \cdot z\right) - \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 99.3%
if +inf.0 < (-.f64 (+.f64 (*.f64 x y) (/.f64 (*.f64 z t) 16)) (/.f64 (*.f64 a b) 4)) Initial program 0.0%
associate-+l-0.0%
fma-def14.3%
associate-*l/14.3%
associate-*l/14.3%
Simplified14.3%
Taylor expanded in x around 0 85.7%
Taylor expanded in c around 0 85.7%
Final simplification99.0%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* 0.0625 (* t z)))
(t_2 (* (* b a) 0.25))
(t_3 (+ c (+ t_1 (* x y))))
(t_4 (- (+ c t_1) t_2)))
(if (<= (* b a) -5e+102)
t_4
(if (<= (* b a) 5e-30)
t_3
(if (<= (* b a) 4e+62)
(- (+ c (* x y)) t_2)
(if (<= (* b a) 5e+139) t_3 t_4))))))
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 t_3 = c + (t_1 + (x * y));
double t_4 = (c + t_1) - t_2;
double tmp;
if ((b * a) <= -5e+102) {
tmp = t_4;
} else if ((b * a) <= 5e-30) {
tmp = t_3;
} else if ((b * a) <= 4e+62) {
tmp = (c + (x * y)) - t_2;
} else if ((b * a) <= 5e+139) {
tmp = t_3;
} else {
tmp = t_4;
}
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 = 0.0625d0 * (t * z)
t_2 = (b * a) * 0.25d0
t_3 = c + (t_1 + (x * y))
t_4 = (c + t_1) - t_2
if ((b * a) <= (-5d+102)) then
tmp = t_4
else if ((b * a) <= 5d-30) then
tmp = t_3
else if ((b * a) <= 4d+62) then
tmp = (c + (x * y)) - t_2
else if ((b * a) <= 5d+139) then
tmp = t_3
else
tmp = t_4
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 t_3 = c + (t_1 + (x * y));
double t_4 = (c + t_1) - t_2;
double tmp;
if ((b * a) <= -5e+102) {
tmp = t_4;
} else if ((b * a) <= 5e-30) {
tmp = t_3;
} else if ((b * a) <= 4e+62) {
tmp = (c + (x * y)) - t_2;
} else if ((b * a) <= 5e+139) {
tmp = t_3;
} else {
tmp = t_4;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = 0.0625 * (t * z) t_2 = (b * a) * 0.25 t_3 = c + (t_1 + (x * y)) t_4 = (c + t_1) - t_2 tmp = 0 if (b * a) <= -5e+102: tmp = t_4 elif (b * a) <= 5e-30: tmp = t_3 elif (b * a) <= 4e+62: tmp = (c + (x * y)) - t_2 elif (b * a) <= 5e+139: tmp = t_3 else: tmp = t_4 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) t_3 = Float64(c + Float64(t_1 + Float64(x * y))) t_4 = Float64(Float64(c + t_1) - t_2) tmp = 0.0 if (Float64(b * a) <= -5e+102) tmp = t_4; elseif (Float64(b * a) <= 5e-30) tmp = t_3; elseif (Float64(b * a) <= 4e+62) tmp = Float64(Float64(c + Float64(x * y)) - t_2); elseif (Float64(b * a) <= 5e+139) tmp = t_3; else tmp = t_4; 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; t_3 = c + (t_1 + (x * y)); t_4 = (c + t_1) - t_2; tmp = 0.0; if ((b * a) <= -5e+102) tmp = t_4; elseif ((b * a) <= 5e-30) tmp = t_3; elseif ((b * a) <= 4e+62) tmp = (c + (x * y)) - t_2; elseif ((b * a) <= 5e+139) tmp = t_3; else tmp = t_4; 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]}, Block[{t$95$3 = N[(c + N[(t$95$1 + N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(c + t$95$1), $MachinePrecision] - t$95$2), $MachinePrecision]}, If[LessEqual[N[(b * a), $MachinePrecision], -5e+102], t$95$4, If[LessEqual[N[(b * a), $MachinePrecision], 5e-30], t$95$3, If[LessEqual[N[(b * a), $MachinePrecision], 4e+62], N[(N[(c + N[(x * y), $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision], If[LessEqual[N[(b * a), $MachinePrecision], 5e+139], t$95$3, t$95$4]]]]]]]]
\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\\
t_3 := c + \left(t_1 + x \cdot y\right)\\
t_4 := \left(c + t_1\right) - t_2\\
\mathbf{if}\;b \cdot a \leq -5 \cdot 10^{+102}:\\
\;\;\;\;t_4\\
\mathbf{elif}\;b \cdot a \leq 5 \cdot 10^{-30}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;b \cdot a \leq 4 \cdot 10^{+62}:\\
\;\;\;\;\left(c + x \cdot y\right) - t_2\\
\mathbf{elif}\;b \cdot a \leq 5 \cdot 10^{+139}:\\
\;\;\;\;t_3\\
\mathbf{else}:\\
\;\;\;\;t_4\\
\end{array}
\end{array}
if (*.f64 a b) < -5e102 or 5.0000000000000003e139 < (*.f64 a b) Initial program 92.1%
associate-+l-92.1%
fma-def92.1%
associate-*l/92.1%
associate-*l/94.0%
Simplified94.0%
Taylor expanded in x around 0 90.1%
if -5e102 < (*.f64 a b) < 4.99999999999999972e-30 or 4.00000000000000014e62 < (*.f64 a b) < 5.0000000000000003e139Initial program 98.7%
Taylor expanded in a around 0 96.3%
if 4.99999999999999972e-30 < (*.f64 a b) < 4.00000000000000014e62Initial program 100.0%
associate-+l-100.0%
fma-def100.0%
associate-*l/100.0%
associate-*l/100.0%
Simplified100.0%
Taylor expanded in z around 0 93.4%
Final simplification94.1%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (+ c (+ (* 0.0625 (* t z)) (* x y))))
(t_2 (+ c (* b (* a -0.25)))))
(if (<= (* b a) -1e+191)
t_2
(if (<= (* b a) 5e-30)
t_1
(if (<= (* b a) 4e+62)
(- (* x y) (* (* b a) 0.25))
(if (<= (* b a) 5e+139) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = c + ((0.0625 * (t * z)) + (x * y));
double t_2 = c + (b * (a * -0.25));
double tmp;
if ((b * a) <= -1e+191) {
tmp = t_2;
} else if ((b * a) <= 5e-30) {
tmp = t_1;
} else if ((b * a) <= 4e+62) {
tmp = (x * y) - ((b * a) * 0.25);
} else if ((b * a) <= 5e+139) {
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 + ((0.0625d0 * (t * z)) + (x * y))
t_2 = c + (b * (a * (-0.25d0)))
if ((b * a) <= (-1d+191)) then
tmp = t_2
else if ((b * a) <= 5d-30) then
tmp = t_1
else if ((b * a) <= 4d+62) then
tmp = (x * y) - ((b * a) * 0.25d0)
else if ((b * a) <= 5d+139) 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 + ((0.0625 * (t * z)) + (x * y));
double t_2 = c + (b * (a * -0.25));
double tmp;
if ((b * a) <= -1e+191) {
tmp = t_2;
} else if ((b * a) <= 5e-30) {
tmp = t_1;
} else if ((b * a) <= 4e+62) {
tmp = (x * y) - ((b * a) * 0.25);
} else if ((b * a) <= 5e+139) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = c + ((0.0625 * (t * z)) + (x * y)) t_2 = c + (b * (a * -0.25)) tmp = 0 if (b * a) <= -1e+191: tmp = t_2 elif (b * a) <= 5e-30: tmp = t_1 elif (b * a) <= 4e+62: tmp = (x * y) - ((b * a) * 0.25) elif (b * a) <= 5e+139: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(c + Float64(Float64(0.0625 * Float64(t * z)) + Float64(x * y))) t_2 = Float64(c + Float64(b * Float64(a * -0.25))) tmp = 0.0 if (Float64(b * a) <= -1e+191) tmp = t_2; elseif (Float64(b * a) <= 5e-30) tmp = t_1; elseif (Float64(b * a) <= 4e+62) tmp = Float64(Float64(x * y) - Float64(Float64(b * a) * 0.25)); elseif (Float64(b * a) <= 5e+139) 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 + ((0.0625 * (t * z)) + (x * y)); t_2 = c + (b * (a * -0.25)); tmp = 0.0; if ((b * a) <= -1e+191) tmp = t_2; elseif ((b * a) <= 5e-30) tmp = t_1; elseif ((b * a) <= 4e+62) tmp = (x * y) - ((b * a) * 0.25); elseif ((b * a) <= 5e+139) 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[(N[(0.0625 * N[(t * z), $MachinePrecision]), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(c + N[(b * N[(a * -0.25), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b * a), $MachinePrecision], -1e+191], t$95$2, If[LessEqual[N[(b * a), $MachinePrecision], 5e-30], t$95$1, If[LessEqual[N[(b * a), $MachinePrecision], 4e+62], N[(N[(x * y), $MachinePrecision] - N[(N[(b * a), $MachinePrecision] * 0.25), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * a), $MachinePrecision], 5e+139], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := c + \left(0.0625 \cdot \left(t \cdot z\right) + x \cdot y\right)\\
t_2 := c + b \cdot \left(a \cdot -0.25\right)\\
\mathbf{if}\;b \cdot a \leq -1 \cdot 10^{+191}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;b \cdot a \leq 5 \cdot 10^{-30}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \cdot a \leq 4 \cdot 10^{+62}:\\
\;\;\;\;x \cdot y - \left(b \cdot a\right) \cdot 0.25\\
\mathbf{elif}\;b \cdot a \leq 5 \cdot 10^{+139}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if (*.f64 a b) < -1.00000000000000007e191 or 5.0000000000000003e139 < (*.f64 a b) Initial program 90.7%
Taylor expanded in a around inf 86.6%
*-commutative86.6%
*-commutative86.6%
associate-*l*88.8%
Simplified88.8%
if -1.00000000000000007e191 < (*.f64 a b) < 4.99999999999999972e-30 or 4.00000000000000014e62 < (*.f64 a b) < 5.0000000000000003e139Initial program 98.8%
Taylor expanded in a around 0 94.9%
if 4.99999999999999972e-30 < (*.f64 a b) < 4.00000000000000014e62Initial program 100.0%
associate-+l-100.0%
fma-def100.0%
associate-*l/100.0%
associate-*l/100.0%
Simplified100.0%
Taylor expanded in z around 0 93.4%
Taylor expanded in c around 0 86.3%
Final simplification92.8%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* (* b a) 0.25))
(t_2 (* 0.0625 (* t z)))
(t_3 (+ c (+ t_2 (* x y)))))
(if (<= (* b a) -1e+191)
(- t_2 t_1)
(if (<= (* b a) 5e-30)
t_3
(if (<= (* b a) 4e+62)
(- (* x y) t_1)
(if (<= (* b a) 5e+139) t_3 (+ c (* b (* a -0.25)))))))))
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 t_3 = c + (t_2 + (x * y));
double tmp;
if ((b * a) <= -1e+191) {
tmp = t_2 - t_1;
} else if ((b * a) <= 5e-30) {
tmp = t_3;
} else if ((b * a) <= 4e+62) {
tmp = (x * y) - t_1;
} else if ((b * a) <= 5e+139) {
tmp = t_3;
} 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) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = (b * a) * 0.25d0
t_2 = 0.0625d0 * (t * z)
t_3 = c + (t_2 + (x * y))
if ((b * a) <= (-1d+191)) then
tmp = t_2 - t_1
else if ((b * a) <= 5d-30) then
tmp = t_3
else if ((b * a) <= 4d+62) then
tmp = (x * y) - t_1
else if ((b * a) <= 5d+139) then
tmp = t_3
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 t_1 = (b * a) * 0.25;
double t_2 = 0.0625 * (t * z);
double t_3 = c + (t_2 + (x * y));
double tmp;
if ((b * a) <= -1e+191) {
tmp = t_2 - t_1;
} else if ((b * a) <= 5e-30) {
tmp = t_3;
} else if ((b * a) <= 4e+62) {
tmp = (x * y) - t_1;
} else if ((b * a) <= 5e+139) {
tmp = t_3;
} else {
tmp = c + (b * (a * -0.25));
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = (b * a) * 0.25 t_2 = 0.0625 * (t * z) t_3 = c + (t_2 + (x * y)) tmp = 0 if (b * a) <= -1e+191: tmp = t_2 - t_1 elif (b * a) <= 5e-30: tmp = t_3 elif (b * a) <= 4e+62: tmp = (x * y) - t_1 elif (b * a) <= 5e+139: tmp = t_3 else: tmp = c + (b * (a * -0.25)) 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)) t_3 = Float64(c + Float64(t_2 + Float64(x * y))) tmp = 0.0 if (Float64(b * a) <= -1e+191) tmp = Float64(t_2 - t_1); elseif (Float64(b * a) <= 5e-30) tmp = t_3; elseif (Float64(b * a) <= 4e+62) tmp = Float64(Float64(x * y) - t_1); elseif (Float64(b * a) <= 5e+139) tmp = t_3; 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) t_1 = (b * a) * 0.25; t_2 = 0.0625 * (t * z); t_3 = c + (t_2 + (x * y)); tmp = 0.0; if ((b * a) <= -1e+191) tmp = t_2 - t_1; elseif ((b * a) <= 5e-30) tmp = t_3; elseif ((b * a) <= 4e+62) tmp = (x * y) - t_1; elseif ((b * a) <= 5e+139) tmp = t_3; 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[(b * a), $MachinePrecision] * 0.25), $MachinePrecision]}, Block[{t$95$2 = N[(0.0625 * N[(t * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(c + N[(t$95$2 + N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b * a), $MachinePrecision], -1e+191], N[(t$95$2 - t$95$1), $MachinePrecision], If[LessEqual[N[(b * a), $MachinePrecision], 5e-30], t$95$3, If[LessEqual[N[(b * a), $MachinePrecision], 4e+62], N[(N[(x * y), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[N[(b * a), $MachinePrecision], 5e+139], t$95$3, N[(c + N[(b * N[(a * -0.25), $MachinePrecision]), $MachinePrecision]), $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)\\
t_3 := c + \left(t_2 + x \cdot y\right)\\
\mathbf{if}\;b \cdot a \leq -1 \cdot 10^{+191}:\\
\;\;\;\;t_2 - t_1\\
\mathbf{elif}\;b \cdot a \leq 5 \cdot 10^{-30}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;b \cdot a \leq 4 \cdot 10^{+62}:\\
\;\;\;\;x \cdot y - t_1\\
\mathbf{elif}\;b \cdot a \leq 5 \cdot 10^{+139}:\\
\;\;\;\;t_3\\
\mathbf{else}:\\
\;\;\;\;c + b \cdot \left(a \cdot -0.25\right)\\
\end{array}
\end{array}
if (*.f64 a b) < -1.00000000000000007e191Initial program 89.1%
associate-+l-89.1%
fma-def89.1%
associate-*l/89.1%
associate-*l/93.9%
Simplified93.9%
Taylor expanded in x around 0 88.9%
Taylor expanded in c around 0 85.9%
if -1.00000000000000007e191 < (*.f64 a b) < 4.99999999999999972e-30 or 4.00000000000000014e62 < (*.f64 a b) < 5.0000000000000003e139Initial program 98.8%
Taylor expanded in a around 0 94.9%
if 4.99999999999999972e-30 < (*.f64 a b) < 4.00000000000000014e62Initial program 100.0%
associate-+l-100.0%
fma-def100.0%
associate-*l/100.0%
associate-*l/100.0%
Simplified100.0%
Taylor expanded in z around 0 93.4%
Taylor expanded in c around 0 86.3%
if 5.0000000000000003e139 < (*.f64 a b) Initial program 92.1%
Taylor expanded in a around inf 92.1%
*-commutative92.1%
*-commutative92.1%
associate-*l*92.1%
Simplified92.1%
Final simplification92.9%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (+ c (* x y)))
(t_2 (+ c (* b (* a -0.25))))
(t_3 (+ c (* 0.0625 (* t z)))))
(if (<= b -18500000.0)
t_2
(if (<= b 4.4e-213)
t_1
(if (<= b 6.2e-99)
t_3
(if (<= b 1.25e-45)
t_1
(if (<= b 1.9e+34) t_3 (if (<= b 5.6e+90) 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 t_3 = c + (0.0625 * (t * z));
double tmp;
if (b <= -18500000.0) {
tmp = t_2;
} else if (b <= 4.4e-213) {
tmp = t_1;
} else if (b <= 6.2e-99) {
tmp = t_3;
} else if (b <= 1.25e-45) {
tmp = t_1;
} else if (b <= 1.9e+34) {
tmp = t_3;
} else if (b <= 5.6e+90) {
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) :: t_3
real(8) :: tmp
t_1 = c + (x * y)
t_2 = c + (b * (a * (-0.25d0)))
t_3 = c + (0.0625d0 * (t * z))
if (b <= (-18500000.0d0)) then
tmp = t_2
else if (b <= 4.4d-213) then
tmp = t_1
else if (b <= 6.2d-99) then
tmp = t_3
else if (b <= 1.25d-45) then
tmp = t_1
else if (b <= 1.9d+34) then
tmp = t_3
else if (b <= 5.6d+90) 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 t_3 = c + (0.0625 * (t * z));
double tmp;
if (b <= -18500000.0) {
tmp = t_2;
} else if (b <= 4.4e-213) {
tmp = t_1;
} else if (b <= 6.2e-99) {
tmp = t_3;
} else if (b <= 1.25e-45) {
tmp = t_1;
} else if (b <= 1.9e+34) {
tmp = t_3;
} else if (b <= 5.6e+90) {
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)) t_3 = c + (0.0625 * (t * z)) tmp = 0 if b <= -18500000.0: tmp = t_2 elif b <= 4.4e-213: tmp = t_1 elif b <= 6.2e-99: tmp = t_3 elif b <= 1.25e-45: tmp = t_1 elif b <= 1.9e+34: tmp = t_3 elif b <= 5.6e+90: 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))) t_3 = Float64(c + Float64(0.0625 * Float64(t * z))) tmp = 0.0 if (b <= -18500000.0) tmp = t_2; elseif (b <= 4.4e-213) tmp = t_1; elseif (b <= 6.2e-99) tmp = t_3; elseif (b <= 1.25e-45) tmp = t_1; elseif (b <= 1.9e+34) tmp = t_3; elseif (b <= 5.6e+90) 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)); t_3 = c + (0.0625 * (t * z)); tmp = 0.0; if (b <= -18500000.0) tmp = t_2; elseif (b <= 4.4e-213) tmp = t_1; elseif (b <= 6.2e-99) tmp = t_3; elseif (b <= 1.25e-45) tmp = t_1; elseif (b <= 1.9e+34) tmp = t_3; elseif (b <= 5.6e+90) 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]}, Block[{t$95$3 = N[(c + N[(0.0625 * N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -18500000.0], t$95$2, If[LessEqual[b, 4.4e-213], t$95$1, If[LessEqual[b, 6.2e-99], t$95$3, If[LessEqual[b, 1.25e-45], t$95$1, If[LessEqual[b, 1.9e+34], t$95$3, If[LessEqual[b, 5.6e+90], 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)\\
t_3 := c + 0.0625 \cdot \left(t \cdot z\right)\\
\mathbf{if}\;b \leq -18500000:\\
\;\;\;\;t_2\\
\mathbf{elif}\;b \leq 4.4 \cdot 10^{-213}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \leq 6.2 \cdot 10^{-99}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;b \leq 1.25 \cdot 10^{-45}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \leq 1.9 \cdot 10^{+34}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;b \leq 5.6 \cdot 10^{+90}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if b < -1.85e7 or 5.6000000000000001e90 < b Initial program 93.4%
Taylor expanded in a around inf 63.2%
*-commutative63.2%
*-commutative63.2%
associate-*l*64.6%
Simplified64.6%
if -1.85e7 < b < 4.40000000000000019e-213 or 6.1999999999999997e-99 < b < 1.24999999999999994e-45 or 1.9000000000000001e34 < b < 5.6000000000000001e90Initial program 99.0%
Taylor expanded in x around inf 63.6%
if 4.40000000000000019e-213 < b < 6.1999999999999997e-99 or 1.24999999999999994e-45 < b < 1.9000000000000001e34Initial program 100.0%
Taylor expanded in z around inf 64.6%
Final simplification64.2%
(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) -1e+191)
(- t_2 t_1)
(if (<= (* b a) 5e-30) (+ c (+ t_2 (* x y))) (- (+ c (* 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 t_2 = 0.0625 * (t * z);
double tmp;
if ((b * a) <= -1e+191) {
tmp = t_2 - t_1;
} else if ((b * a) <= 5e-30) {
tmp = c + (t_2 + (x * y));
} else {
tmp = (c + (x * y)) - t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (b * a) * 0.25d0
t_2 = 0.0625d0 * (t * z)
if ((b * a) <= (-1d+191)) then
tmp = t_2 - t_1
else if ((b * a) <= 5d-30) then
tmp = c + (t_2 + (x * y))
else
tmp = (c + (x * y)) - t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = (b * a) * 0.25;
double t_2 = 0.0625 * (t * z);
double tmp;
if ((b * a) <= -1e+191) {
tmp = t_2 - t_1;
} else if ((b * a) <= 5e-30) {
tmp = c + (t_2 + (x * y));
} else {
tmp = (c + (x * y)) - 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) <= -1e+191: tmp = t_2 - t_1 elif (b * a) <= 5e-30: tmp = c + (t_2 + (x * y)) else: tmp = (c + (x * y)) - 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) <= -1e+191) tmp = Float64(t_2 - t_1); elseif (Float64(b * a) <= 5e-30) tmp = Float64(c + Float64(t_2 + Float64(x * y))); else tmp = Float64(Float64(c + Float64(x * y)) - 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) <= -1e+191) tmp = t_2 - t_1; elseif ((b * a) <= 5e-30) tmp = c + (t_2 + (x * y)); else tmp = (c + (x * y)) - t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(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], -1e+191], N[(t$95$2 - t$95$1), $MachinePrecision], If[LessEqual[N[(b * a), $MachinePrecision], 5e-30], N[(c + N[(t$95$2 + N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(c + N[(x * y), $MachinePrecision]), $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 -1 \cdot 10^{+191}:\\
\;\;\;\;t_2 - t_1\\
\mathbf{elif}\;b \cdot a \leq 5 \cdot 10^{-30}:\\
\;\;\;\;c + \left(t_2 + x \cdot y\right)\\
\mathbf{else}:\\
\;\;\;\;\left(c + x \cdot y\right) - t_1\\
\end{array}
\end{array}
if (*.f64 a b) < -1.00000000000000007e191Initial program 89.1%
associate-+l-89.1%
fma-def89.1%
associate-*l/89.1%
associate-*l/93.9%
Simplified93.9%
Taylor expanded in x around 0 88.9%
Taylor expanded in c around 0 85.9%
if -1.00000000000000007e191 < (*.f64 a b) < 4.99999999999999972e-30Initial program 98.7%
Taylor expanded in a around 0 94.9%
if 4.99999999999999972e-30 < (*.f64 a b) Initial program 95.7%
associate-+l-95.7%
fma-def95.7%
associate-*l/95.7%
associate-*l/95.7%
Simplified95.7%
Taylor expanded in z around 0 88.7%
Final simplification92.1%
(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 -4e-45)
t_2
(if (<= b 9e-190)
(* x y)
(if (<= b 2.2e-146)
t_1
(if (<= b 3.9e-49)
c
(if (<= b 7e+34) t_1 (if (<= b 3.7e+90) (* 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 <= -4e-45) {
tmp = t_2;
} else if (b <= 9e-190) {
tmp = x * y;
} else if (b <= 2.2e-146) {
tmp = t_1;
} else if (b <= 3.9e-49) {
tmp = c;
} else if (b <= 7e+34) {
tmp = t_1;
} else if (b <= 3.7e+90) {
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 <= (-4d-45)) then
tmp = t_2
else if (b <= 9d-190) then
tmp = x * y
else if (b <= 2.2d-146) then
tmp = t_1
else if (b <= 3.9d-49) then
tmp = c
else if (b <= 7d+34) then
tmp = t_1
else if (b <= 3.7d+90) 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 <= -4e-45) {
tmp = t_2;
} else if (b <= 9e-190) {
tmp = x * y;
} else if (b <= 2.2e-146) {
tmp = t_1;
} else if (b <= 3.9e-49) {
tmp = c;
} else if (b <= 7e+34) {
tmp = t_1;
} else if (b <= 3.7e+90) {
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 <= -4e-45: tmp = t_2 elif b <= 9e-190: tmp = x * y elif b <= 2.2e-146: tmp = t_1 elif b <= 3.9e-49: tmp = c elif b <= 7e+34: tmp = t_1 elif b <= 3.7e+90: 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(b * Float64(a * -0.25)) tmp = 0.0 if (b <= -4e-45) tmp = t_2; elseif (b <= 9e-190) tmp = Float64(x * y); elseif (b <= 2.2e-146) tmp = t_1; elseif (b <= 3.9e-49) tmp = c; elseif (b <= 7e+34) tmp = t_1; elseif (b <= 3.7e+90) 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 <= -4e-45) tmp = t_2; elseif (b <= 9e-190) tmp = x * y; elseif (b <= 2.2e-146) tmp = t_1; elseif (b <= 3.9e-49) tmp = c; elseif (b <= 7e+34) tmp = t_1; elseif (b <= 3.7e+90) 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[(b * N[(a * -0.25), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -4e-45], t$95$2, If[LessEqual[b, 9e-190], N[(x * y), $MachinePrecision], If[LessEqual[b, 2.2e-146], t$95$1, If[LessEqual[b, 3.9e-49], c, If[LessEqual[b, 7e+34], t$95$1, If[LessEqual[b, 3.7e+90], 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 := b \cdot \left(a \cdot -0.25\right)\\
\mathbf{if}\;b \leq -4 \cdot 10^{-45}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;b \leq 9 \cdot 10^{-190}:\\
\;\;\;\;x \cdot y\\
\mathbf{elif}\;b \leq 2.2 \cdot 10^{-146}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \leq 3.9 \cdot 10^{-49}:\\
\;\;\;\;c\\
\mathbf{elif}\;b \leq 7 \cdot 10^{+34}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \leq 3.7 \cdot 10^{+90}:\\
\;\;\;\;x \cdot y\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if b < -3.99999999999999994e-45 or 3.7e90 < b Initial program 94.0%
associate-+l-94.0%
fma-def94.0%
associate-*l/94.0%
associate-*l/95.3%
Simplified95.3%
Taylor expanded in z around 0 79.0%
Taylor expanded in a around inf 43.7%
*-commutative43.7%
*-commutative43.7%
associate-*r*45.0%
Simplified45.0%
if -3.99999999999999994e-45 < b < 9.00000000000000042e-190 or 6.99999999999999996e34 < b < 3.7e90Initial program 98.8%
associate-+l-98.8%
fma-def100.0%
associate-*l/100.0%
associate-*l/100.0%
Simplified100.0%
Taylor expanded in z around 0 71.7%
Taylor expanded in y around inf 35.0%
if 9.00000000000000042e-190 < b < 2.2e-146 or 3.90000000000000011e-49 < b < 6.99999999999999996e34Initial program 100.0%
associate-+l-100.0%
fma-def100.0%
associate-*l/100.0%
associate-*l/100.0%
Simplified100.0%
Taylor expanded in x around 0 75.0%
Taylor expanded in t around inf 46.5%
if 2.2e-146 < b < 3.90000000000000011e-49Initial program 100.0%
associate-+l-100.0%
fma-def100.0%
associate-*l/100.0%
associate-*l/100.0%
Simplified100.0%
Taylor expanded in c around inf 55.0%
Final simplification42.7%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (+ c (* x y)))
(t_2 (+ c (* 0.0625 (* t z))))
(t_3 (* b (* a -0.25))))
(if (<= b -8600.0)
t_3
(if (<= b 1.15e-212)
t_1
(if (<= b 5e-99)
t_2
(if (<= b 1.5e-41)
t_1
(if (<= b 8.5e+34) t_2 (if (<= b 9e+199) t_1 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 = c + (0.0625 * (t * z));
double t_3 = b * (a * -0.25);
double tmp;
if (b <= -8600.0) {
tmp = t_3;
} else if (b <= 1.15e-212) {
tmp = t_1;
} else if (b <= 5e-99) {
tmp = t_2;
} else if (b <= 1.5e-41) {
tmp = t_1;
} else if (b <= 8.5e+34) {
tmp = t_2;
} else if (b <= 9e+199) {
tmp = t_1;
} else {
tmp = t_3;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = c + (x * y)
t_2 = c + (0.0625d0 * (t * z))
t_3 = b * (a * (-0.25d0))
if (b <= (-8600.0d0)) then
tmp = t_3
else if (b <= 1.15d-212) then
tmp = t_1
else if (b <= 5d-99) then
tmp = t_2
else if (b <= 1.5d-41) then
tmp = t_1
else if (b <= 8.5d+34) then
tmp = t_2
else if (b <= 9d+199) then
tmp = t_1
else
tmp = t_3
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = c + (x * y);
double t_2 = c + (0.0625 * (t * z));
double t_3 = b * (a * -0.25);
double tmp;
if (b <= -8600.0) {
tmp = t_3;
} else if (b <= 1.15e-212) {
tmp = t_1;
} else if (b <= 5e-99) {
tmp = t_2;
} else if (b <= 1.5e-41) {
tmp = t_1;
} else if (b <= 8.5e+34) {
tmp = t_2;
} else if (b <= 9e+199) {
tmp = t_1;
} else {
tmp = t_3;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = c + (x * y) t_2 = c + (0.0625 * (t * z)) t_3 = b * (a * -0.25) tmp = 0 if b <= -8600.0: tmp = t_3 elif b <= 1.15e-212: tmp = t_1 elif b <= 5e-99: tmp = t_2 elif b <= 1.5e-41: tmp = t_1 elif b <= 8.5e+34: tmp = t_2 elif b <= 9e+199: tmp = t_1 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(c + Float64(0.0625 * Float64(t * z))) t_3 = Float64(b * Float64(a * -0.25)) tmp = 0.0 if (b <= -8600.0) tmp = t_3; elseif (b <= 1.15e-212) tmp = t_1; elseif (b <= 5e-99) tmp = t_2; elseif (b <= 1.5e-41) tmp = t_1; elseif (b <= 8.5e+34) tmp = t_2; elseif (b <= 9e+199) tmp = t_1; else tmp = t_3; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = c + (x * y); t_2 = c + (0.0625 * (t * z)); t_3 = b * (a * -0.25); tmp = 0.0; if (b <= -8600.0) tmp = t_3; elseif (b <= 1.15e-212) tmp = t_1; elseif (b <= 5e-99) tmp = t_2; elseif (b <= 1.5e-41) tmp = t_1; elseif (b <= 8.5e+34) tmp = t_2; elseif (b <= 9e+199) tmp = t_1; else tmp = t_3; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(c + N[(x * y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(c + N[(0.0625 * N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(b * N[(a * -0.25), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -8600.0], t$95$3, If[LessEqual[b, 1.15e-212], t$95$1, If[LessEqual[b, 5e-99], t$95$2, If[LessEqual[b, 1.5e-41], t$95$1, If[LessEqual[b, 8.5e+34], t$95$2, If[LessEqual[b, 9e+199], t$95$1, t$95$3]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := c + x \cdot y\\
t_2 := c + 0.0625 \cdot \left(t \cdot z\right)\\
t_3 := b \cdot \left(a \cdot -0.25\right)\\
\mathbf{if}\;b \leq -8600:\\
\;\;\;\;t_3\\
\mathbf{elif}\;b \leq 1.15 \cdot 10^{-212}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \leq 5 \cdot 10^{-99}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;b \leq 1.5 \cdot 10^{-41}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \leq 8.5 \cdot 10^{+34}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;b \leq 9 \cdot 10^{+199}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_3\\
\end{array}
\end{array}
if b < -8600 or 8.9999999999999994e199 < b Initial program 93.0%
associate-+l-93.0%
fma-def93.0%
associate-*l/93.0%
associate-*l/94.7%
Simplified94.7%
Taylor expanded in z around 0 78.9%
Taylor expanded in a around inf 48.3%
*-commutative48.3%
*-commutative48.3%
associate-*r*50.0%
Simplified50.0%
if -8600 < b < 1.15e-212 or 4.99999999999999969e-99 < b < 1.49999999999999994e-41 or 8.5000000000000003e34 < b < 8.9999999999999994e199Initial program 98.4%
Taylor expanded in x around inf 61.7%
if 1.15e-212 < b < 4.99999999999999969e-99 or 1.49999999999999994e-41 < b < 8.5000000000000003e34Initial program 100.0%
Taylor expanded in z around inf 64.6%
Final simplification57.8%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (+ c (* x y))) (t_2 (* b (* a -0.25))))
(if (<= b -55000000.0)
t_2
(if (<= b 1.55e-41)
t_1
(if (<= b 1.56e+31) (* 0.0625 (* t z)) (if (<= b 1.4e+200) 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 <= -55000000.0) {
tmp = t_2;
} else if (b <= 1.55e-41) {
tmp = t_1;
} else if (b <= 1.56e+31) {
tmp = 0.0625 * (t * z);
} else if (b <= 1.4e+200) {
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 <= (-55000000.0d0)) then
tmp = t_2
else if (b <= 1.55d-41) then
tmp = t_1
else if (b <= 1.56d+31) then
tmp = 0.0625d0 * (t * z)
else if (b <= 1.4d+200) 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 <= -55000000.0) {
tmp = t_2;
} else if (b <= 1.55e-41) {
tmp = t_1;
} else if (b <= 1.56e+31) {
tmp = 0.0625 * (t * z);
} else if (b <= 1.4e+200) {
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 <= -55000000.0: tmp = t_2 elif b <= 1.55e-41: tmp = t_1 elif b <= 1.56e+31: tmp = 0.0625 * (t * z) elif b <= 1.4e+200: 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 (b <= -55000000.0) tmp = t_2; elseif (b <= 1.55e-41) tmp = t_1; elseif (b <= 1.56e+31) tmp = Float64(0.0625 * Float64(t * z)); elseif (b <= 1.4e+200) 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 <= -55000000.0) tmp = t_2; elseif (b <= 1.55e-41) tmp = t_1; elseif (b <= 1.56e+31) tmp = 0.0625 * (t * z); elseif (b <= 1.4e+200) 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[b, -55000000.0], t$95$2, If[LessEqual[b, 1.55e-41], t$95$1, If[LessEqual[b, 1.56e+31], N[(0.0625 * N[(t * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1.4e+200], 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}\;b \leq -55000000:\\
\;\;\;\;t_2\\
\mathbf{elif}\;b \leq 1.55 \cdot 10^{-41}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \leq 1.56 \cdot 10^{+31}:\\
\;\;\;\;0.0625 \cdot \left(t \cdot z\right)\\
\mathbf{elif}\;b \leq 1.4 \cdot 10^{+200}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if b < -5.5e7 or 1.39999999999999992e200 < b Initial program 93.0%
associate-+l-93.0%
fma-def93.0%
associate-*l/93.0%
associate-*l/94.7%
Simplified94.7%
Taylor expanded in z around 0 78.7%
Taylor expanded in a around inf 48.8%
*-commutative48.8%
*-commutative48.8%
associate-*r*50.5%
Simplified50.5%
if -5.5e7 < b < 1.55e-41 or 1.56000000000000004e31 < b < 1.39999999999999992e200Initial program 98.6%
Taylor expanded in x around inf 61.8%
if 1.55e-41 < b < 1.56000000000000004e31Initial program 100.0%
associate-+l-100.0%
fma-def100.0%
associate-*l/100.0%
associate-*l/100.0%
Simplified100.0%
Taylor expanded in x around 0 85.5%
Taylor expanded in t around inf 54.8%
Final simplification57.3%
(FPCore (x y z t a b c) :precision binary64 (if (<= y -3.2e-115) (* x y) (if (<= y 7.7e-28) c (if (<= y 8.6e+148) (* 0.0625 (* t z)) (* x y)))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (y <= -3.2e-115) {
tmp = x * y;
} else if (y <= 7.7e-28) {
tmp = c;
} else if (y <= 8.6e+148) {
tmp = 0.0625 * (t * z);
} 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 (y <= (-3.2d-115)) then
tmp = x * y
else if (y <= 7.7d-28) then
tmp = c
else if (y <= 8.6d+148) then
tmp = 0.0625d0 * (t * z)
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 (y <= -3.2e-115) {
tmp = x * y;
} else if (y <= 7.7e-28) {
tmp = c;
} else if (y <= 8.6e+148) {
tmp = 0.0625 * (t * z);
} else {
tmp = x * y;
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if y <= -3.2e-115: tmp = x * y elif y <= 7.7e-28: tmp = c elif y <= 8.6e+148: tmp = 0.0625 * (t * z) else: tmp = x * y return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (y <= -3.2e-115) tmp = Float64(x * y); elseif (y <= 7.7e-28) tmp = c; elseif (y <= 8.6e+148) tmp = Float64(0.0625 * Float64(t * z)); else tmp = Float64(x * y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (y <= -3.2e-115) tmp = x * y; elseif (y <= 7.7e-28) tmp = c; elseif (y <= 8.6e+148) tmp = 0.0625 * (t * z); else tmp = x * y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[y, -3.2e-115], N[(x * y), $MachinePrecision], If[LessEqual[y, 7.7e-28], c, If[LessEqual[y, 8.6e+148], N[(0.0625 * N[(t * z), $MachinePrecision]), $MachinePrecision], N[(x * y), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.2 \cdot 10^{-115}:\\
\;\;\;\;x \cdot y\\
\mathbf{elif}\;y \leq 7.7 \cdot 10^{-28}:\\
\;\;\;\;c\\
\mathbf{elif}\;y \leq 8.6 \cdot 10^{+148}:\\
\;\;\;\;0.0625 \cdot \left(t \cdot z\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot y\\
\end{array}
\end{array}
if y < -3.2e-115 or 8.6000000000000003e148 < y Initial program 94.4%
associate-+l-94.4%
fma-def95.2%
associate-*l/95.2%
associate-*l/95.2%
Simplified95.2%
Taylor expanded in z around 0 81.5%
Taylor expanded in y around inf 41.3%
if -3.2e-115 < y < 7.7000000000000001e-28Initial program 99.1%
associate-+l-99.1%
fma-def99.1%
associate-*l/99.1%
associate-*l/100.0%
Simplified100.0%
Taylor expanded in c around inf 39.0%
if 7.7000000000000001e-28 < y < 8.6000000000000003e148Initial program 97.8%
associate-+l-97.8%
fma-def97.8%
associate-*l/97.8%
associate-*l/100.0%
Simplified100.0%
Taylor expanded in x around 0 71.4%
Taylor expanded in t around inf 43.7%
Final simplification40.8%
(FPCore (x y z t a b c) :precision binary64 (if (<= c -2.8e+86) c (if (<= c 56000000.0) (* x y) c)))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (c <= -2.8e+86) {
tmp = c;
} else if (c <= 56000000.0) {
tmp = x * y;
} else {
tmp = c;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if (c <= (-2.8d+86)) then
tmp = c
else if (c <= 56000000.0d0) then
tmp = x * y
else
tmp = c
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (c <= -2.8e+86) {
tmp = c;
} else if (c <= 56000000.0) {
tmp = x * y;
} else {
tmp = c;
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if c <= -2.8e+86: tmp = c elif c <= 56000000.0: tmp = x * y else: tmp = c return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (c <= -2.8e+86) tmp = c; elseif (c <= 56000000.0) tmp = Float64(x * y); else tmp = c; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (c <= -2.8e+86) tmp = c; elseif (c <= 56000000.0) tmp = x * y; else tmp = c; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[c, -2.8e+86], c, If[LessEqual[c, 56000000.0], N[(x * y), $MachinePrecision], c]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;c \leq -2.8 \cdot 10^{+86}:\\
\;\;\;\;c\\
\mathbf{elif}\;c \leq 56000000:\\
\;\;\;\;x \cdot y\\
\mathbf{else}:\\
\;\;\;\;c\\
\end{array}
\end{array}
if c < -2.80000000000000004e86 or 5.6e7 < c Initial program 96.8%
associate-+l-96.8%
fma-def97.7%
associate-*l/97.7%
associate-*l/99.1%
Simplified99.1%
Taylor expanded in c around inf 48.1%
if -2.80000000000000004e86 < c < 5.6e7Initial program 96.5%
associate-+l-96.5%
fma-def96.5%
associate-*l/96.5%
associate-*l/96.5%
Simplified96.5%
Taylor expanded in z around 0 70.2%
Taylor expanded in y around inf 34.5%
Final simplification40.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 96.6%
associate-+l-96.6%
fma-def97.0%
associate-*l/97.0%
associate-*l/97.6%
Simplified97.6%
Taylor expanded in c around inf 26.1%
Final simplification26.1%
herbie shell --seed 2023224
(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))