
(FPCore (x y z t a b c) :precision binary64 (+ (- (+ (* x y) (/ (* z t) 16.0)) (/ (* a b) 4.0)) c))
double code(double x, double y, double z, double t, double a, double b, double c) {
return (((x * y) + ((z * t) / 16.0)) - ((a * b) / 4.0)) + c;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
code = (((x * y) + ((z * t) / 16.0d0)) - ((a * b) / 4.0d0)) + c
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
return (((x * y) + ((z * t) / 16.0)) - ((a * b) / 4.0)) + c;
}
def code(x, y, z, t, a, b, c): return (((x * y) + ((z * t) / 16.0)) - ((a * b) / 4.0)) + c
function code(x, y, z, t, a, b, c) return Float64(Float64(Float64(Float64(x * y) + Float64(Float64(z * t) / 16.0)) - Float64(Float64(a * b) / 4.0)) + c) end
function tmp = code(x, y, z, t, a, b, c) tmp = (((x * y) + ((z * t) / 16.0)) - ((a * b) / 4.0)) + c; end
code[x_, y_, z_, t_, a_, b_, c_] := N[(N[(N[(N[(x * y), $MachinePrecision] + N[(N[(z * t), $MachinePrecision] / 16.0), $MachinePrecision]), $MachinePrecision] - N[(N[(a * b), $MachinePrecision] / 4.0), $MachinePrecision]), $MachinePrecision] + c), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(x \cdot y + \frac{z \cdot t}{16}\right) - \frac{a \cdot b}{4}\right) + c
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 17 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b c) :precision binary64 (+ (- (+ (* x y) (/ (* z t) 16.0)) (/ (* a b) 4.0)) c))
double code(double x, double y, double z, double t, double a, double b, double c) {
return (((x * y) + ((z * t) / 16.0)) - ((a * b) / 4.0)) + c;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
code = (((x * y) + ((z * t) / 16.0d0)) - ((a * b) / 4.0d0)) + c
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
return (((x * y) + ((z * t) / 16.0)) - ((a * b) / 4.0)) + c;
}
def code(x, y, z, t, a, b, c): return (((x * y) + ((z * t) / 16.0)) - ((a * b) / 4.0)) + c
function code(x, y, z, t, a, b, c) return Float64(Float64(Float64(Float64(x * y) + Float64(Float64(z * t) / 16.0)) - Float64(Float64(a * b) / 4.0)) + c) end
function tmp = code(x, y, z, t, a, b, c) tmp = (((x * y) + ((z * t) / 16.0)) - ((a * b) / 4.0)) + c; end
code[x_, y_, z_, t_, a_, b_, c_] := N[(N[(N[(N[(x * y), $MachinePrecision] + N[(N[(z * t), $MachinePrecision] / 16.0), $MachinePrecision]), $MachinePrecision] - N[(N[(a * b), $MachinePrecision] / 4.0), $MachinePrecision]), $MachinePrecision] + c), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(x \cdot y + \frac{z \cdot t}{16}\right) - \frac{a \cdot b}{4}\right) + c
\end{array}
(FPCore (x y z t a b c) :precision binary64 (if (<= (- (+ (* x y) (/ (* z t) 16.0)) (/ (* a b) 4.0)) INFINITY) (+ c (- (+ (* x y) (* z (* t 0.0625))) (* a (/ b 4.0)))) (* t (+ (* z 0.0625) (* a (/ (* b -0.25) t))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((((x * y) + ((z * t) / 16.0)) - ((a * b) / 4.0)) <= ((double) INFINITY)) {
tmp = c + (((x * y) + (z * (t * 0.0625))) - (a * (b / 4.0)));
} else {
tmp = t * ((z * 0.0625) + (a * ((b * -0.25) / t)));
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((((x * y) + ((z * t) / 16.0)) - ((a * b) / 4.0)) <= Double.POSITIVE_INFINITY) {
tmp = c + (((x * y) + (z * (t * 0.0625))) - (a * (b / 4.0)));
} else {
tmp = t * ((z * 0.0625) + (a * ((b * -0.25) / t)));
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if (((x * y) + ((z * t) / 16.0)) - ((a * b) / 4.0)) <= math.inf: tmp = c + (((x * y) + (z * (t * 0.0625))) - (a * (b / 4.0))) else: tmp = t * ((z * 0.0625) + (a * ((b * -0.25) / t))) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (Float64(Float64(Float64(x * y) + Float64(Float64(z * t) / 16.0)) - Float64(Float64(a * b) / 4.0)) <= Inf) tmp = Float64(c + Float64(Float64(Float64(x * y) + Float64(z * Float64(t * 0.0625))) - Float64(a * Float64(b / 4.0)))); else tmp = Float64(t * Float64(Float64(z * 0.0625) + Float64(a * Float64(Float64(b * -0.25) / t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if ((((x * y) + ((z * t) / 16.0)) - ((a * b) / 4.0)) <= Inf) tmp = c + (((x * y) + (z * (t * 0.0625))) - (a * (b / 4.0))); else tmp = t * ((z * 0.0625) + (a * ((b * -0.25) / t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[N[(N[(N[(x * y), $MachinePrecision] + N[(N[(z * t), $MachinePrecision] / 16.0), $MachinePrecision]), $MachinePrecision] - N[(N[(a * b), $MachinePrecision] / 4.0), $MachinePrecision]), $MachinePrecision], Infinity], N[(c + N[(N[(N[(x * y), $MachinePrecision] + N[(z * N[(t * 0.0625), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * N[(b / 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(N[(z * 0.0625), $MachinePrecision] + N[(a * N[(N[(b * -0.25), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\left(x \cdot y + \frac{z \cdot t}{16}\right) - \frac{a \cdot b}{4} \leq \infty:\\
\;\;\;\;c + \left(\left(x \cdot y + z \cdot \left(t \cdot 0.0625\right)\right) - a \cdot \frac{b}{4}\right)\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(z \cdot 0.0625 + a \cdot \frac{b \cdot -0.25}{t}\right)\\
\end{array}
\end{array}
if (-.f64 (+.f64 (*.f64 x y) (/.f64 (*.f64 z t) #s(literal 16 binary64))) (/.f64 (*.f64 a b) #s(literal 4 binary64))) < +inf.0Initial program 99.6%
associate-+l-99.6%
+-commutative99.6%
*-commutative99.6%
+-commutative99.6%
associate-+l-99.6%
fma-define99.6%
*-commutative99.6%
associate-/l*100.0%
associate-/l*100.0%
Simplified100.0%
fma-undefine100.0%
associate-*r/99.6%
+-commutative99.6%
associate-*r/100.0%
div-inv100.0%
metadata-eval100.0%
Applied egg-rr100.0%
if +inf.0 < (-.f64 (+.f64 (*.f64 x y) (/.f64 (*.f64 z t) #s(literal 16 binary64))) (/.f64 (*.f64 a b) #s(literal 4 binary64))) Initial program 0.0%
Taylor expanded in x around 0 50.0%
*-commutative50.0%
+-commutative50.0%
metadata-eval50.0%
div-inv50.0%
associate-*r/50.0%
associate--l+50.0%
*-commutative50.0%
*-commutative50.0%
associate-*r*50.0%
div-inv50.0%
metadata-eval50.0%
Applied egg-rr50.0%
Taylor expanded in t around inf 62.5%
associate--l+62.5%
associate-*r/62.5%
div-sub62.5%
cancel-sign-sub-inv62.5%
metadata-eval62.5%
+-commutative62.5%
*-commutative62.5%
Simplified62.5%
Taylor expanded in a around inf 62.5%
associate-*r/62.5%
*-commutative62.5%
associate-*r*62.5%
associate-*r/87.5%
*-commutative87.5%
Simplified87.5%
Final simplification99.6%
(FPCore (x y z t a b c) :precision binary64 (+ (fma x y (fma z (/ t 16.0) (/ (* a b) -4.0))) c))
double code(double x, double y, double z, double t, double a, double b, double c) {
return fma(x, y, fma(z, (t / 16.0), ((a * b) / -4.0))) + c;
}
function code(x, y, z, t, a, b, c) return Float64(fma(x, y, fma(z, Float64(t / 16.0), Float64(Float64(a * b) / -4.0))) + c) end
code[x_, y_, z_, t_, a_, b_, c_] := N[(N[(x * y + N[(z * N[(t / 16.0), $MachinePrecision] + N[(N[(a * b), $MachinePrecision] / -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + c), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(x, y, \mathsf{fma}\left(z, \frac{t}{16}, \frac{a \cdot b}{-4}\right)\right) + c
\end{array}
Initial program 96.5%
associate--l+96.5%
fma-define98.1%
associate-/l*98.4%
fmm-def98.8%
distribute-neg-frac298.8%
metadata-eval98.8%
Simplified98.8%
Final simplification98.8%
(FPCore (x y z t a b c) :precision binary64 (+ c (- (fma x y (* z (/ t 16.0))) (* a (/ b 4.0)))))
double code(double x, double y, double z, double t, double a, double b, double c) {
return c + (fma(x, y, (z * (t / 16.0))) - (a * (b / 4.0)));
}
function code(x, y, z, t, a, b, c) return Float64(c + Float64(fma(x, y, Float64(z * Float64(t / 16.0))) - Float64(a * Float64(b / 4.0)))) end
code[x_, y_, z_, t_, a_, b_, c_] := N[(c + N[(N[(x * y + N[(z * N[(t / 16.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * N[(b / 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
c + \left(\mathsf{fma}\left(x, y, z \cdot \frac{t}{16}\right) - a \cdot \frac{b}{4}\right)
\end{array}
Initial program 96.5%
associate-+l-96.5%
+-commutative96.5%
*-commutative96.5%
+-commutative96.5%
associate-+l-96.5%
fma-define97.7%
*-commutative97.7%
associate-/l*98.0%
associate-/l*98.0%
Simplified98.0%
Final simplification98.0%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* a (* b -0.25))))
(if (<= (* x y) -1.2e+132)
(* x y)
(if (<= (* x y) -1.08e+39)
c
(if (<= (* x y) -9.6e-134)
t_1
(if (<= (* x y) -5.5e-303)
c
(if (<= (* x y) 9.2e-110)
t_1
(if (<= (* x y) 3.1e+102)
c
(if (<= (* x y) 1.06e+135) t_1 (* x y))))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = a * (b * -0.25);
double tmp;
if ((x * y) <= -1.2e+132) {
tmp = x * y;
} else if ((x * y) <= -1.08e+39) {
tmp = c;
} else if ((x * y) <= -9.6e-134) {
tmp = t_1;
} else if ((x * y) <= -5.5e-303) {
tmp = c;
} else if ((x * y) <= 9.2e-110) {
tmp = t_1;
} else if ((x * y) <= 3.1e+102) {
tmp = c;
} else if ((x * y) <= 1.06e+135) {
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 = a * (b * (-0.25d0))
if ((x * y) <= (-1.2d+132)) then
tmp = x * y
else if ((x * y) <= (-1.08d+39)) then
tmp = c
else if ((x * y) <= (-9.6d-134)) then
tmp = t_1
else if ((x * y) <= (-5.5d-303)) then
tmp = c
else if ((x * y) <= 9.2d-110) then
tmp = t_1
else if ((x * y) <= 3.1d+102) then
tmp = c
else if ((x * y) <= 1.06d+135) 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 = a * (b * -0.25);
double tmp;
if ((x * y) <= -1.2e+132) {
tmp = x * y;
} else if ((x * y) <= -1.08e+39) {
tmp = c;
} else if ((x * y) <= -9.6e-134) {
tmp = t_1;
} else if ((x * y) <= -5.5e-303) {
tmp = c;
} else if ((x * y) <= 9.2e-110) {
tmp = t_1;
} else if ((x * y) <= 3.1e+102) {
tmp = c;
} else if ((x * y) <= 1.06e+135) {
tmp = t_1;
} else {
tmp = x * y;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = a * (b * -0.25) tmp = 0 if (x * y) <= -1.2e+132: tmp = x * y elif (x * y) <= -1.08e+39: tmp = c elif (x * y) <= -9.6e-134: tmp = t_1 elif (x * y) <= -5.5e-303: tmp = c elif (x * y) <= 9.2e-110: tmp = t_1 elif (x * y) <= 3.1e+102: tmp = c elif (x * y) <= 1.06e+135: tmp = t_1 else: tmp = x * y return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(a * Float64(b * -0.25)) tmp = 0.0 if (Float64(x * y) <= -1.2e+132) tmp = Float64(x * y); elseif (Float64(x * y) <= -1.08e+39) tmp = c; elseif (Float64(x * y) <= -9.6e-134) tmp = t_1; elseif (Float64(x * y) <= -5.5e-303) tmp = c; elseif (Float64(x * y) <= 9.2e-110) tmp = t_1; elseif (Float64(x * y) <= 3.1e+102) tmp = c; elseif (Float64(x * y) <= 1.06e+135) 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 = a * (b * -0.25); tmp = 0.0; if ((x * y) <= -1.2e+132) tmp = x * y; elseif ((x * y) <= -1.08e+39) tmp = c; elseif ((x * y) <= -9.6e-134) tmp = t_1; elseif ((x * y) <= -5.5e-303) tmp = c; elseif ((x * y) <= 9.2e-110) tmp = t_1; elseif ((x * y) <= 3.1e+102) tmp = c; elseif ((x * y) <= 1.06e+135) 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[(a * N[(b * -0.25), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(x * y), $MachinePrecision], -1.2e+132], N[(x * y), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], -1.08e+39], c, If[LessEqual[N[(x * y), $MachinePrecision], -9.6e-134], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], -5.5e-303], c, If[LessEqual[N[(x * y), $MachinePrecision], 9.2e-110], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], 3.1e+102], c, If[LessEqual[N[(x * y), $MachinePrecision], 1.06e+135], t$95$1, N[(x * y), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot \left(b \cdot -0.25\right)\\
\mathbf{if}\;x \cdot y \leq -1.2 \cdot 10^{+132}:\\
\;\;\;\;x \cdot y\\
\mathbf{elif}\;x \cdot y \leq -1.08 \cdot 10^{+39}:\\
\;\;\;\;c\\
\mathbf{elif}\;x \cdot y \leq -9.6 \cdot 10^{-134}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \cdot y \leq -5.5 \cdot 10^{-303}:\\
\;\;\;\;c\\
\mathbf{elif}\;x \cdot y \leq 9.2 \cdot 10^{-110}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \cdot y \leq 3.1 \cdot 10^{+102}:\\
\;\;\;\;c\\
\mathbf{elif}\;x \cdot y \leq 1.06 \cdot 10^{+135}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x \cdot y\\
\end{array}
\end{array}
if (*.f64 x y) < -1.2000000000000001e132 or 1.06e135 < (*.f64 x y) Initial program 94.1%
Taylor expanded in z around 0 85.0%
Taylor expanded in x around inf 85.3%
associate--l+85.3%
associate-*r/85.3%
div-sub85.3%
cancel-sign-sub-inv85.3%
metadata-eval85.3%
+-commutative85.3%
*-commutative85.3%
Simplified85.3%
Taylor expanded in x around inf 76.6%
if -1.2000000000000001e132 < (*.f64 x y) < -1.07999999999999998e39 or -9.60000000000000038e-134 < (*.f64 x y) < -5.50000000000000018e-303 or 9.2000000000000006e-110 < (*.f64 x y) < 3.09999999999999987e102Initial program 97.5%
Taylor expanded in c around inf 40.0%
if -1.07999999999999998e39 < (*.f64 x y) < -9.60000000000000038e-134 or -5.50000000000000018e-303 < (*.f64 x y) < 9.2000000000000006e-110 or 3.09999999999999987e102 < (*.f64 x y) < 1.06e135Initial program 97.9%
Taylor expanded in x around 0 95.0%
*-commutative95.0%
+-commutative95.0%
metadata-eval95.0%
div-inv95.0%
associate-*r/95.0%
associate--l+95.0%
*-commutative95.0%
*-commutative95.0%
associate-*r*95.0%
div-inv95.0%
metadata-eval95.0%
Applied egg-rr95.0%
Taylor expanded in t around inf 84.5%
associate--l+84.5%
associate-*r/84.5%
div-sub84.6%
cancel-sign-sub-inv84.6%
metadata-eval84.6%
+-commutative84.6%
*-commutative84.6%
Simplified84.6%
Taylor expanded in a around inf 40.3%
*-commutative40.3%
associate-*r*40.3%
*-commutative40.3%
Simplified40.3%
Final simplification52.3%
(FPCore (x y z t a b c)
:precision binary64
(if (<= (* a b) -2e+305)
(* a (* b -0.25))
(if (or (<= (* a b) -4e+206)
(and (not (<= (* a b) -4e+158)) (<= (* a b) 1e+106)))
(+ c (+ (* x y) (* 0.0625 (* z t))))
(+ c (* b (* a -0.25))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((a * b) <= -2e+305) {
tmp = a * (b * -0.25);
} else if (((a * b) <= -4e+206) || (!((a * b) <= -4e+158) && ((a * b) <= 1e+106))) {
tmp = c + ((x * y) + (0.0625 * (z * t)));
} else {
tmp = c + (b * (a * -0.25));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if ((a * b) <= (-2d+305)) then
tmp = a * (b * (-0.25d0))
else if (((a * b) <= (-4d+206)) .or. (.not. ((a * b) <= (-4d+158))) .and. ((a * b) <= 1d+106)) then
tmp = c + ((x * y) + (0.0625d0 * (z * t)))
else
tmp = c + (b * (a * (-0.25d0)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((a * b) <= -2e+305) {
tmp = a * (b * -0.25);
} else if (((a * b) <= -4e+206) || (!((a * b) <= -4e+158) && ((a * b) <= 1e+106))) {
tmp = c + ((x * y) + (0.0625 * (z * t)));
} else {
tmp = c + (b * (a * -0.25));
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if (a * b) <= -2e+305: tmp = a * (b * -0.25) elif ((a * b) <= -4e+206) or (not ((a * b) <= -4e+158) and ((a * b) <= 1e+106)): tmp = c + ((x * y) + (0.0625 * (z * t))) else: tmp = c + (b * (a * -0.25)) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (Float64(a * b) <= -2e+305) tmp = Float64(a * Float64(b * -0.25)); elseif ((Float64(a * b) <= -4e+206) || (!(Float64(a * b) <= -4e+158) && (Float64(a * b) <= 1e+106))) tmp = Float64(c + Float64(Float64(x * y) + Float64(0.0625 * Float64(z * t)))); else tmp = Float64(c + Float64(b * Float64(a * -0.25))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if ((a * b) <= -2e+305) tmp = a * (b * -0.25); elseif (((a * b) <= -4e+206) || (~(((a * b) <= -4e+158)) && ((a * b) <= 1e+106))) tmp = c + ((x * y) + (0.0625 * (z * t))); else tmp = c + (b * (a * -0.25)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[N[(a * b), $MachinePrecision], -2e+305], N[(a * N[(b * -0.25), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[N[(a * b), $MachinePrecision], -4e+206], And[N[Not[LessEqual[N[(a * b), $MachinePrecision], -4e+158]], $MachinePrecision], LessEqual[N[(a * b), $MachinePrecision], 1e+106]]], N[(c + N[(N[(x * y), $MachinePrecision] + N[(0.0625 * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(c + N[(b * N[(a * -0.25), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \cdot b \leq -2 \cdot 10^{+305}:\\
\;\;\;\;a \cdot \left(b \cdot -0.25\right)\\
\mathbf{elif}\;a \cdot b \leq -4 \cdot 10^{+206} \lor \neg \left(a \cdot b \leq -4 \cdot 10^{+158}\right) \land a \cdot b \leq 10^{+106}:\\
\;\;\;\;c + \left(x \cdot y + 0.0625 \cdot \left(z \cdot t\right)\right)\\
\mathbf{else}:\\
\;\;\;\;c + b \cdot \left(a \cdot -0.25\right)\\
\end{array}
\end{array}
if (*.f64 a b) < -1.9999999999999999e305Initial program 86.4%
Taylor expanded in x around 0 90.9%
*-commutative90.9%
+-commutative90.9%
metadata-eval90.9%
div-inv90.9%
associate-*r/90.9%
associate--l+90.9%
*-commutative90.9%
*-commutative90.9%
associate-*r*90.9%
div-inv90.9%
metadata-eval90.9%
Applied egg-rr90.9%
Taylor expanded in t around inf 82.4%
associate--l+82.4%
associate-*r/82.4%
div-sub87.0%
cancel-sign-sub-inv87.0%
metadata-eval87.0%
+-commutative87.0%
*-commutative87.0%
Simplified87.0%
Taylor expanded in a around inf 90.9%
*-commutative90.9%
associate-*r*90.9%
*-commutative90.9%
Simplified90.9%
if -1.9999999999999999e305 < (*.f64 a b) < -4.0000000000000002e206 or -3.99999999999999981e158 < (*.f64 a b) < 1.00000000000000009e106Initial program 99.0%
Taylor expanded in a around 0 92.1%
if -4.0000000000000002e206 < (*.f64 a b) < -3.99999999999999981e158 or 1.00000000000000009e106 < (*.f64 a b) Initial program 91.1%
Taylor expanded in a around inf 77.8%
*-commutative77.8%
*-commutative77.8%
associate-*r*77.8%
Simplified77.8%
Final simplification89.5%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* 0.0625 (* z t)))
(t_2 (+ c (+ (* x y) t_1)))
(t_3 (- t_1 (* (* a b) 0.25))))
(if (<= (* a b) -4e+269)
t_3
(if (<= (* a b) -4e+206)
t_2
(if (<= (* a b) -4e+158)
(+ c (* b (* a -0.25)))
(if (<= (* a b) 1e+217) t_2 t_3))))))
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 + ((x * y) + t_1);
double t_3 = t_1 - ((a * b) * 0.25);
double tmp;
if ((a * b) <= -4e+269) {
tmp = t_3;
} else if ((a * b) <= -4e+206) {
tmp = t_2;
} else if ((a * b) <= -4e+158) {
tmp = c + (b * (a * -0.25));
} else if ((a * b) <= 1e+217) {
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 = 0.0625d0 * (z * t)
t_2 = c + ((x * y) + t_1)
t_3 = t_1 - ((a * b) * 0.25d0)
if ((a * b) <= (-4d+269)) then
tmp = t_3
else if ((a * b) <= (-4d+206)) then
tmp = t_2
else if ((a * b) <= (-4d+158)) then
tmp = c + (b * (a * (-0.25d0)))
else if ((a * b) <= 1d+217) 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 = 0.0625 * (z * t);
double t_2 = c + ((x * y) + t_1);
double t_3 = t_1 - ((a * b) * 0.25);
double tmp;
if ((a * b) <= -4e+269) {
tmp = t_3;
} else if ((a * b) <= -4e+206) {
tmp = t_2;
} else if ((a * b) <= -4e+158) {
tmp = c + (b * (a * -0.25));
} else if ((a * b) <= 1e+217) {
tmp = t_2;
} else {
tmp = t_3;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = 0.0625 * (z * t) t_2 = c + ((x * y) + t_1) t_3 = t_1 - ((a * b) * 0.25) tmp = 0 if (a * b) <= -4e+269: tmp = t_3 elif (a * b) <= -4e+206: tmp = t_2 elif (a * b) <= -4e+158: tmp = c + (b * (a * -0.25)) elif (a * b) <= 1e+217: tmp = t_2 else: tmp = t_3 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(0.0625 * Float64(z * t)) t_2 = Float64(c + Float64(Float64(x * y) + t_1)) t_3 = Float64(t_1 - Float64(Float64(a * b) * 0.25)) tmp = 0.0 if (Float64(a * b) <= -4e+269) tmp = t_3; elseif (Float64(a * b) <= -4e+206) tmp = t_2; elseif (Float64(a * b) <= -4e+158) tmp = Float64(c + Float64(b * Float64(a * -0.25))); elseif (Float64(a * b) <= 1e+217) tmp = t_2; else tmp = t_3; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = 0.0625 * (z * t); t_2 = c + ((x * y) + t_1); t_3 = t_1 - ((a * b) * 0.25); tmp = 0.0; if ((a * b) <= -4e+269) tmp = t_3; elseif ((a * b) <= -4e+206) tmp = t_2; elseif ((a * b) <= -4e+158) tmp = c + (b * (a * -0.25)); elseif ((a * b) <= 1e+217) 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[(0.0625 * N[(z * t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(c + N[(N[(x * y), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$1 - N[(N[(a * b), $MachinePrecision] * 0.25), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(a * b), $MachinePrecision], -4e+269], t$95$3, If[LessEqual[N[(a * b), $MachinePrecision], -4e+206], t$95$2, If[LessEqual[N[(a * b), $MachinePrecision], -4e+158], N[(c + N[(b * N[(a * -0.25), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * b), $MachinePrecision], 1e+217], t$95$2, t$95$3]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 0.0625 \cdot \left(z \cdot t\right)\\
t_2 := c + \left(x \cdot y + t\_1\right)\\
t_3 := t\_1 - \left(a \cdot b\right) \cdot 0.25\\
\mathbf{if}\;a \cdot b \leq -4 \cdot 10^{+269}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;a \cdot b \leq -4 \cdot 10^{+206}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;a \cdot b \leq -4 \cdot 10^{+158}:\\
\;\;\;\;c + b \cdot \left(a \cdot -0.25\right)\\
\mathbf{elif}\;a \cdot b \leq 10^{+217}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_3\\
\end{array}
\end{array}
if (*.f64 a b) < -4.0000000000000002e269 or 9.9999999999999996e216 < (*.f64 a b) Initial program 84.3%
Taylor expanded in x around 0 88.5%
*-commutative88.5%
+-commutative88.5%
metadata-eval88.5%
div-inv88.5%
associate-*r/88.5%
associate--l+88.5%
*-commutative88.5%
*-commutative88.5%
associate-*r*90.2%
div-inv90.2%
metadata-eval90.2%
Applied egg-rr90.2%
Taylor expanded in c around 0 86.5%
if -4.0000000000000002e269 < (*.f64 a b) < -4.0000000000000002e206 or -3.99999999999999981e158 < (*.f64 a b) < 9.9999999999999996e216Initial program 99.5%
Taylor expanded in a around 0 91.0%
if -4.0000000000000002e206 < (*.f64 a b) < -3.99999999999999981e158Initial program 100.0%
Taylor expanded in a around inf 88.9%
*-commutative88.9%
*-commutative88.9%
associate-*r*88.9%
Simplified88.9%
Final simplification90.1%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (- (+ (* x y) (/ (* z t) 16.0)) (/ (* a b) 4.0))))
(if (<= t_1 INFINITY)
(+ c t_1)
(* t (+ (* z 0.0625) (* a (/ (* b -0.25) t)))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = ((x * y) + ((z * t) / 16.0)) - ((a * b) / 4.0);
double tmp;
if (t_1 <= ((double) INFINITY)) {
tmp = c + t_1;
} else {
tmp = t * ((z * 0.0625) + (a * ((b * -0.25) / t)));
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = ((x * y) + ((z * t) / 16.0)) - ((a * b) / 4.0);
double tmp;
if (t_1 <= Double.POSITIVE_INFINITY) {
tmp = c + t_1;
} else {
tmp = t * ((z * 0.0625) + (a * ((b * -0.25) / t)));
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = ((x * y) + ((z * t) / 16.0)) - ((a * b) / 4.0) tmp = 0 if t_1 <= math.inf: tmp = c + t_1 else: tmp = t * ((z * 0.0625) + (a * ((b * -0.25) / t))) return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(Float64(x * y) + Float64(Float64(z * t) / 16.0)) - Float64(Float64(a * b) / 4.0)) tmp = 0.0 if (t_1 <= Inf) tmp = Float64(c + t_1); else tmp = Float64(t * Float64(Float64(z * 0.0625) + Float64(a * Float64(Float64(b * -0.25) / t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = ((x * y) + ((z * t) / 16.0)) - ((a * b) / 4.0); tmp = 0.0; if (t_1 <= Inf) tmp = c + t_1; else tmp = t * ((z * 0.0625) + (a * ((b * -0.25) / t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(N[(x * y), $MachinePrecision] + N[(N[(z * t), $MachinePrecision] / 16.0), $MachinePrecision]), $MachinePrecision] - N[(N[(a * b), $MachinePrecision] / 4.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, Infinity], N[(c + t$95$1), $MachinePrecision], N[(t * N[(N[(z * 0.0625), $MachinePrecision] + N[(a * N[(N[(b * -0.25), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(x \cdot y + \frac{z \cdot t}{16}\right) - \frac{a \cdot b}{4}\\
\mathbf{if}\;t\_1 \leq \infty:\\
\;\;\;\;c + t\_1\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(z \cdot 0.0625 + a \cdot \frac{b \cdot -0.25}{t}\right)\\
\end{array}
\end{array}
if (-.f64 (+.f64 (*.f64 x y) (/.f64 (*.f64 z t) #s(literal 16 binary64))) (/.f64 (*.f64 a b) #s(literal 4 binary64))) < +inf.0Initial program 99.6%
if +inf.0 < (-.f64 (+.f64 (*.f64 x y) (/.f64 (*.f64 z t) #s(literal 16 binary64))) (/.f64 (*.f64 a b) #s(literal 4 binary64))) Initial program 0.0%
Taylor expanded in x around 0 50.0%
*-commutative50.0%
+-commutative50.0%
metadata-eval50.0%
div-inv50.0%
associate-*r/50.0%
associate--l+50.0%
*-commutative50.0%
*-commutative50.0%
associate-*r*50.0%
div-inv50.0%
metadata-eval50.0%
Applied egg-rr50.0%
Taylor expanded in t around inf 62.5%
associate--l+62.5%
associate-*r/62.5%
div-sub62.5%
cancel-sign-sub-inv62.5%
metadata-eval62.5%
+-commutative62.5%
*-commutative62.5%
Simplified62.5%
Taylor expanded in a around inf 62.5%
associate-*r/62.5%
*-commutative62.5%
associate-*r*62.5%
associate-*r/87.5%
*-commutative87.5%
Simplified87.5%
Final simplification99.3%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (+ c (* b (* a -0.25)))) (t_2 (+ c (* x y))))
(if (<= (* x y) -7e+45)
t_2
(if (<= (* x y) 6e+25)
t_1
(if (<= (* x y) 8e+62)
(* z (* t 0.0625))
(if (<= (* x y) 1.06e+135) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = c + (b * (a * -0.25));
double t_2 = c + (x * y);
double tmp;
if ((x * y) <= -7e+45) {
tmp = t_2;
} else if ((x * y) <= 6e+25) {
tmp = t_1;
} else if ((x * y) <= 8e+62) {
tmp = z * (t * 0.0625);
} else if ((x * y) <= 1.06e+135) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = c + (b * (a * (-0.25d0)))
t_2 = c + (x * y)
if ((x * y) <= (-7d+45)) then
tmp = t_2
else if ((x * y) <= 6d+25) then
tmp = t_1
else if ((x * y) <= 8d+62) then
tmp = z * (t * 0.0625d0)
else if ((x * y) <= 1.06d+135) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = c + (b * (a * -0.25));
double t_2 = c + (x * y);
double tmp;
if ((x * y) <= -7e+45) {
tmp = t_2;
} else if ((x * y) <= 6e+25) {
tmp = t_1;
} else if ((x * y) <= 8e+62) {
tmp = z * (t * 0.0625);
} else if ((x * y) <= 1.06e+135) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = c + (b * (a * -0.25)) t_2 = c + (x * y) tmp = 0 if (x * y) <= -7e+45: tmp = t_2 elif (x * y) <= 6e+25: tmp = t_1 elif (x * y) <= 8e+62: tmp = z * (t * 0.0625) elif (x * y) <= 1.06e+135: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(c + Float64(b * Float64(a * -0.25))) t_2 = Float64(c + Float64(x * y)) tmp = 0.0 if (Float64(x * y) <= -7e+45) tmp = t_2; elseif (Float64(x * y) <= 6e+25) tmp = t_1; elseif (Float64(x * y) <= 8e+62) tmp = Float64(z * Float64(t * 0.0625)); elseif (Float64(x * y) <= 1.06e+135) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = c + (b * (a * -0.25)); t_2 = c + (x * y); tmp = 0.0; if ((x * y) <= -7e+45) tmp = t_2; elseif ((x * y) <= 6e+25) tmp = t_1; elseif ((x * y) <= 8e+62) tmp = z * (t * 0.0625); elseif ((x * y) <= 1.06e+135) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(c + N[(b * N[(a * -0.25), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(c + N[(x * y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(x * y), $MachinePrecision], -7e+45], t$95$2, If[LessEqual[N[(x * y), $MachinePrecision], 6e+25], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], 8e+62], N[(z * N[(t * 0.0625), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 1.06e+135], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := c + b \cdot \left(a \cdot -0.25\right)\\
t_2 := c + x \cdot y\\
\mathbf{if}\;x \cdot y \leq -7 \cdot 10^{+45}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x \cdot y \leq 6 \cdot 10^{+25}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \cdot y \leq 8 \cdot 10^{+62}:\\
\;\;\;\;z \cdot \left(t \cdot 0.0625\right)\\
\mathbf{elif}\;x \cdot y \leq 1.06 \cdot 10^{+135}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if (*.f64 x y) < -7.00000000000000046e45 or 1.06e135 < (*.f64 x y) Initial program 94.1%
Taylor expanded in x around inf 76.6%
if -7.00000000000000046e45 < (*.f64 x y) < 6.00000000000000011e25 or 8.00000000000000028e62 < (*.f64 x y) < 1.06e135Initial program 98.0%
Taylor expanded in a around inf 63.4%
*-commutative63.4%
*-commutative63.4%
associate-*r*63.4%
Simplified63.4%
if 6.00000000000000011e25 < (*.f64 x y) < 8.00000000000000028e62Initial program 100.0%
Taylor expanded in x around 0 92.8%
*-commutative92.8%
+-commutative92.8%
metadata-eval92.8%
div-inv92.8%
associate-*r/92.8%
associate--l+92.8%
*-commutative92.8%
*-commutative92.8%
associate-*r*92.8%
div-inv92.8%
metadata-eval92.8%
Applied egg-rr92.8%
Taylor expanded in t around inf 92.6%
associate--l+92.6%
associate-*r/92.6%
div-sub92.6%
cancel-sign-sub-inv92.6%
metadata-eval92.6%
+-commutative92.6%
*-commutative92.6%
Simplified92.6%
Taylor expanded in t around inf 78.8%
associate-*r*78.8%
Simplified78.8%
Final simplification69.1%
(FPCore (x y z t a b c)
:precision binary64
(if (<= (* x y) -2.2e+132)
(* x y)
(if (<= (* x y) -5.6e+38)
c
(if (<= (* x y) -1.65e-12)
(* a (* b -0.25))
(if (<= (* x y) 6.6e+134) (* z (* t 0.0625)) (* x y))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((x * y) <= -2.2e+132) {
tmp = x * y;
} else if ((x * y) <= -5.6e+38) {
tmp = c;
} else if ((x * y) <= -1.65e-12) {
tmp = a * (b * -0.25);
} else if ((x * y) <= 6.6e+134) {
tmp = z * (t * 0.0625);
} 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) <= (-2.2d+132)) then
tmp = x * y
else if ((x * y) <= (-5.6d+38)) then
tmp = c
else if ((x * y) <= (-1.65d-12)) then
tmp = a * (b * (-0.25d0))
else if ((x * y) <= 6.6d+134) then
tmp = z * (t * 0.0625d0)
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) <= -2.2e+132) {
tmp = x * y;
} else if ((x * y) <= -5.6e+38) {
tmp = c;
} else if ((x * y) <= -1.65e-12) {
tmp = a * (b * -0.25);
} else if ((x * y) <= 6.6e+134) {
tmp = z * (t * 0.0625);
} else {
tmp = x * y;
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if (x * y) <= -2.2e+132: tmp = x * y elif (x * y) <= -5.6e+38: tmp = c elif (x * y) <= -1.65e-12: tmp = a * (b * -0.25) elif (x * y) <= 6.6e+134: tmp = z * (t * 0.0625) else: tmp = x * y return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (Float64(x * y) <= -2.2e+132) tmp = Float64(x * y); elseif (Float64(x * y) <= -5.6e+38) tmp = c; elseif (Float64(x * y) <= -1.65e-12) tmp = Float64(a * Float64(b * -0.25)); elseif (Float64(x * y) <= 6.6e+134) tmp = Float64(z * Float64(t * 0.0625)); 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) <= -2.2e+132) tmp = x * y; elseif ((x * y) <= -5.6e+38) tmp = c; elseif ((x * y) <= -1.65e-12) tmp = a * (b * -0.25); elseif ((x * y) <= 6.6e+134) tmp = z * (t * 0.0625); else tmp = x * y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[N[(x * y), $MachinePrecision], -2.2e+132], N[(x * y), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], -5.6e+38], c, If[LessEqual[N[(x * y), $MachinePrecision], -1.65e-12], N[(a * N[(b * -0.25), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 6.6e+134], N[(z * N[(t * 0.0625), $MachinePrecision]), $MachinePrecision], N[(x * y), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \cdot y \leq -2.2 \cdot 10^{+132}:\\
\;\;\;\;x \cdot y\\
\mathbf{elif}\;x \cdot y \leq -5.6 \cdot 10^{+38}:\\
\;\;\;\;c\\
\mathbf{elif}\;x \cdot y \leq -1.65 \cdot 10^{-12}:\\
\;\;\;\;a \cdot \left(b \cdot -0.25\right)\\
\mathbf{elif}\;x \cdot y \leq 6.6 \cdot 10^{+134}:\\
\;\;\;\;z \cdot \left(t \cdot 0.0625\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot y\\
\end{array}
\end{array}
if (*.f64 x y) < -2.19999999999999989e132 or 6.6e134 < (*.f64 x y) Initial program 94.1%
Taylor expanded in z around 0 85.0%
Taylor expanded in x around inf 85.3%
associate--l+85.3%
associate-*r/85.3%
div-sub85.3%
cancel-sign-sub-inv85.3%
metadata-eval85.3%
+-commutative85.3%
*-commutative85.3%
Simplified85.3%
Taylor expanded in x around inf 76.6%
if -2.19999999999999989e132 < (*.f64 x y) < -5.6e38Initial program 94.7%
Taylor expanded in c around inf 40.4%
if -5.6e38 < (*.f64 x y) < -1.65e-12Initial program 100.0%
Taylor expanded in x around 0 83.5%
*-commutative83.5%
+-commutative83.5%
metadata-eval83.5%
div-inv83.5%
associate-*r/83.5%
associate--l+83.5%
*-commutative83.5%
*-commutative83.5%
associate-*r*83.5%
div-inv83.5%
metadata-eval83.5%
Applied egg-rr83.5%
Taylor expanded in t around inf 75.1%
associate--l+75.1%
associate-*r/75.1%
div-sub75.1%
cancel-sign-sub-inv75.1%
metadata-eval75.1%
+-commutative75.1%
*-commutative75.1%
Simplified75.1%
Taylor expanded in a around inf 47.2%
*-commutative47.2%
associate-*r*47.2%
*-commutative47.2%
Simplified47.2%
if -1.65e-12 < (*.f64 x y) < 6.6e134Initial program 98.0%
Taylor expanded in x around 0 96.2%
*-commutative96.2%
+-commutative96.2%
metadata-eval96.2%
div-inv96.2%
associate-*r/96.2%
associate--l+96.2%
*-commutative96.2%
*-commutative96.2%
associate-*r*96.7%
div-inv96.7%
metadata-eval96.7%
Applied egg-rr96.7%
Taylor expanded in t around inf 84.8%
associate--l+84.8%
associate-*r/84.8%
div-sub84.9%
cancel-sign-sub-inv84.9%
metadata-eval84.9%
+-commutative84.9%
*-commutative84.9%
Simplified84.9%
Taylor expanded in t around inf 38.5%
associate-*r*38.9%
Simplified38.9%
Final simplification51.9%
(FPCore (x y z t a b c)
:precision binary64
(if (<= (* a b) -1e+242)
(* b (- (* 0.0625 (/ (* z t) b)) (* a 0.25)))
(if (or (<= (* a b) -4e+158) (not (<= (* a b) 2e-23)))
(- (+ c (* x y)) (* (* a b) 0.25))
(+ c (+ (* x y) (* 0.0625 (* z t)))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((a * b) <= -1e+242) {
tmp = b * ((0.0625 * ((z * t) / b)) - (a * 0.25));
} else if (((a * b) <= -4e+158) || !((a * b) <= 2e-23)) {
tmp = (c + (x * y)) - ((a * b) * 0.25);
} else {
tmp = c + ((x * y) + (0.0625 * (z * t)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if ((a * b) <= (-1d+242)) then
tmp = b * ((0.0625d0 * ((z * t) / b)) - (a * 0.25d0))
else if (((a * b) <= (-4d+158)) .or. (.not. ((a * b) <= 2d-23))) then
tmp = (c + (x * y)) - ((a * b) * 0.25d0)
else
tmp = c + ((x * y) + (0.0625d0 * (z * t)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((a * b) <= -1e+242) {
tmp = b * ((0.0625 * ((z * t) / b)) - (a * 0.25));
} else if (((a * b) <= -4e+158) || !((a * b) <= 2e-23)) {
tmp = (c + (x * y)) - ((a * b) * 0.25);
} else {
tmp = c + ((x * y) + (0.0625 * (z * t)));
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if (a * b) <= -1e+242: tmp = b * ((0.0625 * ((z * t) / b)) - (a * 0.25)) elif ((a * b) <= -4e+158) or not ((a * b) <= 2e-23): tmp = (c + (x * y)) - ((a * b) * 0.25) else: tmp = c + ((x * y) + (0.0625 * (z * t))) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (Float64(a * b) <= -1e+242) tmp = Float64(b * Float64(Float64(0.0625 * Float64(Float64(z * t) / b)) - Float64(a * 0.25))); elseif ((Float64(a * b) <= -4e+158) || !(Float64(a * b) <= 2e-23)) tmp = Float64(Float64(c + Float64(x * y)) - Float64(Float64(a * b) * 0.25)); else tmp = Float64(c + Float64(Float64(x * y) + Float64(0.0625 * Float64(z * t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if ((a * b) <= -1e+242) tmp = b * ((0.0625 * ((z * t) / b)) - (a * 0.25)); elseif (((a * b) <= -4e+158) || ~(((a * b) <= 2e-23))) tmp = (c + (x * y)) - ((a * b) * 0.25); else tmp = c + ((x * y) + (0.0625 * (z * t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[N[(a * b), $MachinePrecision], -1e+242], N[(b * N[(N[(0.0625 * N[(N[(z * t), $MachinePrecision] / b), $MachinePrecision]), $MachinePrecision] - N[(a * 0.25), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[N[(a * b), $MachinePrecision], -4e+158], N[Not[LessEqual[N[(a * b), $MachinePrecision], 2e-23]], $MachinePrecision]], N[(N[(c + N[(x * y), $MachinePrecision]), $MachinePrecision] - N[(N[(a * b), $MachinePrecision] * 0.25), $MachinePrecision]), $MachinePrecision], N[(c + N[(N[(x * y), $MachinePrecision] + N[(0.0625 * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \cdot b \leq -1 \cdot 10^{+242}:\\
\;\;\;\;b \cdot \left(0.0625 \cdot \frac{z \cdot t}{b} - a \cdot 0.25\right)\\
\mathbf{elif}\;a \cdot b \leq -4 \cdot 10^{+158} \lor \neg \left(a \cdot b \leq 2 \cdot 10^{-23}\right):\\
\;\;\;\;\left(c + x \cdot y\right) - \left(a \cdot b\right) \cdot 0.25\\
\mathbf{else}:\\
\;\;\;\;c + \left(x \cdot y + 0.0625 \cdot \left(z \cdot t\right)\right)\\
\end{array}
\end{array}
if (*.f64 a b) < -1.00000000000000005e242Initial program 88.6%
Taylor expanded in x around 0 86.1%
*-commutative86.1%
+-commutative86.1%
metadata-eval86.1%
div-inv86.1%
associate-*r/86.1%
associate--l+86.1%
*-commutative86.1%
*-commutative86.1%
associate-*r*88.5%
div-inv88.5%
metadata-eval88.5%
Applied egg-rr88.5%
Taylor expanded in c around 0 83.1%
Taylor expanded in b around inf 89.0%
if -1.00000000000000005e242 < (*.f64 a b) < -3.99999999999999981e158 or 1.99999999999999992e-23 < (*.f64 a b) Initial program 94.4%
Taylor expanded in z around 0 85.1%
if -3.99999999999999981e158 < (*.f64 a b) < 1.99999999999999992e-23Initial program 99.3%
Taylor expanded in a around 0 95.8%
Final simplification91.9%
(FPCore (x y z t a b c) :precision binary64 (if (or (<= (* x y) -5e+46) (not (<= (* x y) 5e+134))) (+ c (+ (* x y) (* 0.0625 (* z t)))) (+ (* z (* t 0.0625)) (- c (* a (* b 0.25))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (((x * y) <= -5e+46) || !((x * y) <= 5e+134)) {
tmp = c + ((x * y) + (0.0625 * (z * t)));
} else {
tmp = (z * (t * 0.0625)) + (c - (a * (b * 0.25)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if (((x * y) <= (-5d+46)) .or. (.not. ((x * y) <= 5d+134))) then
tmp = c + ((x * y) + (0.0625d0 * (z * t)))
else
tmp = (z * (t * 0.0625d0)) + (c - (a * (b * 0.25d0)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (((x * y) <= -5e+46) || !((x * y) <= 5e+134)) {
tmp = c + ((x * y) + (0.0625 * (z * t)));
} else {
tmp = (z * (t * 0.0625)) + (c - (a * (b * 0.25)));
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if ((x * y) <= -5e+46) or not ((x * y) <= 5e+134): tmp = c + ((x * y) + (0.0625 * (z * t))) else: tmp = (z * (t * 0.0625)) + (c - (a * (b * 0.25))) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if ((Float64(x * y) <= -5e+46) || !(Float64(x * y) <= 5e+134)) tmp = Float64(c + Float64(Float64(x * y) + Float64(0.0625 * Float64(z * t)))); else tmp = Float64(Float64(z * Float64(t * 0.0625)) + Float64(c - Float64(a * Float64(b * 0.25)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (((x * y) <= -5e+46) || ~(((x * y) <= 5e+134))) tmp = c + ((x * y) + (0.0625 * (z * t))); else tmp = (z * (t * 0.0625)) + (c - (a * (b * 0.25))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[N[(x * y), $MachinePrecision], -5e+46], N[Not[LessEqual[N[(x * y), $MachinePrecision], 5e+134]], $MachinePrecision]], N[(c + N[(N[(x * y), $MachinePrecision] + N[(0.0625 * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(z * N[(t * 0.0625), $MachinePrecision]), $MachinePrecision] + N[(c - N[(a * N[(b * 0.25), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \cdot y \leq -5 \cdot 10^{+46} \lor \neg \left(x \cdot y \leq 5 \cdot 10^{+134}\right):\\
\;\;\;\;c + \left(x \cdot y + 0.0625 \cdot \left(z \cdot t\right)\right)\\
\mathbf{else}:\\
\;\;\;\;z \cdot \left(t \cdot 0.0625\right) + \left(c - a \cdot \left(b \cdot 0.25\right)\right)\\
\end{array}
\end{array}
if (*.f64 x y) < -5.0000000000000002e46 or 4.99999999999999981e134 < (*.f64 x y) Initial program 94.1%
Taylor expanded in a around 0 86.5%
if -5.0000000000000002e46 < (*.f64 x y) < 4.99999999999999981e134Initial program 98.1%
Taylor expanded in x around 0 95.3%
*-commutative95.3%
+-commutative95.3%
metadata-eval95.3%
div-inv95.3%
associate-*r/95.3%
associate--l+95.3%
*-commutative95.3%
*-commutative95.3%
associate-*r*95.8%
div-inv95.8%
metadata-eval95.8%
Applied egg-rr95.8%
Final simplification92.1%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (+ c (* x y))) (t_2 (* a (* b -0.25))))
(if (<= a -1.7e+188)
t_2
(if (<= a -380.0)
t_1
(if (<= a -1.6e-12) (* z (* t 0.0625)) (if (<= a 4.5e+23) 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 = a * (b * -0.25);
double tmp;
if (a <= -1.7e+188) {
tmp = t_2;
} else if (a <= -380.0) {
tmp = t_1;
} else if (a <= -1.6e-12) {
tmp = z * (t * 0.0625);
} else if (a <= 4.5e+23) {
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 = a * (b * (-0.25d0))
if (a <= (-1.7d+188)) then
tmp = t_2
else if (a <= (-380.0d0)) then
tmp = t_1
else if (a <= (-1.6d-12)) then
tmp = z * (t * 0.0625d0)
else if (a <= 4.5d+23) 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 = a * (b * -0.25);
double tmp;
if (a <= -1.7e+188) {
tmp = t_2;
} else if (a <= -380.0) {
tmp = t_1;
} else if (a <= -1.6e-12) {
tmp = z * (t * 0.0625);
} else if (a <= 4.5e+23) {
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 = a * (b * -0.25) tmp = 0 if a <= -1.7e+188: tmp = t_2 elif a <= -380.0: tmp = t_1 elif a <= -1.6e-12: tmp = z * (t * 0.0625) elif a <= 4.5e+23: 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(a * Float64(b * -0.25)) tmp = 0.0 if (a <= -1.7e+188) tmp = t_2; elseif (a <= -380.0) tmp = t_1; elseif (a <= -1.6e-12) tmp = Float64(z * Float64(t * 0.0625)); elseif (a <= 4.5e+23) 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 = a * (b * -0.25); tmp = 0.0; if (a <= -1.7e+188) tmp = t_2; elseif (a <= -380.0) tmp = t_1; elseif (a <= -1.6e-12) tmp = z * (t * 0.0625); elseif (a <= 4.5e+23) 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[(a * N[(b * -0.25), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -1.7e+188], t$95$2, If[LessEqual[a, -380.0], t$95$1, If[LessEqual[a, -1.6e-12], N[(z * N[(t * 0.0625), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 4.5e+23], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := c + x \cdot y\\
t_2 := a \cdot \left(b \cdot -0.25\right)\\
\mathbf{if}\;a \leq -1.7 \cdot 10^{+188}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;a \leq -380:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq -1.6 \cdot 10^{-12}:\\
\;\;\;\;z \cdot \left(t \cdot 0.0625\right)\\
\mathbf{elif}\;a \leq 4.5 \cdot 10^{+23}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if a < -1.69999999999999998e188 or 4.49999999999999979e23 < a Initial program 94.3%
Taylor expanded in x around 0 80.4%
*-commutative80.4%
+-commutative80.4%
metadata-eval80.4%
div-inv80.4%
associate-*r/80.4%
associate--l+80.4%
*-commutative80.4%
*-commutative80.4%
associate-*r*80.4%
div-inv80.4%
metadata-eval80.4%
Applied egg-rr80.4%
Taylor expanded in t around inf 71.0%
associate--l+71.0%
associate-*r/71.0%
div-sub72.2%
cancel-sign-sub-inv72.2%
metadata-eval72.2%
+-commutative72.2%
*-commutative72.2%
Simplified72.2%
Taylor expanded in a around inf 50.6%
*-commutative50.6%
associate-*r*50.6%
*-commutative50.6%
Simplified50.6%
if -1.69999999999999998e188 < a < -380 or -1.6e-12 < a < 4.49999999999999979e23Initial program 97.7%
Taylor expanded in x around inf 59.2%
if -380 < a < -1.6e-12Initial program 100.0%
Taylor expanded in x around 0 100.0%
*-commutative100.0%
+-commutative100.0%
metadata-eval100.0%
div-inv100.0%
associate-*r/100.0%
associate--l+100.0%
*-commutative100.0%
*-commutative100.0%
associate-*r*100.0%
div-inv100.0%
metadata-eval100.0%
Applied egg-rr100.0%
Taylor expanded in t around inf 100.0%
associate--l+100.0%
associate-*r/100.0%
div-sub100.0%
cancel-sign-sub-inv100.0%
metadata-eval100.0%
+-commutative100.0%
*-commutative100.0%
Simplified100.0%
Taylor expanded in t around inf 100.0%
associate-*r*100.0%
Simplified100.0%
Final simplification56.7%
(FPCore (x y z t a b c) :precision binary64 (if (or (<= (* x y) -4e+116) (not (<= (* x y) 1e+103))) (* x (+ y (* -0.25 (/ (* a b) x)))) (+ c (* t (* z 0.0625)))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (((x * y) <= -4e+116) || !((x * y) <= 1e+103)) {
tmp = x * (y + (-0.25 * ((a * b) / x)));
} else {
tmp = c + (t * (z * 0.0625));
}
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) <= (-4d+116)) .or. (.not. ((x * y) <= 1d+103))) then
tmp = x * (y + ((-0.25d0) * ((a * b) / x)))
else
tmp = c + (t * (z * 0.0625d0))
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) <= -4e+116) || !((x * y) <= 1e+103)) {
tmp = x * (y + (-0.25 * ((a * b) / x)));
} else {
tmp = c + (t * (z * 0.0625));
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if ((x * y) <= -4e+116) or not ((x * y) <= 1e+103): tmp = x * (y + (-0.25 * ((a * b) / x))) else: tmp = c + (t * (z * 0.0625)) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if ((Float64(x * y) <= -4e+116) || !(Float64(x * y) <= 1e+103)) tmp = Float64(x * Float64(y + Float64(-0.25 * Float64(Float64(a * b) / x)))); else tmp = Float64(c + Float64(t * Float64(z * 0.0625))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (((x * y) <= -4e+116) || ~(((x * y) <= 1e+103))) tmp = x * (y + (-0.25 * ((a * b) / x))); else tmp = c + (t * (z * 0.0625)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[N[(x * y), $MachinePrecision], -4e+116], N[Not[LessEqual[N[(x * y), $MachinePrecision], 1e+103]], $MachinePrecision]], N[(x * N[(y + N[(-0.25 * N[(N[(a * b), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(c + N[(t * N[(z * 0.0625), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \cdot y \leq -4 \cdot 10^{+116} \lor \neg \left(x \cdot y \leq 10^{+103}\right):\\
\;\;\;\;x \cdot \left(y + -0.25 \cdot \frac{a \cdot b}{x}\right)\\
\mathbf{else}:\\
\;\;\;\;c + t \cdot \left(z \cdot 0.0625\right)\\
\end{array}
\end{array}
if (*.f64 x y) < -4.00000000000000006e116 or 1e103 < (*.f64 x y) Initial program 94.7%
Taylor expanded in z around 0 85.5%
Taylor expanded in x around inf 83.8%
associate--l+83.8%
associate-*r/83.8%
div-sub83.8%
cancel-sign-sub-inv83.8%
metadata-eval83.8%
+-commutative83.8%
*-commutative83.8%
Simplified83.8%
Taylor expanded in c around 0 80.1%
if -4.00000000000000006e116 < (*.f64 x y) < 1e103Initial program 97.6%
Taylor expanded in z around inf 67.3%
associate-*r*67.6%
*-commutative67.6%
associate-*r*67.6%
Simplified67.6%
Final simplification72.2%
(FPCore (x y z t a b c) :precision binary64 (if (or (<= (* a b) -4e+158) (not (<= (* a b) 2e-23))) (- (+ c (* x y)) (* (* a b) 0.25)) (+ c (+ (* x y) (* 0.0625 (* z t))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (((a * b) <= -4e+158) || !((a * b) <= 2e-23)) {
tmp = (c + (x * y)) - ((a * b) * 0.25);
} else {
tmp = c + ((x * y) + (0.0625 * (z * t)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if (((a * b) <= (-4d+158)) .or. (.not. ((a * b) <= 2d-23))) then
tmp = (c + (x * y)) - ((a * b) * 0.25d0)
else
tmp = c + ((x * y) + (0.0625d0 * (z * t)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (((a * b) <= -4e+158) || !((a * b) <= 2e-23)) {
tmp = (c + (x * y)) - ((a * b) * 0.25);
} else {
tmp = c + ((x * y) + (0.0625 * (z * t)));
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if ((a * b) <= -4e+158) or not ((a * b) <= 2e-23): tmp = (c + (x * y)) - ((a * b) * 0.25) else: tmp = c + ((x * y) + (0.0625 * (z * t))) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if ((Float64(a * b) <= -4e+158) || !(Float64(a * b) <= 2e-23)) tmp = Float64(Float64(c + Float64(x * y)) - Float64(Float64(a * b) * 0.25)); else tmp = Float64(c + Float64(Float64(x * y) + Float64(0.0625 * Float64(z * t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (((a * b) <= -4e+158) || ~(((a * b) <= 2e-23))) tmp = (c + (x * y)) - ((a * b) * 0.25); else tmp = c + ((x * y) + (0.0625 * (z * t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[N[(a * b), $MachinePrecision], -4e+158], N[Not[LessEqual[N[(a * b), $MachinePrecision], 2e-23]], $MachinePrecision]], N[(N[(c + N[(x * y), $MachinePrecision]), $MachinePrecision] - N[(N[(a * b), $MachinePrecision] * 0.25), $MachinePrecision]), $MachinePrecision], N[(c + N[(N[(x * y), $MachinePrecision] + N[(0.0625 * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \cdot b \leq -4 \cdot 10^{+158} \lor \neg \left(a \cdot b \leq 2 \cdot 10^{-23}\right):\\
\;\;\;\;\left(c + x \cdot y\right) - \left(a \cdot b\right) \cdot 0.25\\
\mathbf{else}:\\
\;\;\;\;c + \left(x \cdot y + 0.0625 \cdot \left(z \cdot t\right)\right)\\
\end{array}
\end{array}
if (*.f64 a b) < -3.99999999999999981e158 or 1.99999999999999992e-23 < (*.f64 a b) Initial program 92.6%
Taylor expanded in z around 0 81.5%
if -3.99999999999999981e158 < (*.f64 a b) < 1.99999999999999992e-23Initial program 99.3%
Taylor expanded in a around 0 95.8%
Final simplification89.9%
(FPCore (x y z t a b c) :precision binary64 (if (or (<= (* x y) -4e+116) (not (<= (* x y) 5e+134))) (+ c (* x y)) (+ c (* t (* z 0.0625)))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (((x * y) <= -4e+116) || !((x * y) <= 5e+134)) {
tmp = c + (x * y);
} else {
tmp = c + (t * (z * 0.0625));
}
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) <= (-4d+116)) .or. (.not. ((x * y) <= 5d+134))) then
tmp = c + (x * y)
else
tmp = c + (t * (z * 0.0625d0))
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) <= -4e+116) || !((x * y) <= 5e+134)) {
tmp = c + (x * y);
} else {
tmp = c + (t * (z * 0.0625));
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if ((x * y) <= -4e+116) or not ((x * y) <= 5e+134): tmp = c + (x * y) else: tmp = c + (t * (z * 0.0625)) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if ((Float64(x * y) <= -4e+116) || !(Float64(x * y) <= 5e+134)) tmp = Float64(c + Float64(x * y)); else tmp = Float64(c + Float64(t * Float64(z * 0.0625))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (((x * y) <= -4e+116) || ~(((x * y) <= 5e+134))) tmp = c + (x * y); else tmp = c + (t * (z * 0.0625)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[N[(x * y), $MachinePrecision], -4e+116], N[Not[LessEqual[N[(x * y), $MachinePrecision], 5e+134]], $MachinePrecision]], N[(c + N[(x * y), $MachinePrecision]), $MachinePrecision], N[(c + N[(t * N[(z * 0.0625), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \cdot y \leq -4 \cdot 10^{+116} \lor \neg \left(x \cdot y \leq 5 \cdot 10^{+134}\right):\\
\;\;\;\;c + x \cdot y\\
\mathbf{else}:\\
\;\;\;\;c + t \cdot \left(z \cdot 0.0625\right)\\
\end{array}
\end{array}
if (*.f64 x y) < -4.00000000000000006e116 or 4.99999999999999981e134 < (*.f64 x y) Initial program 94.5%
Taylor expanded in x around inf 78.6%
if -4.00000000000000006e116 < (*.f64 x y) < 4.99999999999999981e134Initial program 97.6%
Taylor expanded in z around inf 66.3%
associate-*r*66.6%
*-commutative66.6%
associate-*r*66.6%
Simplified66.6%
Final simplification70.8%
(FPCore (x y z t a b c) :precision binary64 (if (or (<= (* x y) -1.9e+132) (not (<= (* x y) 1.45e+100))) (* x y) c))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (((x * y) <= -1.9e+132) || !((x * y) <= 1.45e+100)) {
tmp = x * y;
} else {
tmp = c;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if (((x * y) <= (-1.9d+132)) .or. (.not. ((x * y) <= 1.45d+100))) then
tmp = x * y
else
tmp = c
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (((x * y) <= -1.9e+132) || !((x * y) <= 1.45e+100)) {
tmp = x * y;
} else {
tmp = c;
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if ((x * y) <= -1.9e+132) or not ((x * y) <= 1.45e+100): tmp = x * y else: tmp = c return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if ((Float64(x * y) <= -1.9e+132) || !(Float64(x * y) <= 1.45e+100)) tmp = Float64(x * y); else tmp = c; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (((x * y) <= -1.9e+132) || ~(((x * y) <= 1.45e+100))) tmp = x * y; else tmp = c; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[N[(x * y), $MachinePrecision], -1.9e+132], N[Not[LessEqual[N[(x * y), $MachinePrecision], 1.45e+100]], $MachinePrecision]], N[(x * y), $MachinePrecision], c]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \cdot y \leq -1.9 \cdot 10^{+132} \lor \neg \left(x \cdot y \leq 1.45 \cdot 10^{+100}\right):\\
\;\;\;\;x \cdot y\\
\mathbf{else}:\\
\;\;\;\;c\\
\end{array}
\end{array}
if (*.f64 x y) < -1.90000000000000003e132 or 1.45e100 < (*.f64 x y) Initial program 94.4%
Taylor expanded in z around 0 83.6%
Taylor expanded in x around inf 83.9%
associate--l+83.9%
associate-*r/83.9%
div-sub83.9%
cancel-sign-sub-inv83.9%
metadata-eval83.9%
+-commutative83.9%
*-commutative83.9%
Simplified83.9%
Taylor expanded in x around inf 72.4%
if -1.90000000000000003e132 < (*.f64 x y) < 1.45e100Initial program 97.7%
Taylor expanded in c around inf 32.0%
Final simplification46.2%
(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.5%
Taylor expanded in c around inf 22.3%
Final simplification22.3%
herbie shell --seed 2024076
(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))