
(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 x y (fma (/ z 16.0) t (fma (/ a -4.0) b c))))
double code(double x, double y, double z, double t, double a, double b, double c) {
return fma(x, y, fma((z / 16.0), t, fma((a / -4.0), b, c)));
}
function code(x, y, z, t, a, b, c) return fma(x, y, fma(Float64(z / 16.0), t, fma(Float64(a / -4.0), b, c))) end
code[x_, y_, z_, t_, a_, b_, c_] := N[(x * y + N[(N[(z / 16.0), $MachinePrecision] * t + N[(N[(a / -4.0), $MachinePrecision] * b + c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(x, y, \mathsf{fma}\left(\frac{z}{16}, t, \mathsf{fma}\left(\frac{a}{-4}, b, c\right)\right)\right)
\end{array}
Initial program 98.0%
associate-+l-98.0%
associate--l+98.0%
fma-def98.4%
associate-*l/98.4%
fma-neg99.2%
sub-neg99.2%
distribute-neg-in99.2%
remove-double-neg99.2%
associate-/l*99.2%
distribute-frac-neg99.2%
associate-/r/99.2%
fma-def99.2%
neg-mul-199.2%
*-commutative99.2%
associate-/l*99.2%
metadata-eval99.2%
Simplified99.2%
Final simplification99.2%
(FPCore (x y z t a b c) :precision binary64 (+ (* x y) (fma (* z 0.0625) t (fma (* a -0.25) b c))))
double code(double x, double y, double z, double t, double a, double b, double c) {
return (x * y) + fma((z * 0.0625), t, fma((a * -0.25), b, c));
}
function code(x, y, z, t, a, b, c) return Float64(Float64(x * y) + fma(Float64(z * 0.0625), t, fma(Float64(a * -0.25), b, c))) end
code[x_, y_, z_, t_, a_, b_, c_] := N[(N[(x * y), $MachinePrecision] + N[(N[(z * 0.0625), $MachinePrecision] * t + N[(N[(a * -0.25), $MachinePrecision] * b + c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x \cdot y + \mathsf{fma}\left(z \cdot 0.0625, t, \mathsf{fma}\left(a \cdot -0.25, b, c\right)\right)
\end{array}
Initial program 98.0%
associate-+l-98.0%
associate--l+98.0%
fma-def98.4%
associate-*l/98.4%
fma-neg99.2%
sub-neg99.2%
distribute-neg-in99.2%
remove-double-neg99.2%
associate-/l*99.2%
distribute-frac-neg99.2%
associate-/r/99.2%
fma-def99.2%
neg-mul-199.2%
*-commutative99.2%
associate-/l*99.2%
metadata-eval99.2%
Simplified99.2%
fma-udef98.4%
div-inv98.4%
metadata-eval98.4%
div-inv98.4%
metadata-eval98.4%
Applied egg-rr98.4%
Final simplification98.4%
(FPCore (x y z t a b c) :precision binary64 (+ (fma x y (/ t (/ 16.0 z))) (- c (/ a (/ 4.0 b)))))
double code(double x, double y, double z, double t, double a, double b, double c) {
return fma(x, y, (t / (16.0 / z))) + (c - (a / (4.0 / b)));
}
function code(x, y, z, t, a, b, c) return Float64(fma(x, y, Float64(t / Float64(16.0 / z))) + Float64(c - Float64(a / Float64(4.0 / b)))) end
code[x_, y_, z_, t_, a_, b_, c_] := N[(N[(x * y + N[(t / N[(16.0 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(c - N[(a / N[(4.0 / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(x, y, \frac{t}{\frac{16}{z}}\right) + \left(c - \frac{a}{\frac{4}{b}}\right)
\end{array}
Initial program 98.0%
associate-+l-98.0%
fma-def98.4%
*-commutative98.4%
associate-/l*98.3%
associate-/l*98.3%
Simplified98.3%
Final simplification98.3%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (+ c (* x y))) (t_2 (* 0.0625 (* z t))) (t_3 (* -0.25 (* a b))))
(if (<= (* a b) -3.8e+47)
t_3
(if (<= (* a b) -5.5)
t_1
(if (<= (* a b) -1.25e-109)
t_2
(if (<= (* a b) 4.2e-185)
t_1
(if (<= (* a b) 1.3e-85)
t_2
(if (<= (* a b) 2.7e-43)
t_1
(if (<= (* a b) 1.32e-15)
t_2
(if (<= (* a b) 3.6e+84) 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 = 0.0625 * (z * t);
double t_3 = -0.25 * (a * b);
double tmp;
if ((a * b) <= -3.8e+47) {
tmp = t_3;
} else if ((a * b) <= -5.5) {
tmp = t_1;
} else if ((a * b) <= -1.25e-109) {
tmp = t_2;
} else if ((a * b) <= 4.2e-185) {
tmp = t_1;
} else if ((a * b) <= 1.3e-85) {
tmp = t_2;
} else if ((a * b) <= 2.7e-43) {
tmp = t_1;
} else if ((a * b) <= 1.32e-15) {
tmp = t_2;
} else if ((a * b) <= 3.6e+84) {
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 = 0.0625d0 * (z * t)
t_3 = (-0.25d0) * (a * b)
if ((a * b) <= (-3.8d+47)) then
tmp = t_3
else if ((a * b) <= (-5.5d0)) then
tmp = t_1
else if ((a * b) <= (-1.25d-109)) then
tmp = t_2
else if ((a * b) <= 4.2d-185) then
tmp = t_1
else if ((a * b) <= 1.3d-85) then
tmp = t_2
else if ((a * b) <= 2.7d-43) then
tmp = t_1
else if ((a * b) <= 1.32d-15) then
tmp = t_2
else if ((a * b) <= 3.6d+84) 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 = 0.0625 * (z * t);
double t_3 = -0.25 * (a * b);
double tmp;
if ((a * b) <= -3.8e+47) {
tmp = t_3;
} else if ((a * b) <= -5.5) {
tmp = t_1;
} else if ((a * b) <= -1.25e-109) {
tmp = t_2;
} else if ((a * b) <= 4.2e-185) {
tmp = t_1;
} else if ((a * b) <= 1.3e-85) {
tmp = t_2;
} else if ((a * b) <= 2.7e-43) {
tmp = t_1;
} else if ((a * b) <= 1.32e-15) {
tmp = t_2;
} else if ((a * b) <= 3.6e+84) {
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 = 0.0625 * (z * t) t_3 = -0.25 * (a * b) tmp = 0 if (a * b) <= -3.8e+47: tmp = t_3 elif (a * b) <= -5.5: tmp = t_1 elif (a * b) <= -1.25e-109: tmp = t_2 elif (a * b) <= 4.2e-185: tmp = t_1 elif (a * b) <= 1.3e-85: tmp = t_2 elif (a * b) <= 2.7e-43: tmp = t_1 elif (a * b) <= 1.32e-15: tmp = t_2 elif (a * b) <= 3.6e+84: 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(0.0625 * Float64(z * t)) t_3 = Float64(-0.25 * Float64(a * b)) tmp = 0.0 if (Float64(a * b) <= -3.8e+47) tmp = t_3; elseif (Float64(a * b) <= -5.5) tmp = t_1; elseif (Float64(a * b) <= -1.25e-109) tmp = t_2; elseif (Float64(a * b) <= 4.2e-185) tmp = t_1; elseif (Float64(a * b) <= 1.3e-85) tmp = t_2; elseif (Float64(a * b) <= 2.7e-43) tmp = t_1; elseif (Float64(a * b) <= 1.32e-15) tmp = t_2; elseif (Float64(a * b) <= 3.6e+84) 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 = 0.0625 * (z * t); t_3 = -0.25 * (a * b); tmp = 0.0; if ((a * b) <= -3.8e+47) tmp = t_3; elseif ((a * b) <= -5.5) tmp = t_1; elseif ((a * b) <= -1.25e-109) tmp = t_2; elseif ((a * b) <= 4.2e-185) tmp = t_1; elseif ((a * b) <= 1.3e-85) tmp = t_2; elseif ((a * b) <= 2.7e-43) tmp = t_1; elseif ((a * b) <= 1.32e-15) tmp = t_2; elseif ((a * b) <= 3.6e+84) 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[(0.0625 * N[(z * t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(-0.25 * N[(a * b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(a * b), $MachinePrecision], -3.8e+47], t$95$3, If[LessEqual[N[(a * b), $MachinePrecision], -5.5], t$95$1, If[LessEqual[N[(a * b), $MachinePrecision], -1.25e-109], t$95$2, If[LessEqual[N[(a * b), $MachinePrecision], 4.2e-185], t$95$1, If[LessEqual[N[(a * b), $MachinePrecision], 1.3e-85], t$95$2, If[LessEqual[N[(a * b), $MachinePrecision], 2.7e-43], t$95$1, If[LessEqual[N[(a * b), $MachinePrecision], 1.32e-15], t$95$2, If[LessEqual[N[(a * b), $MachinePrecision], 3.6e+84], t$95$1, t$95$3]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := c + x \cdot y\\
t_2 := 0.0625 \cdot \left(z \cdot t\right)\\
t_3 := -0.25 \cdot \left(a \cdot b\right)\\
\mathbf{if}\;a \cdot b \leq -3.8 \cdot 10^{+47}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;a \cdot b \leq -5.5:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \cdot b \leq -1.25 \cdot 10^{-109}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;a \cdot b \leq 4.2 \cdot 10^{-185}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \cdot b \leq 1.3 \cdot 10^{-85}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;a \cdot b \leq 2.7 \cdot 10^{-43}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \cdot b \leq 1.32 \cdot 10^{-15}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;a \cdot b \leq 3.6 \cdot 10^{+84}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_3\\
\end{array}
\end{array}
if (*.f64 a b) < -3.8000000000000003e47 or 3.5999999999999999e84 < (*.f64 a b) Initial program 96.2%
associate-+l-96.2%
associate--l+96.2%
fma-def96.2%
associate-*l/96.2%
fma-neg98.1%
sub-neg98.1%
distribute-neg-in98.1%
remove-double-neg98.1%
associate-/l*98.0%
distribute-frac-neg98.0%
associate-/r/98.1%
fma-def98.1%
neg-mul-198.1%
*-commutative98.1%
associate-/l*98.1%
metadata-eval98.1%
Simplified98.1%
fma-udef97.2%
div-inv97.2%
metadata-eval97.2%
div-inv97.2%
metadata-eval97.2%
Applied egg-rr97.2%
Taylor expanded in a around inf 62.1%
if -3.8000000000000003e47 < (*.f64 a b) < -5.5 or -1.25000000000000005e-109 < (*.f64 a b) < 4.2e-185 or 1.30000000000000006e-85 < (*.f64 a b) < 2.69999999999999991e-43 or 1.31999999999999995e-15 < (*.f64 a b) < 3.5999999999999999e84Initial program 99.1%
Taylor expanded in x around inf 68.3%
if -5.5 < (*.f64 a b) < -1.25000000000000005e-109 or 4.2e-185 < (*.f64 a b) < 1.30000000000000006e-85 or 2.69999999999999991e-43 < (*.f64 a b) < 1.31999999999999995e-15Initial program 100.0%
associate-+l-100.0%
associate--l+100.0%
fma-def100.0%
associate-*l/100.0%
fma-neg100.0%
sub-neg100.0%
distribute-neg-in100.0%
remove-double-neg100.0%
associate-/l*100.0%
distribute-frac-neg100.0%
associate-/r/100.0%
fma-def100.0%
neg-mul-1100.0%
*-commutative100.0%
associate-/l*100.0%
metadata-eval100.0%
Simplified100.0%
fma-udef100.0%
div-inv100.0%
metadata-eval100.0%
div-inv100.0%
metadata-eval100.0%
Applied egg-rr100.0%
Taylor expanded in z around inf 68.9%
Final simplification65.8%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* 0.0625 (* z t))) (t_2 (+ c t_1)) (t_3 (+ c (* b (* a -0.25)))))
(if (<= (* x y) -3.05e+87)
(+ c (* x y))
(if (<= (* x y) 9.2e-294)
t_2
(if (<= (* x y) 2.1e-69)
t_3
(if (<= (* x y) 0.028)
t_2
(if (<= (* x y) 5e+166) t_3 (+ (* x y) t_1))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = 0.0625 * (z * t);
double t_2 = c + t_1;
double t_3 = c + (b * (a * -0.25));
double tmp;
if ((x * y) <= -3.05e+87) {
tmp = c + (x * y);
} else if ((x * y) <= 9.2e-294) {
tmp = t_2;
} else if ((x * y) <= 2.1e-69) {
tmp = t_3;
} else if ((x * y) <= 0.028) {
tmp = t_2;
} else if ((x * y) <= 5e+166) {
tmp = t_3;
} else {
tmp = (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) :: t_3
real(8) :: tmp
t_1 = 0.0625d0 * (z * t)
t_2 = c + t_1
t_3 = c + (b * (a * (-0.25d0)))
if ((x * y) <= (-3.05d+87)) then
tmp = c + (x * y)
else if ((x * y) <= 9.2d-294) then
tmp = t_2
else if ((x * y) <= 2.1d-69) then
tmp = t_3
else if ((x * y) <= 0.028d0) then
tmp = t_2
else if ((x * y) <= 5d+166) then
tmp = t_3
else
tmp = (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 = 0.0625 * (z * t);
double t_2 = c + t_1;
double t_3 = c + (b * (a * -0.25));
double tmp;
if ((x * y) <= -3.05e+87) {
tmp = c + (x * y);
} else if ((x * y) <= 9.2e-294) {
tmp = t_2;
} else if ((x * y) <= 2.1e-69) {
tmp = t_3;
} else if ((x * y) <= 0.028) {
tmp = t_2;
} else if ((x * y) <= 5e+166) {
tmp = t_3;
} else {
tmp = (x * y) + t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = 0.0625 * (z * t) t_2 = c + t_1 t_3 = c + (b * (a * -0.25)) tmp = 0 if (x * y) <= -3.05e+87: tmp = c + (x * y) elif (x * y) <= 9.2e-294: tmp = t_2 elif (x * y) <= 2.1e-69: tmp = t_3 elif (x * y) <= 0.028: tmp = t_2 elif (x * y) <= 5e+166: tmp = t_3 else: tmp = (x * y) + t_1 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(0.0625 * Float64(z * t)) t_2 = Float64(c + t_1) t_3 = Float64(c + Float64(b * Float64(a * -0.25))) tmp = 0.0 if (Float64(x * y) <= -3.05e+87) tmp = Float64(c + Float64(x * y)); elseif (Float64(x * y) <= 9.2e-294) tmp = t_2; elseif (Float64(x * y) <= 2.1e-69) tmp = t_3; elseif (Float64(x * y) <= 0.028) tmp = t_2; elseif (Float64(x * y) <= 5e+166) tmp = t_3; else tmp = Float64(Float64(x * y) + t_1); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = 0.0625 * (z * t); t_2 = c + t_1; t_3 = c + (b * (a * -0.25)); tmp = 0.0; if ((x * y) <= -3.05e+87) tmp = c + (x * y); elseif ((x * y) <= 9.2e-294) tmp = t_2; elseif ((x * y) <= 2.1e-69) tmp = t_3; elseif ((x * y) <= 0.028) tmp = t_2; elseif ((x * y) <= 5e+166) tmp = t_3; else tmp = (x * y) + t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(0.0625 * N[(z * t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(c + t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(c + N[(b * N[(a * -0.25), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(x * y), $MachinePrecision], -3.05e+87], N[(c + N[(x * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 9.2e-294], t$95$2, If[LessEqual[N[(x * y), $MachinePrecision], 2.1e-69], t$95$3, If[LessEqual[N[(x * y), $MachinePrecision], 0.028], t$95$2, If[LessEqual[N[(x * y), $MachinePrecision], 5e+166], t$95$3, N[(N[(x * y), $MachinePrecision] + t$95$1), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 0.0625 \cdot \left(z \cdot t\right)\\
t_2 := c + t_1\\
t_3 := c + b \cdot \left(a \cdot -0.25\right)\\
\mathbf{if}\;x \cdot y \leq -3.05 \cdot 10^{+87}:\\
\;\;\;\;c + x \cdot y\\
\mathbf{elif}\;x \cdot y \leq 9.2 \cdot 10^{-294}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \cdot y \leq 2.1 \cdot 10^{-69}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;x \cdot y \leq 0.028:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \cdot y \leq 5 \cdot 10^{+166}:\\
\;\;\;\;t_3\\
\mathbf{else}:\\
\;\;\;\;x \cdot y + t_1\\
\end{array}
\end{array}
if (*.f64 x y) < -3.0499999999999999e87Initial program 95.3%
Taylor expanded in x around inf 81.8%
if -3.0499999999999999e87 < (*.f64 x y) < 9.20000000000000064e-294 or 2.1e-69 < (*.f64 x y) < 0.0280000000000000006Initial program 100.0%
Taylor expanded in z around inf 71.3%
if 9.20000000000000064e-294 < (*.f64 x y) < 2.1e-69 or 0.0280000000000000006 < (*.f64 x y) < 5.0000000000000002e166Initial program 98.7%
Taylor expanded in a around inf 70.0%
associate-*r*70.0%
*-commutative70.0%
Simplified70.0%
if 5.0000000000000002e166 < (*.f64 x y) Initial program 93.5%
Taylor expanded in a around 0 90.8%
Taylor expanded in c around 0 84.6%
Final simplification74.3%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* 0.0625 (* z t)))
(t_2 (* (* a b) 0.25))
(t_3 (- (+ c t_1) t_2))
(t_4 (+ c (+ (* x y) t_1))))
(if (<= (* x y) -2.65e+91)
t_4
(if (<= (* x y) 6.5e+35)
t_3
(if (<= (* x y) 1.7e+122)
(- (+ c (* x y)) t_2)
(if (<= (* x y) 1.85e+160) 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 * (z * t);
double t_2 = (a * b) * 0.25;
double t_3 = (c + t_1) - t_2;
double t_4 = c + ((x * y) + t_1);
double tmp;
if ((x * y) <= -2.65e+91) {
tmp = t_4;
} else if ((x * y) <= 6.5e+35) {
tmp = t_3;
} else if ((x * y) <= 1.7e+122) {
tmp = (c + (x * y)) - t_2;
} else if ((x * y) <= 1.85e+160) {
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 * (z * t)
t_2 = (a * b) * 0.25d0
t_3 = (c + t_1) - t_2
t_4 = c + ((x * y) + t_1)
if ((x * y) <= (-2.65d+91)) then
tmp = t_4
else if ((x * y) <= 6.5d+35) then
tmp = t_3
else if ((x * y) <= 1.7d+122) then
tmp = (c + (x * y)) - t_2
else if ((x * y) <= 1.85d+160) 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 * (z * t);
double t_2 = (a * b) * 0.25;
double t_3 = (c + t_1) - t_2;
double t_4 = c + ((x * y) + t_1);
double tmp;
if ((x * y) <= -2.65e+91) {
tmp = t_4;
} else if ((x * y) <= 6.5e+35) {
tmp = t_3;
} else if ((x * y) <= 1.7e+122) {
tmp = (c + (x * y)) - t_2;
} else if ((x * y) <= 1.85e+160) {
tmp = t_3;
} else {
tmp = t_4;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = 0.0625 * (z * t) t_2 = (a * b) * 0.25 t_3 = (c + t_1) - t_2 t_4 = c + ((x * y) + t_1) tmp = 0 if (x * y) <= -2.65e+91: tmp = t_4 elif (x * y) <= 6.5e+35: tmp = t_3 elif (x * y) <= 1.7e+122: tmp = (c + (x * y)) - t_2 elif (x * y) <= 1.85e+160: tmp = t_3 else: tmp = t_4 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(0.0625 * Float64(z * t)) t_2 = Float64(Float64(a * b) * 0.25) t_3 = Float64(Float64(c + t_1) - t_2) t_4 = Float64(c + Float64(Float64(x * y) + t_1)) tmp = 0.0 if (Float64(x * y) <= -2.65e+91) tmp = t_4; elseif (Float64(x * y) <= 6.5e+35) tmp = t_3; elseif (Float64(x * y) <= 1.7e+122) tmp = Float64(Float64(c + Float64(x * y)) - t_2); elseif (Float64(x * y) <= 1.85e+160) 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 * (z * t); t_2 = (a * b) * 0.25; t_3 = (c + t_1) - t_2; t_4 = c + ((x * y) + t_1); tmp = 0.0; if ((x * y) <= -2.65e+91) tmp = t_4; elseif ((x * y) <= 6.5e+35) tmp = t_3; elseif ((x * y) <= 1.7e+122) tmp = (c + (x * y)) - t_2; elseif ((x * y) <= 1.85e+160) 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[(z * t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(a * b), $MachinePrecision] * 0.25), $MachinePrecision]}, Block[{t$95$3 = N[(N[(c + t$95$1), $MachinePrecision] - t$95$2), $MachinePrecision]}, Block[{t$95$4 = N[(c + N[(N[(x * y), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(x * y), $MachinePrecision], -2.65e+91], t$95$4, If[LessEqual[N[(x * y), $MachinePrecision], 6.5e+35], t$95$3, If[LessEqual[N[(x * y), $MachinePrecision], 1.7e+122], N[(N[(c + N[(x * y), $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 1.85e+160], t$95$3, t$95$4]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 0.0625 \cdot \left(z \cdot t\right)\\
t_2 := \left(a \cdot b\right) \cdot 0.25\\
t_3 := \left(c + t_1\right) - t_2\\
t_4 := c + \left(x \cdot y + t_1\right)\\
\mathbf{if}\;x \cdot y \leq -2.65 \cdot 10^{+91}:\\
\;\;\;\;t_4\\
\mathbf{elif}\;x \cdot y \leq 6.5 \cdot 10^{+35}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;x \cdot y \leq 1.7 \cdot 10^{+122}:\\
\;\;\;\;\left(c + x \cdot y\right) - t_2\\
\mathbf{elif}\;x \cdot y \leq 1.85 \cdot 10^{+160}:\\
\;\;\;\;t_3\\
\mathbf{else}:\\
\;\;\;\;t_4\\
\end{array}
\end{array}
if (*.f64 x y) < -2.64999999999999998e91 or 1.85000000000000008e160 < (*.f64 x y) Initial program 94.6%
Taylor expanded in a around 0 92.1%
if -2.64999999999999998e91 < (*.f64 x y) < 6.5000000000000003e35 or 1.7e122 < (*.f64 x y) < 1.85000000000000008e160Initial program 99.4%
Taylor expanded in x around 0 96.7%
if 6.5000000000000003e35 < (*.f64 x y) < 1.7e122Initial program 99.9%
Taylor expanded in z around 0 94.0%
Final simplification95.2%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (+ c (* 0.0625 (* z t))))
(t_2 (+ c (* b (* a -0.25))))
(t_3 (+ c (* x y))))
(if (<= (* x y) -6.2e+87)
t_3
(if (<= (* x y) 1.85e-293)
t_1
(if (<= (* x y) 4e-64)
t_2
(if (<= (* x y) 0.048) t_1 (if (<= (* x y) 4.2e+170) t_2 t_3)))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = c + (0.0625 * (z * t));
double t_2 = c + (b * (a * -0.25));
double t_3 = c + (x * y);
double tmp;
if ((x * y) <= -6.2e+87) {
tmp = t_3;
} else if ((x * y) <= 1.85e-293) {
tmp = t_1;
} else if ((x * y) <= 4e-64) {
tmp = t_2;
} else if ((x * y) <= 0.048) {
tmp = t_1;
} else if ((x * y) <= 4.2e+170) {
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 + (0.0625d0 * (z * t))
t_2 = c + (b * (a * (-0.25d0)))
t_3 = c + (x * y)
if ((x * y) <= (-6.2d+87)) then
tmp = t_3
else if ((x * y) <= 1.85d-293) then
tmp = t_1
else if ((x * y) <= 4d-64) then
tmp = t_2
else if ((x * y) <= 0.048d0) then
tmp = t_1
else if ((x * y) <= 4.2d+170) 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 + (0.0625 * (z * t));
double t_2 = c + (b * (a * -0.25));
double t_3 = c + (x * y);
double tmp;
if ((x * y) <= -6.2e+87) {
tmp = t_3;
} else if ((x * y) <= 1.85e-293) {
tmp = t_1;
} else if ((x * y) <= 4e-64) {
tmp = t_2;
} else if ((x * y) <= 0.048) {
tmp = t_1;
} else if ((x * y) <= 4.2e+170) {
tmp = t_2;
} else {
tmp = t_3;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = c + (0.0625 * (z * t)) t_2 = c + (b * (a * -0.25)) t_3 = c + (x * y) tmp = 0 if (x * y) <= -6.2e+87: tmp = t_3 elif (x * y) <= 1.85e-293: tmp = t_1 elif (x * y) <= 4e-64: tmp = t_2 elif (x * y) <= 0.048: tmp = t_1 elif (x * y) <= 4.2e+170: tmp = t_2 else: tmp = t_3 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(c + Float64(0.0625 * Float64(z * t))) t_2 = Float64(c + Float64(b * Float64(a * -0.25))) t_3 = Float64(c + Float64(x * y)) tmp = 0.0 if (Float64(x * y) <= -6.2e+87) tmp = t_3; elseif (Float64(x * y) <= 1.85e-293) tmp = t_1; elseif (Float64(x * y) <= 4e-64) tmp = t_2; elseif (Float64(x * y) <= 0.048) tmp = t_1; elseif (Float64(x * y) <= 4.2e+170) 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 + (0.0625 * (z * t)); t_2 = c + (b * (a * -0.25)); t_3 = c + (x * y); tmp = 0.0; if ((x * y) <= -6.2e+87) tmp = t_3; elseif ((x * y) <= 1.85e-293) tmp = t_1; elseif ((x * y) <= 4e-64) tmp = t_2; elseif ((x * y) <= 0.048) tmp = t_1; elseif ((x * y) <= 4.2e+170) 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[(0.0625 * N[(z * t), $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[(x * y), $MachinePrecision], -6.2e+87], t$95$3, If[LessEqual[N[(x * y), $MachinePrecision], 1.85e-293], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], 4e-64], t$95$2, If[LessEqual[N[(x * y), $MachinePrecision], 0.048], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], 4.2e+170], t$95$2, t$95$3]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := c + 0.0625 \cdot \left(z \cdot t\right)\\
t_2 := c + b \cdot \left(a \cdot -0.25\right)\\
t_3 := c + x \cdot y\\
\mathbf{if}\;x \cdot y \leq -6.2 \cdot 10^{+87}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;x \cdot y \leq 1.85 \cdot 10^{-293}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \cdot y \leq 4 \cdot 10^{-64}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \cdot y \leq 0.048:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \cdot y \leq 4.2 \cdot 10^{+170}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_3\\
\end{array}
\end{array}
if (*.f64 x y) < -6.1999999999999999e87 or 4.19999999999999996e170 < (*.f64 x y) Initial program 94.5%
Taylor expanded in x around inf 77.9%
if -6.1999999999999999e87 < (*.f64 x y) < 1.85000000000000004e-293 or 3.99999999999999986e-64 < (*.f64 x y) < 0.048000000000000001Initial program 100.0%
Taylor expanded in z around inf 71.3%
if 1.85000000000000004e-293 < (*.f64 x y) < 3.99999999999999986e-64 or 0.048000000000000001 < (*.f64 x y) < 4.19999999999999996e170Initial program 98.7%
Taylor expanded in a around inf 70.4%
associate-*r*70.4%
*-commutative70.4%
Simplified70.4%
Final simplification72.9%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* -0.25 (* a b))))
(if (<= (* x y) -5.5e+91)
(* x y)
(if (<= (* x y) -1.1e-107)
t_1
(if (<= (* x y) -1e-315) c (if (<= (* x y) 1.75e+178) t_1 (* x y)))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = -0.25 * (a * b);
double tmp;
if ((x * y) <= -5.5e+91) {
tmp = x * y;
} else if ((x * y) <= -1.1e-107) {
tmp = t_1;
} else if ((x * y) <= -1e-315) {
tmp = c;
} else if ((x * y) <= 1.75e+178) {
tmp = t_1;
} else {
tmp = x * y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: t_1
real(8) :: tmp
t_1 = (-0.25d0) * (a * b)
if ((x * y) <= (-5.5d+91)) then
tmp = x * y
else if ((x * y) <= (-1.1d-107)) then
tmp = t_1
else if ((x * y) <= (-1d-315)) then
tmp = c
else if ((x * y) <= 1.75d+178) then
tmp = t_1
else
tmp = x * y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = -0.25 * (a * b);
double tmp;
if ((x * y) <= -5.5e+91) {
tmp = x * y;
} else if ((x * y) <= -1.1e-107) {
tmp = t_1;
} else if ((x * y) <= -1e-315) {
tmp = c;
} else if ((x * y) <= 1.75e+178) {
tmp = t_1;
} else {
tmp = x * y;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = -0.25 * (a * b) tmp = 0 if (x * y) <= -5.5e+91: tmp = x * y elif (x * y) <= -1.1e-107: tmp = t_1 elif (x * y) <= -1e-315: tmp = c elif (x * y) <= 1.75e+178: tmp = t_1 else: tmp = x * y return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(-0.25 * Float64(a * b)) tmp = 0.0 if (Float64(x * y) <= -5.5e+91) tmp = Float64(x * y); elseif (Float64(x * y) <= -1.1e-107) tmp = t_1; elseif (Float64(x * y) <= -1e-315) tmp = c; elseif (Float64(x * y) <= 1.75e+178) tmp = t_1; else tmp = Float64(x * y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = -0.25 * (a * b); tmp = 0.0; if ((x * y) <= -5.5e+91) tmp = x * y; elseif ((x * y) <= -1.1e-107) tmp = t_1; elseif ((x * y) <= -1e-315) tmp = c; elseif ((x * y) <= 1.75e+178) tmp = t_1; else tmp = x * y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(-0.25 * N[(a * b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(x * y), $MachinePrecision], -5.5e+91], N[(x * y), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], -1.1e-107], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], -1e-315], c, If[LessEqual[N[(x * y), $MachinePrecision], 1.75e+178], t$95$1, N[(x * y), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := -0.25 \cdot \left(a \cdot b\right)\\
\mathbf{if}\;x \cdot y \leq -5.5 \cdot 10^{+91}:\\
\;\;\;\;x \cdot y\\
\mathbf{elif}\;x \cdot y \leq -1.1 \cdot 10^{-107}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \cdot y \leq -1 \cdot 10^{-315}:\\
\;\;\;\;c\\
\mathbf{elif}\;x \cdot y \leq 1.75 \cdot 10^{+178}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x \cdot y\\
\end{array}
\end{array}
if (*.f64 x y) < -5.4999999999999998e91 or 1.75e178 < (*.f64 x y) Initial program 94.3%
associate-+l-94.3%
associate--l+94.3%
fma-def95.7%
associate-*l/95.7%
fma-neg97.1%
sub-neg97.1%
distribute-neg-in97.1%
remove-double-neg97.1%
associate-/l*97.1%
distribute-frac-neg97.1%
associate-/r/97.1%
fma-def97.1%
neg-mul-197.1%
*-commutative97.1%
associate-/l*97.1%
metadata-eval97.1%
Simplified97.1%
fma-udef94.3%
div-inv94.3%
metadata-eval94.3%
div-inv94.3%
metadata-eval94.3%
Applied egg-rr94.3%
Taylor expanded in x around inf 69.0%
if -5.4999999999999998e91 < (*.f64 x y) < -1.10000000000000006e-107 or -9.999999985e-316 < (*.f64 x y) < 1.75e178Initial program 99.4%
associate-+l-99.4%
associate--l+99.4%
fma-def99.4%
associate-*l/99.4%
fma-neg100.0%
sub-neg100.0%
distribute-neg-in100.0%
remove-double-neg100.0%
associate-/l*99.9%
distribute-frac-neg99.9%
associate-/r/100.0%
fma-def100.0%
neg-mul-1100.0%
*-commutative100.0%
associate-/l*100.0%
metadata-eval100.0%
Simplified100.0%
fma-udef100.0%
div-inv100.0%
metadata-eval100.0%
div-inv100.0%
metadata-eval100.0%
Applied egg-rr100.0%
Taylor expanded in a around inf 40.8%
if -1.10000000000000006e-107 < (*.f64 x y) < -9.999999985e-316Initial program 100.0%
Taylor expanded in c around inf 31.6%
Final simplification47.7%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* 0.0625 (* z t))) (t_2 (* -0.25 (* a b))))
(if (<= (* a b) -1.1e+62)
t_2
(if (<= (* a b) -1.3e-109)
t_1
(if (<= (* a b) -1.25e-307) c (if (<= (* a b) 2.3e+159) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = 0.0625 * (z * t);
double t_2 = -0.25 * (a * b);
double tmp;
if ((a * b) <= -1.1e+62) {
tmp = t_2;
} else if ((a * b) <= -1.3e-109) {
tmp = t_1;
} else if ((a * b) <= -1.25e-307) {
tmp = c;
} else if ((a * b) <= 2.3e+159) {
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 = 0.0625d0 * (z * t)
t_2 = (-0.25d0) * (a * b)
if ((a * b) <= (-1.1d+62)) then
tmp = t_2
else if ((a * b) <= (-1.3d-109)) then
tmp = t_1
else if ((a * b) <= (-1.25d-307)) then
tmp = c
else if ((a * b) <= 2.3d+159) 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 = 0.0625 * (z * t);
double t_2 = -0.25 * (a * b);
double tmp;
if ((a * b) <= -1.1e+62) {
tmp = t_2;
} else if ((a * b) <= -1.3e-109) {
tmp = t_1;
} else if ((a * b) <= -1.25e-307) {
tmp = c;
} else if ((a * b) <= 2.3e+159) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = 0.0625 * (z * t) t_2 = -0.25 * (a * b) tmp = 0 if (a * b) <= -1.1e+62: tmp = t_2 elif (a * b) <= -1.3e-109: tmp = t_1 elif (a * b) <= -1.25e-307: tmp = c elif (a * b) <= 2.3e+159: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(0.0625 * Float64(z * t)) t_2 = Float64(-0.25 * Float64(a * b)) tmp = 0.0 if (Float64(a * b) <= -1.1e+62) tmp = t_2; elseif (Float64(a * b) <= -1.3e-109) tmp = t_1; elseif (Float64(a * b) <= -1.25e-307) tmp = c; elseif (Float64(a * b) <= 2.3e+159) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = 0.0625 * (z * t); t_2 = -0.25 * (a * b); tmp = 0.0; if ((a * b) <= -1.1e+62) tmp = t_2; elseif ((a * b) <= -1.3e-109) tmp = t_1; elseif ((a * b) <= -1.25e-307) tmp = c; elseif ((a * b) <= 2.3e+159) 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[(0.0625 * N[(z * t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(-0.25 * N[(a * b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(a * b), $MachinePrecision], -1.1e+62], t$95$2, If[LessEqual[N[(a * b), $MachinePrecision], -1.3e-109], t$95$1, If[LessEqual[N[(a * b), $MachinePrecision], -1.25e-307], c, If[LessEqual[N[(a * b), $MachinePrecision], 2.3e+159], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 0.0625 \cdot \left(z \cdot t\right)\\
t_2 := -0.25 \cdot \left(a \cdot b\right)\\
\mathbf{if}\;a \cdot b \leq -1.1 \cdot 10^{+62}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;a \cdot b \leq -1.3 \cdot 10^{-109}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \cdot b \leq -1.25 \cdot 10^{-307}:\\
\;\;\;\;c\\
\mathbf{elif}\;a \cdot b \leq 2.3 \cdot 10^{+159}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if (*.f64 a b) < -1.10000000000000007e62 or 2.29999999999999995e159 < (*.f64 a b) Initial program 95.8%
associate-+l-95.8%
associate--l+95.8%
fma-def95.8%
associate-*l/95.8%
fma-neg97.9%
sub-neg97.9%
distribute-neg-in97.9%
remove-double-neg97.9%
associate-/l*97.8%
distribute-frac-neg97.8%
associate-/r/97.9%
fma-def97.9%
neg-mul-197.9%
*-commutative97.9%
associate-/l*97.9%
metadata-eval97.9%
Simplified97.9%
fma-udef96.8%
div-inv96.8%
metadata-eval96.8%
div-inv96.8%
metadata-eval96.8%
Applied egg-rr96.8%
Taylor expanded in a around inf 66.0%
if -1.10000000000000007e62 < (*.f64 a b) < -1.2999999999999999e-109 or -1.25000000000000003e-307 < (*.f64 a b) < 2.29999999999999995e159Initial program 99.3%
associate-+l-99.3%
associate--l+99.3%
fma-def100.0%
associate-*l/100.0%
fma-neg100.0%
sub-neg100.0%
distribute-neg-in100.0%
remove-double-neg100.0%
associate-/l*100.0%
distribute-frac-neg100.0%
associate-/r/100.0%
fma-def100.0%
neg-mul-1100.0%
*-commutative100.0%
associate-/l*100.0%
metadata-eval100.0%
Simplified100.0%
fma-udef99.3%
div-inv99.3%
metadata-eval99.3%
div-inv99.3%
metadata-eval99.3%
Applied egg-rr99.3%
Taylor expanded in z around inf 44.7%
if -1.2999999999999999e-109 < (*.f64 a b) < -1.25000000000000003e-307Initial program 100.0%
Taylor expanded in c around inf 54.4%
Final simplification53.4%
(FPCore (x y z t a b c) :precision binary64 (if (or (<= (* a b) -2e+203) (not (<= (* a b) 2e+106))) (- (* x y) (* (* a b) 0.25)) (+ c (+ (* x y) (* 0.0625 (* z t))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (((a * b) <= -2e+203) || !((a * b) <= 2e+106)) {
tmp = (x * y) - ((a * b) * 0.25);
} else {
tmp = c + ((x * y) + (0.0625 * (z * t)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if (((a * b) <= (-2d+203)) .or. (.not. ((a * b) <= 2d+106))) then
tmp = (x * y) - ((a * b) * 0.25d0)
else
tmp = c + ((x * y) + (0.0625d0 * (z * t)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (((a * b) <= -2e+203) || !((a * b) <= 2e+106)) {
tmp = (x * y) - ((a * b) * 0.25);
} else {
tmp = c + ((x * y) + (0.0625 * (z * t)));
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if ((a * b) <= -2e+203) or not ((a * b) <= 2e+106): tmp = (x * y) - ((a * b) * 0.25) else: tmp = c + ((x * y) + (0.0625 * (z * t))) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if ((Float64(a * b) <= -2e+203) || !(Float64(a * b) <= 2e+106)) tmp = Float64(Float64(x * y) - Float64(Float64(a * b) * 0.25)); else tmp = Float64(c + Float64(Float64(x * y) + Float64(0.0625 * Float64(z * t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (((a * b) <= -2e+203) || ~(((a * b) <= 2e+106))) tmp = (x * y) - ((a * b) * 0.25); else tmp = c + ((x * y) + (0.0625 * (z * t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[N[(a * b), $MachinePrecision], -2e+203], N[Not[LessEqual[N[(a * b), $MachinePrecision], 2e+106]], $MachinePrecision]], N[(N[(x * y), $MachinePrecision] - N[(N[(a * b), $MachinePrecision] * 0.25), $MachinePrecision]), $MachinePrecision], N[(c + N[(N[(x * y), $MachinePrecision] + N[(0.0625 * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \cdot b \leq -2 \cdot 10^{+203} \lor \neg \left(a \cdot b \leq 2 \cdot 10^{+106}\right):\\
\;\;\;\;x \cdot y - \left(a \cdot b\right) \cdot 0.25\\
\mathbf{else}:\\
\;\;\;\;c + \left(x \cdot y + 0.0625 \cdot \left(z \cdot t\right)\right)\\
\end{array}
\end{array}
if (*.f64 a b) < -2e203 or 2.00000000000000018e106 < (*.f64 a b) Initial program 95.8%
Taylor expanded in z around 0 86.7%
Taylor expanded in c around 0 84.1%
if -2e203 < (*.f64 a b) < 2.00000000000000018e106Initial program 98.9%
Taylor expanded in a around 0 87.3%
Final simplification86.4%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* (* a b) 0.25)) (t_2 (* 0.0625 (* z t))))
(if (<= (* a b) -2e+50)
(- t_2 t_1)
(if (<= (* a b) 2e+106) (+ c (+ (* x y) t_2)) (- (* x y) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = (a * b) * 0.25;
double t_2 = 0.0625 * (z * t);
double tmp;
if ((a * b) <= -2e+50) {
tmp = t_2 - t_1;
} else if ((a * b) <= 2e+106) {
tmp = c + ((x * y) + t_2);
} else {
tmp = (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 = (a * b) * 0.25d0
t_2 = 0.0625d0 * (z * t)
if ((a * b) <= (-2d+50)) then
tmp = t_2 - t_1
else if ((a * b) <= 2d+106) then
tmp = c + ((x * y) + t_2)
else
tmp = (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 = (a * b) * 0.25;
double t_2 = 0.0625 * (z * t);
double tmp;
if ((a * b) <= -2e+50) {
tmp = t_2 - t_1;
} else if ((a * b) <= 2e+106) {
tmp = c + ((x * y) + t_2);
} else {
tmp = (x * y) - t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = (a * b) * 0.25 t_2 = 0.0625 * (z * t) tmp = 0 if (a * b) <= -2e+50: tmp = t_2 - t_1 elif (a * b) <= 2e+106: tmp = c + ((x * y) + t_2) else: tmp = (x * y) - t_1 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(a * b) * 0.25) t_2 = Float64(0.0625 * Float64(z * t)) tmp = 0.0 if (Float64(a * b) <= -2e+50) tmp = Float64(t_2 - t_1); elseif (Float64(a * b) <= 2e+106) tmp = Float64(c + Float64(Float64(x * y) + t_2)); else tmp = Float64(Float64(x * y) - t_1); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = (a * b) * 0.25; t_2 = 0.0625 * (z * t); tmp = 0.0; if ((a * b) <= -2e+50) tmp = t_2 - t_1; elseif ((a * b) <= 2e+106) tmp = c + ((x * y) + t_2); else tmp = (x * y) - t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(a * b), $MachinePrecision] * 0.25), $MachinePrecision]}, Block[{t$95$2 = N[(0.0625 * N[(z * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(a * b), $MachinePrecision], -2e+50], N[(t$95$2 - t$95$1), $MachinePrecision], If[LessEqual[N[(a * b), $MachinePrecision], 2e+106], N[(c + N[(N[(x * y), $MachinePrecision] + t$95$2), $MachinePrecision]), $MachinePrecision], N[(N[(x * y), $MachinePrecision] - t$95$1), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(a \cdot b\right) \cdot 0.25\\
t_2 := 0.0625 \cdot \left(z \cdot t\right)\\
\mathbf{if}\;a \cdot b \leq -2 \cdot 10^{+50}:\\
\;\;\;\;t_2 - t_1\\
\mathbf{elif}\;a \cdot b \leq 2 \cdot 10^{+106}:\\
\;\;\;\;c + \left(x \cdot y + t_2\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot y - t_1\\
\end{array}
\end{array}
if (*.f64 a b) < -2.0000000000000002e50Initial program 96.9%
Taylor expanded in x around 0 90.8%
Taylor expanded in c around 0 81.1%
if -2.0000000000000002e50 < (*.f64 a b) < 2.00000000000000018e106Initial program 99.3%
Taylor expanded in a around 0 93.0%
if 2.00000000000000018e106 < (*.f64 a b) Initial program 94.7%
Taylor expanded in z around 0 87.5%
Taylor expanded in c around 0 82.5%
Final simplification88.5%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* (* a b) 0.25)) (t_2 (* 0.0625 (* z t))))
(if (<= (* a b) -2e+50)
(- t_2 t_1)
(if (<= (* a b) 2e+106) (+ c (+ (* x y) t_2)) (- (+ c (* x y)) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = (a * b) * 0.25;
double t_2 = 0.0625 * (z * t);
double tmp;
if ((a * b) <= -2e+50) {
tmp = t_2 - t_1;
} else if ((a * b) <= 2e+106) {
tmp = c + ((x * y) + t_2);
} 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 = (a * b) * 0.25d0
t_2 = 0.0625d0 * (z * t)
if ((a * b) <= (-2d+50)) then
tmp = t_2 - t_1
else if ((a * b) <= 2d+106) then
tmp = c + ((x * y) + t_2)
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 = (a * b) * 0.25;
double t_2 = 0.0625 * (z * t);
double tmp;
if ((a * b) <= -2e+50) {
tmp = t_2 - t_1;
} else if ((a * b) <= 2e+106) {
tmp = c + ((x * y) + t_2);
} else {
tmp = (c + (x * y)) - t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = (a * b) * 0.25 t_2 = 0.0625 * (z * t) tmp = 0 if (a * b) <= -2e+50: tmp = t_2 - t_1 elif (a * b) <= 2e+106: tmp = c + ((x * y) + t_2) else: tmp = (c + (x * y)) - t_1 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(a * b) * 0.25) t_2 = Float64(0.0625 * Float64(z * t)) tmp = 0.0 if (Float64(a * b) <= -2e+50) tmp = Float64(t_2 - t_1); elseif (Float64(a * b) <= 2e+106) tmp = Float64(c + Float64(Float64(x * y) + t_2)); 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 = (a * b) * 0.25; t_2 = 0.0625 * (z * t); tmp = 0.0; if ((a * b) <= -2e+50) tmp = t_2 - t_1; elseif ((a * b) <= 2e+106) tmp = c + ((x * y) + t_2); 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[(a * b), $MachinePrecision] * 0.25), $MachinePrecision]}, Block[{t$95$2 = N[(0.0625 * N[(z * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(a * b), $MachinePrecision], -2e+50], N[(t$95$2 - t$95$1), $MachinePrecision], If[LessEqual[N[(a * b), $MachinePrecision], 2e+106], N[(c + N[(N[(x * y), $MachinePrecision] + t$95$2), $MachinePrecision]), $MachinePrecision], N[(N[(c + N[(x * y), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(a \cdot b\right) \cdot 0.25\\
t_2 := 0.0625 \cdot \left(z \cdot t\right)\\
\mathbf{if}\;a \cdot b \leq -2 \cdot 10^{+50}:\\
\;\;\;\;t_2 - t_1\\
\mathbf{elif}\;a \cdot b \leq 2 \cdot 10^{+106}:\\
\;\;\;\;c + \left(x \cdot y + t_2\right)\\
\mathbf{else}:\\
\;\;\;\;\left(c + x \cdot y\right) - t_1\\
\end{array}
\end{array}
if (*.f64 a b) < -2.0000000000000002e50Initial program 96.9%
Taylor expanded in x around 0 90.8%
Taylor expanded in c around 0 81.1%
if -2.0000000000000002e50 < (*.f64 a b) < 2.00000000000000018e106Initial program 99.3%
Taylor expanded in a around 0 93.0%
if 2.00000000000000018e106 < (*.f64 a b) Initial program 94.7%
Taylor expanded in z around 0 87.5%
Final simplification89.2%
(FPCore (x y z t a b c) :precision binary64 (+ c (- (+ (* x y) (/ (* z t) 16.0)) (/ (* a b) 4.0))))
double code(double x, double y, double z, double t, double a, double b, double c) {
return c + (((x * y) + ((z * t) / 16.0)) - ((a * b) / 4.0));
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
code = c + (((x * y) + ((z * t) / 16.0d0)) - ((a * b) / 4.0d0))
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
return c + (((x * y) + ((z * t) / 16.0)) - ((a * b) / 4.0));
}
def code(x, y, z, t, a, b, c): return c + (((x * y) + ((z * t) / 16.0)) - ((a * b) / 4.0))
function code(x, y, z, t, a, b, c) return Float64(c + Float64(Float64(Float64(x * y) + Float64(Float64(z * t) / 16.0)) - Float64(Float64(a * b) / 4.0))) end
function tmp = code(x, y, z, t, a, b, c) tmp = c + (((x * y) + ((z * t) / 16.0)) - ((a * b) / 4.0)); end
code[x_, y_, z_, t_, a_, b_, c_] := N[(c + N[(N[(N[(x * y), $MachinePrecision] + N[(N[(z * t), $MachinePrecision] / 16.0), $MachinePrecision]), $MachinePrecision] - N[(N[(a * b), $MachinePrecision] / 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
c + \left(\left(x \cdot y + \frac{z \cdot t}{16}\right) - \frac{a \cdot b}{4}\right)
\end{array}
Initial program 98.0%
Final simplification98.0%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (+ c (* x y))))
(if (<= x -6.5e+175)
t_1
(if (<= x 5.8e-223)
(+ c (* 0.0625 (* z t)))
(if (<= x 3.1e-81) (* -0.25 (* a b)) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = c + (x * y);
double tmp;
if (x <= -6.5e+175) {
tmp = t_1;
} else if (x <= 5.8e-223) {
tmp = c + (0.0625 * (z * t));
} else if (x <= 3.1e-81) {
tmp = -0.25 * (a * b);
} 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 = c + (x * y)
if (x <= (-6.5d+175)) then
tmp = t_1
else if (x <= 5.8d-223) then
tmp = c + (0.0625d0 * (z * t))
else if (x <= 3.1d-81) then
tmp = (-0.25d0) * (a * b)
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 = c + (x * y);
double tmp;
if (x <= -6.5e+175) {
tmp = t_1;
} else if (x <= 5.8e-223) {
tmp = c + (0.0625 * (z * t));
} else if (x <= 3.1e-81) {
tmp = -0.25 * (a * b);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = c + (x * y) tmp = 0 if x <= -6.5e+175: tmp = t_1 elif x <= 5.8e-223: tmp = c + (0.0625 * (z * t)) elif x <= 3.1e-81: tmp = -0.25 * (a * b) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(c + Float64(x * y)) tmp = 0.0 if (x <= -6.5e+175) tmp = t_1; elseif (x <= 5.8e-223) tmp = Float64(c + Float64(0.0625 * Float64(z * t))); elseif (x <= 3.1e-81) tmp = Float64(-0.25 * Float64(a * b)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = c + (x * y); tmp = 0.0; if (x <= -6.5e+175) tmp = t_1; elseif (x <= 5.8e-223) tmp = c + (0.0625 * (z * t)); elseif (x <= 3.1e-81) tmp = -0.25 * (a * b); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(c + N[(x * y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -6.5e+175], t$95$1, If[LessEqual[x, 5.8e-223], N[(c + N[(0.0625 * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 3.1e-81], N[(-0.25 * N[(a * b), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := c + x \cdot y\\
\mathbf{if}\;x \leq -6.5 \cdot 10^{+175}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq 5.8 \cdot 10^{-223}:\\
\;\;\;\;c + 0.0625 \cdot \left(z \cdot t\right)\\
\mathbf{elif}\;x \leq 3.1 \cdot 10^{-81}:\\
\;\;\;\;-0.25 \cdot \left(a \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if x < -6.49999999999999977e175 or 3.09999999999999988e-81 < x Initial program 97.3%
Taylor expanded in x around inf 55.3%
if -6.49999999999999977e175 < x < 5.8000000000000001e-223Initial program 99.1%
Taylor expanded in z around inf 61.0%
if 5.8000000000000001e-223 < x < 3.09999999999999988e-81Initial program 96.2%
associate-+l-96.2%
associate--l+96.2%
fma-def96.2%
associate-*l/96.2%
fma-neg100.0%
sub-neg100.0%
distribute-neg-in100.0%
remove-double-neg100.0%
associate-/l*99.9%
distribute-frac-neg99.9%
associate-/r/100.0%
fma-def100.0%
neg-mul-1100.0%
*-commutative100.0%
associate-/l*100.0%
metadata-eval100.0%
Simplified100.0%
fma-udef100.0%
div-inv100.0%
metadata-eval100.0%
div-inv100.0%
metadata-eval100.0%
Applied egg-rr100.0%
Taylor expanded in a around inf 42.4%
Final simplification56.6%
(FPCore (x y z t a b c) :precision binary64 (if (<= (* x y) -3.5e+241) (* x y) (if (<= (* x y) 1.42e+178) c (* x y))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((x * y) <= -3.5e+241) {
tmp = x * y;
} else if ((x * y) <= 1.42e+178) {
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 * y) <= (-3.5d+241)) then
tmp = x * y
else if ((x * y) <= 1.42d+178) 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 * y) <= -3.5e+241) {
tmp = x * y;
} else if ((x * y) <= 1.42e+178) {
tmp = c;
} else {
tmp = x * y;
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if (x * y) <= -3.5e+241: tmp = x * y elif (x * y) <= 1.42e+178: tmp = c else: tmp = x * y return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (Float64(x * y) <= -3.5e+241) tmp = Float64(x * y); elseif (Float64(x * y) <= 1.42e+178) 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 * y) <= -3.5e+241) tmp = x * y; elseif ((x * y) <= 1.42e+178) tmp = c; else tmp = x * y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[N[(x * y), $MachinePrecision], -3.5e+241], N[(x * y), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 1.42e+178], c, N[(x * y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \cdot y \leq -3.5 \cdot 10^{+241}:\\
\;\;\;\;x \cdot y\\
\mathbf{elif}\;x \cdot y \leq 1.42 \cdot 10^{+178}:\\
\;\;\;\;c\\
\mathbf{else}:\\
\;\;\;\;x \cdot y\\
\end{array}
\end{array}
if (*.f64 x y) < -3.5e241 or 1.41999999999999999e178 < (*.f64 x y) Initial program 92.6%
associate-+l-92.6%
associate--l+92.6%
fma-def94.4%
associate-*l/94.4%
fma-neg96.3%
sub-neg96.3%
distribute-neg-in96.3%
remove-double-neg96.3%
associate-/l*96.2%
distribute-frac-neg96.2%
associate-/r/96.3%
fma-def96.3%
neg-mul-196.3%
*-commutative96.3%
associate-/l*96.3%
metadata-eval96.3%
Simplified96.3%
fma-udef92.6%
div-inv92.6%
metadata-eval92.6%
div-inv92.6%
metadata-eval92.6%
Applied egg-rr92.6%
Taylor expanded in x around inf 77.4%
if -3.5e241 < (*.f64 x y) < 1.41999999999999999e178Initial program 99.5%
Taylor expanded in c around inf 25.7%
Final simplification36.6%
(FPCore (x y z t a b c) :precision binary64 c)
double code(double x, double y, double z, double t, double a, double b, double c) {
return c;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
code = c
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
return c;
}
def code(x, y, z, t, a, b, c): return c
function code(x, y, z, t, a, b, c) return c end
function tmp = code(x, y, z, t, a, b, c) tmp = c; end
code[x_, y_, z_, t_, a_, b_, c_] := c
\begin{array}{l}
\\
c
\end{array}
Initial program 98.0%
Taylor expanded in c around inf 21.1%
Final simplification21.1%
herbie shell --seed 2023293
(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))