
(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 (/ 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 97.7%
associate--l+97.7%
fma-define98.5%
associate-/l*99.2%
fma-neg99.2%
distribute-neg-frac299.2%
metadata-eval99.2%
Simplified99.2%
(FPCore (x y z t a b c) :precision binary64 (+ c (- (fma x y (* z (/ t 16.0))) (* a (/ b 4.0)))))
double code(double x, double y, double z, double t, double a, double b, double c) {
return c + (fma(x, y, (z * (t / 16.0))) - (a * (b / 4.0)));
}
function code(x, y, z, t, a, b, c) return Float64(c + Float64(fma(x, y, Float64(z * Float64(t / 16.0))) - Float64(a * Float64(b / 4.0)))) end
code[x_, y_, z_, t_, a_, b_, c_] := N[(c + N[(N[(x * y + N[(z * N[(t / 16.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * N[(b / 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
c + \left(\mathsf{fma}\left(x, y, z \cdot \frac{t}{16}\right) - a \cdot \frac{b}{4}\right)
\end{array}
Initial program 97.7%
associate-+l-97.7%
*-commutative97.7%
associate-+l-97.7%
fma-define98.1%
*-commutative98.1%
associate-/l*98.8%
associate-/l*98.8%
Simplified98.8%
Final simplification98.8%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (+ c (* 0.0625 (* z t)))) (t_2 (+ c (* a (* b -0.25)))))
(if (<= (* a b) -2e+80)
t_2
(if (<= (* a b) -5e-266)
t_1
(if (<= (* a b) 2e-214)
(+ c (* x y))
(if (<= (* a b) 0.01) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = c + (0.0625 * (z * t));
double t_2 = c + (a * (b * -0.25));
double tmp;
if ((a * b) <= -2e+80) {
tmp = t_2;
} else if ((a * b) <= -5e-266) {
tmp = t_1;
} else if ((a * b) <= 2e-214) {
tmp = c + (x * y);
} else if ((a * b) <= 0.01) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = c + (0.0625d0 * (z * t))
t_2 = c + (a * (b * (-0.25d0)))
if ((a * b) <= (-2d+80)) then
tmp = t_2
else if ((a * b) <= (-5d-266)) then
tmp = t_1
else if ((a * b) <= 2d-214) then
tmp = c + (x * y)
else if ((a * b) <= 0.01d0) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = c + (0.0625 * (z * t));
double t_2 = c + (a * (b * -0.25));
double tmp;
if ((a * b) <= -2e+80) {
tmp = t_2;
} else if ((a * b) <= -5e-266) {
tmp = t_1;
} else if ((a * b) <= 2e-214) {
tmp = c + (x * y);
} else if ((a * b) <= 0.01) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = c + (0.0625 * (z * t)) t_2 = c + (a * (b * -0.25)) tmp = 0 if (a * b) <= -2e+80: tmp = t_2 elif (a * b) <= -5e-266: tmp = t_1 elif (a * b) <= 2e-214: tmp = c + (x * y) elif (a * b) <= 0.01: tmp = t_1 else: tmp = t_2 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(a * Float64(b * -0.25))) tmp = 0.0 if (Float64(a * b) <= -2e+80) tmp = t_2; elseif (Float64(a * b) <= -5e-266) tmp = t_1; elseif (Float64(a * b) <= 2e-214) tmp = Float64(c + Float64(x * y)); elseif (Float64(a * b) <= 0.01) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = c + (0.0625 * (z * t)); t_2 = c + (a * (b * -0.25)); tmp = 0.0; if ((a * b) <= -2e+80) tmp = t_2; elseif ((a * b) <= -5e-266) tmp = t_1; elseif ((a * b) <= 2e-214) tmp = c + (x * y); elseif ((a * b) <= 0.01) 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[(0.0625 * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(c + N[(a * N[(b * -0.25), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(a * b), $MachinePrecision], -2e+80], t$95$2, If[LessEqual[N[(a * b), $MachinePrecision], -5e-266], t$95$1, If[LessEqual[N[(a * b), $MachinePrecision], 2e-214], N[(c + N[(x * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * b), $MachinePrecision], 0.01], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := c + 0.0625 \cdot \left(z \cdot t\right)\\
t_2 := c + a \cdot \left(b \cdot -0.25\right)\\
\mathbf{if}\;a \cdot b \leq -2 \cdot 10^{+80}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;a \cdot b \leq -5 \cdot 10^{-266}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \cdot b \leq 2 \cdot 10^{-214}:\\
\;\;\;\;c + x \cdot y\\
\mathbf{elif}\;a \cdot b \leq 0.01:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if (*.f64 a b) < -2e80 or 0.0100000000000000002 < (*.f64 a b) Initial program 94.8%
associate--l+94.8%
fma-define95.9%
associate-/l*97.8%
fma-neg97.8%
distribute-neg-frac297.8%
metadata-eval97.8%
Simplified97.8%
Taylor expanded in a around inf 77.0%
*-commutative77.0%
associate-*r*77.0%
Simplified77.0%
if -2e80 < (*.f64 a b) < -4.99999999999999992e-266 or 1.99999999999999983e-214 < (*.f64 a b) < 0.0100000000000000002Initial program 98.9%
Taylor expanded in a around 0 91.6%
Taylor expanded in x around 0 67.9%
if -4.99999999999999992e-266 < (*.f64 a b) < 1.99999999999999983e-214Initial program 100.0%
Taylor expanded in a around 0 100.0%
Taylor expanded in t around 0 72.3%
+-commutative72.3%
Simplified72.3%
Final simplification72.4%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* b (* a -0.25))))
(if (<= (* x y) -9e+68)
(* x y)
(if (<= (* x y) -3.8e-274)
t_1
(if (<= (* x y) 8.5e-95) c (if (<= (* x y) 1.3e+100) t_1 (* x y)))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = b * (a * -0.25);
double tmp;
if ((x * y) <= -9e+68) {
tmp = x * y;
} else if ((x * y) <= -3.8e-274) {
tmp = t_1;
} else if ((x * y) <= 8.5e-95) {
tmp = c;
} else if ((x * y) <= 1.3e+100) {
tmp = t_1;
} else {
tmp = x * y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: t_1
real(8) :: tmp
t_1 = b * (a * (-0.25d0))
if ((x * y) <= (-9d+68)) then
tmp = x * y
else if ((x * y) <= (-3.8d-274)) then
tmp = t_1
else if ((x * y) <= 8.5d-95) then
tmp = c
else if ((x * y) <= 1.3d+100) then
tmp = t_1
else
tmp = x * y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = b * (a * -0.25);
double tmp;
if ((x * y) <= -9e+68) {
tmp = x * y;
} else if ((x * y) <= -3.8e-274) {
tmp = t_1;
} else if ((x * y) <= 8.5e-95) {
tmp = c;
} else if ((x * y) <= 1.3e+100) {
tmp = t_1;
} else {
tmp = x * y;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = b * (a * -0.25) tmp = 0 if (x * y) <= -9e+68: tmp = x * y elif (x * y) <= -3.8e-274: tmp = t_1 elif (x * y) <= 8.5e-95: tmp = c elif (x * y) <= 1.3e+100: tmp = t_1 else: tmp = x * y return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(b * Float64(a * -0.25)) tmp = 0.0 if (Float64(x * y) <= -9e+68) tmp = Float64(x * y); elseif (Float64(x * y) <= -3.8e-274) tmp = t_1; elseif (Float64(x * y) <= 8.5e-95) tmp = c; elseif (Float64(x * y) <= 1.3e+100) tmp = t_1; else tmp = Float64(x * y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = b * (a * -0.25); tmp = 0.0; if ((x * y) <= -9e+68) tmp = x * y; elseif ((x * y) <= -3.8e-274) tmp = t_1; elseif ((x * y) <= 8.5e-95) tmp = c; elseif ((x * y) <= 1.3e+100) tmp = t_1; else tmp = x * y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(b * N[(a * -0.25), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(x * y), $MachinePrecision], -9e+68], N[(x * y), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], -3.8e-274], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], 8.5e-95], c, If[LessEqual[N[(x * y), $MachinePrecision], 1.3e+100], t$95$1, N[(x * y), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \left(a \cdot -0.25\right)\\
\mathbf{if}\;x \cdot y \leq -9 \cdot 10^{+68}:\\
\;\;\;\;x \cdot y\\
\mathbf{elif}\;x \cdot y \leq -3.8 \cdot 10^{-274}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \cdot y \leq 8.5 \cdot 10^{-95}:\\
\;\;\;\;c\\
\mathbf{elif}\;x \cdot y \leq 1.3 \cdot 10^{+100}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x \cdot y\\
\end{array}
\end{array}
if (*.f64 x y) < -9.0000000000000007e68 or 1.3000000000000001e100 < (*.f64 x y) Initial program 94.0%
Taylor expanded in a around 0 86.6%
Taylor expanded in t around 0 72.5%
+-commutative72.5%
Simplified72.5%
Taylor expanded in x around inf 69.1%
if -9.0000000000000007e68 < (*.f64 x y) < -3.79999999999999985e-274 or 8.4999999999999995e-95 < (*.f64 x y) < 1.3000000000000001e100Initial program 100.0%
Taylor expanded in x around 0 90.3%
Taylor expanded in t around 0 54.6%
Taylor expanded in c around 0 37.8%
*-commutative37.8%
associate-*r*37.8%
*-commutative37.8%
associate-*r*37.8%
Simplified37.8%
if -3.79999999999999985e-274 < (*.f64 x y) < 8.4999999999999995e-95Initial program 98.8%
Taylor expanded in c around inf 41.8%
Final simplification49.2%
(FPCore (x y z t a b c) :precision binary64 (if (or (<= (* a b) -4e+18) (not (<= (* a b) 1e+22))) (+ c (- (* z (* t 0.0625)) (* (* 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+18) || !((a * b) <= 1e+22)) {
tmp = c + ((z * (t * 0.0625)) - ((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+18)) .or. (.not. ((a * b) <= 1d+22))) then
tmp = c + ((z * (t * 0.0625d0)) - ((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+18) || !((a * b) <= 1e+22)) {
tmp = c + ((z * (t * 0.0625)) - ((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+18) or not ((a * b) <= 1e+22): tmp = c + ((z * (t * 0.0625)) - ((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+18) || !(Float64(a * b) <= 1e+22)) tmp = Float64(c + Float64(Float64(z * Float64(t * 0.0625)) - 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+18) || ~(((a * b) <= 1e+22))) tmp = c + ((z * (t * 0.0625)) - ((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+18], N[Not[LessEqual[N[(a * b), $MachinePrecision], 1e+22]], $MachinePrecision]], N[(c + N[(N[(z * N[(t * 0.0625), $MachinePrecision]), $MachinePrecision] - N[(N[(a * b), $MachinePrecision] * 0.25), $MachinePrecision]), $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^{+18} \lor \neg \left(a \cdot b \leq 10^{+22}\right):\\
\;\;\;\;c + \left(z \cdot \left(t \cdot 0.0625\right) - \left(a \cdot b\right) \cdot 0.25\right)\\
\mathbf{else}:\\
\;\;\;\;c + \left(x \cdot y + 0.0625 \cdot \left(z \cdot t\right)\right)\\
\end{array}
\end{array}
if (*.f64 a b) < -4e18 or 1e22 < (*.f64 a b) Initial program 94.5%
Taylor expanded in x around 0 86.1%
associate--l+86.1%
associate-*r*87.8%
*-commutative87.8%
*-commutative87.8%
Applied egg-rr87.8%
if -4e18 < (*.f64 a b) < 1e22Initial program 100.0%
Taylor expanded in a around 0 96.7%
Final simplification93.0%
(FPCore (x y z t a b c) :precision binary64 (if (or (<= (* a b) -2e+68) (not (<= (* a b) 0.01))) (- (+ 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) <= -2e+68) || !((a * b) <= 0.01)) {
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) <= (-2d+68)) .or. (.not. ((a * b) <= 0.01d0))) 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) <= -2e+68) || !((a * b) <= 0.01)) {
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) <= -2e+68) or not ((a * b) <= 0.01): 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) <= -2e+68) || !(Float64(a * b) <= 0.01)) 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) <= -2e+68) || ~(((a * b) <= 0.01))) 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], -2e+68], N[Not[LessEqual[N[(a * b), $MachinePrecision], 0.01]], $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 -2 \cdot 10^{+68} \lor \neg \left(a \cdot b \leq 0.01\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.99999999999999991e68 or 0.0100000000000000002 < (*.f64 a b) Initial program 93.9%
Taylor expanded in z around 0 86.5%
if -1.99999999999999991e68 < (*.f64 a b) < 0.0100000000000000002Initial program 100.0%
Taylor expanded in a around 0 95.7%
Final simplification92.3%
(FPCore (x y z t a b c)
:precision binary64
(if (<= (* a b) -2e+68)
(+ c (* a (* b -0.25)))
(if (<= (* a b) 5e+217)
(+ c (+ (* x y) (* 0.0625 (* z t))))
(* x (- y (* 0.25 (/ (* a b) x)))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((a * b) <= -2e+68) {
tmp = c + (a * (b * -0.25));
} else if ((a * b) <= 5e+217) {
tmp = c + ((x * y) + (0.0625 * (z * t)));
} else {
tmp = x * (y - (0.25 * ((a * b) / x)));
}
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+68)) then
tmp = c + (a * (b * (-0.25d0)))
else if ((a * b) <= 5d+217) then
tmp = c + ((x * y) + (0.0625d0 * (z * t)))
else
tmp = x * (y - (0.25d0 * ((a * b) / x)))
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+68) {
tmp = c + (a * (b * -0.25));
} else if ((a * b) <= 5e+217) {
tmp = c + ((x * y) + (0.0625 * (z * t)));
} else {
tmp = x * (y - (0.25 * ((a * b) / x)));
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if (a * b) <= -2e+68: tmp = c + (a * (b * -0.25)) elif (a * b) <= 5e+217: tmp = c + ((x * y) + (0.0625 * (z * t))) else: tmp = x * (y - (0.25 * ((a * b) / x))) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (Float64(a * b) <= -2e+68) tmp = Float64(c + Float64(a * Float64(b * -0.25))); elseif (Float64(a * b) <= 5e+217) tmp = Float64(c + Float64(Float64(x * y) + Float64(0.0625 * Float64(z * t)))); else tmp = Float64(x * Float64(y - Float64(0.25 * Float64(Float64(a * b) / x)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if ((a * b) <= -2e+68) tmp = c + (a * (b * -0.25)); elseif ((a * b) <= 5e+217) tmp = c + ((x * y) + (0.0625 * (z * t))); else tmp = x * (y - (0.25 * ((a * b) / x))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[N[(a * b), $MachinePrecision], -2e+68], N[(c + N[(a * N[(b * -0.25), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * b), $MachinePrecision], 5e+217], N[(c + N[(N[(x * y), $MachinePrecision] + N[(0.0625 * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(y - N[(0.25 * N[(N[(a * b), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \cdot b \leq -2 \cdot 10^{+68}:\\
\;\;\;\;c + a \cdot \left(b \cdot -0.25\right)\\
\mathbf{elif}\;a \cdot b \leq 5 \cdot 10^{+217}:\\
\;\;\;\;c + \left(x \cdot y + 0.0625 \cdot \left(z \cdot t\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(y - 0.25 \cdot \frac{a \cdot b}{x}\right)\\
\end{array}
\end{array}
if (*.f64 a b) < -1.99999999999999991e68Initial program 88.4%
associate--l+88.4%
fma-define93.0%
associate-/l*95.3%
fma-neg95.3%
distribute-neg-frac295.3%
metadata-eval95.3%
Simplified95.3%
Taylor expanded in a around inf 81.7%
*-commutative81.7%
associate-*r*81.7%
Simplified81.7%
if -1.99999999999999991e68 < (*.f64 a b) < 5.00000000000000041e217Initial program 100.0%
Taylor expanded in a around 0 91.2%
if 5.00000000000000041e217 < (*.f64 a b) Initial program 96.9%
Taylor expanded in x around inf 79.4%
Taylor expanded in t around 0 79.4%
Taylor expanded in c around 0 79.4%
Final simplification88.4%
(FPCore (x y z t a b c) :precision binary64 (if (or (<= (* a b) -1e+54) (not (<= (* a b) 1e+22))) (+ c (* a (* b -0.25))) (+ (* 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+54) || !((a * b) <= 1e+22)) {
tmp = c + (a * (b * -0.25));
} else {
tmp = (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+54)) .or. (.not. ((a * b) <= 1d+22))) then
tmp = c + (a * (b * (-0.25d0)))
else
tmp = (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+54) || !((a * b) <= 1e+22)) {
tmp = c + (a * (b * -0.25));
} else {
tmp = (x * y) + (0.0625 * (z * t));
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if ((a * b) <= -1e+54) or not ((a * b) <= 1e+22): tmp = c + (a * (b * -0.25)) else: tmp = (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+54) || !(Float64(a * b) <= 1e+22)) tmp = Float64(c + Float64(a * Float64(b * -0.25))); else tmp = 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+54) || ~(((a * b) <= 1e+22))) tmp = c + (a * (b * -0.25)); else tmp = (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], -1e+54], N[Not[LessEqual[N[(a * b), $MachinePrecision], 1e+22]], $MachinePrecision]], N[(c + N[(a * N[(b * -0.25), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * y), $MachinePrecision] + N[(0.0625 * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \cdot b \leq -1 \cdot 10^{+54} \lor \neg \left(a \cdot b \leq 10^{+22}\right):\\
\;\;\;\;c + a \cdot \left(b \cdot -0.25\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot y + 0.0625 \cdot \left(z \cdot t\right)\\
\end{array}
\end{array}
if (*.f64 a b) < -1.0000000000000001e54 or 1e22 < (*.f64 a b) Initial program 93.9%
associate--l+93.9%
fma-define96.0%
associate-/l*97.9%
fma-neg97.9%
distribute-neg-frac297.9%
metadata-eval97.9%
Simplified97.9%
Taylor expanded in a around inf 76.5%
*-commutative76.5%
associate-*r*76.5%
Simplified76.5%
if -1.0000000000000001e54 < (*.f64 a b) < 1e22Initial program 100.0%
Taylor expanded in a around 0 95.1%
Taylor expanded in c around inf 80.5%
Taylor expanded in c around 0 73.2%
Final simplification74.4%
(FPCore (x y z t a b c)
:precision binary64
(if (<= (* a b) -1e+54)
(+ c (* a (* b -0.25)))
(if (<= (* a b) 0.01)
(+ (* x y) (* 0.0625 (* z t)))
(- (* x y) (* (* a b) 0.25)))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((a * b) <= -1e+54) {
tmp = c + (a * (b * -0.25));
} else if ((a * b) <= 0.01) {
tmp = (x * y) + (0.0625 * (z * t));
} else {
tmp = (x * y) - ((a * b) * 0.25);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if ((a * b) <= (-1d+54)) then
tmp = c + (a * (b * (-0.25d0)))
else if ((a * b) <= 0.01d0) then
tmp = (x * y) + (0.0625d0 * (z * t))
else
tmp = (x * y) - ((a * b) * 0.25d0)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((a * b) <= -1e+54) {
tmp = c + (a * (b * -0.25));
} else if ((a * b) <= 0.01) {
tmp = (x * y) + (0.0625 * (z * t));
} else {
tmp = (x * y) - ((a * b) * 0.25);
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if (a * b) <= -1e+54: tmp = c + (a * (b * -0.25)) elif (a * b) <= 0.01: tmp = (x * y) + (0.0625 * (z * t)) else: tmp = (x * y) - ((a * b) * 0.25) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (Float64(a * b) <= -1e+54) tmp = Float64(c + Float64(a * Float64(b * -0.25))); elseif (Float64(a * b) <= 0.01) tmp = Float64(Float64(x * y) + Float64(0.0625 * Float64(z * t))); else tmp = Float64(Float64(x * y) - Float64(Float64(a * b) * 0.25)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if ((a * b) <= -1e+54) tmp = c + (a * (b * -0.25)); elseif ((a * b) <= 0.01) tmp = (x * y) + (0.0625 * (z * t)); else tmp = (x * y) - ((a * b) * 0.25); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[N[(a * b), $MachinePrecision], -1e+54], N[(c + N[(a * N[(b * -0.25), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * b), $MachinePrecision], 0.01], N[(N[(x * y), $MachinePrecision] + N[(0.0625 * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * y), $MachinePrecision] - N[(N[(a * b), $MachinePrecision] * 0.25), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \cdot b \leq -1 \cdot 10^{+54}:\\
\;\;\;\;c + a \cdot \left(b \cdot -0.25\right)\\
\mathbf{elif}\;a \cdot b \leq 0.01:\\
\;\;\;\;x \cdot y + 0.0625 \cdot \left(z \cdot t\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot y - \left(a \cdot b\right) \cdot 0.25\\
\end{array}
\end{array}
if (*.f64 a b) < -1.0000000000000001e54Initial program 88.9%
associate--l+88.9%
fma-define93.3%
associate-/l*95.6%
fma-neg95.6%
distribute-neg-frac295.6%
metadata-eval95.6%
Simplified95.6%
Taylor expanded in a around inf 80.4%
*-commutative80.4%
associate-*r*80.4%
Simplified80.4%
if -1.0000000000000001e54 < (*.f64 a b) < 0.0100000000000000002Initial program 100.0%
Taylor expanded in a around 0 95.7%
Taylor expanded in c around inf 81.4%
Taylor expanded in c around 0 73.4%
if 0.0100000000000000002 < (*.f64 a b) Initial program 98.4%
Taylor expanded in z around 0 85.0%
Taylor expanded in c around 0 73.3%
Final simplification74.6%
(FPCore (x y z t a b c) :precision binary64 (if (or (<= (* x y) -3.7e+70) (not (<= (* x y) 1.1e+59))) (+ c (* x y)) (+ c (* 0.0625 (* z t)))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (((x * y) <= -3.7e+70) || !((x * y) <= 1.1e+59)) {
tmp = c + (x * y);
} else {
tmp = c + (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 (((x * y) <= (-3.7d+70)) .or. (.not. ((x * y) <= 1.1d+59))) then
tmp = c + (x * y)
else
tmp = c + (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 (((x * y) <= -3.7e+70) || !((x * y) <= 1.1e+59)) {
tmp = c + (x * y);
} else {
tmp = c + (0.0625 * (z * t));
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if ((x * y) <= -3.7e+70) or not ((x * y) <= 1.1e+59): tmp = c + (x * y) else: tmp = c + (0.0625 * (z * t)) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if ((Float64(x * y) <= -3.7e+70) || !(Float64(x * y) <= 1.1e+59)) tmp = Float64(c + Float64(x * y)); else tmp = Float64(c + 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 (((x * y) <= -3.7e+70) || ~(((x * y) <= 1.1e+59))) tmp = c + (x * y); else tmp = c + (0.0625 * (z * t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[N[(x * y), $MachinePrecision], -3.7e+70], N[Not[LessEqual[N[(x * y), $MachinePrecision], 1.1e+59]], $MachinePrecision]], N[(c + N[(x * y), $MachinePrecision]), $MachinePrecision], N[(c + N[(0.0625 * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \cdot y \leq -3.7 \cdot 10^{+70} \lor \neg \left(x \cdot y \leq 1.1 \cdot 10^{+59}\right):\\
\;\;\;\;c + x \cdot y\\
\mathbf{else}:\\
\;\;\;\;c + 0.0625 \cdot \left(z \cdot t\right)\\
\end{array}
\end{array}
if (*.f64 x y) < -3.69999999999999989e70 or 1.1e59 < (*.f64 x y) Initial program 94.4%
Taylor expanded in a around 0 85.1%
Taylor expanded in t around 0 70.9%
+-commutative70.9%
Simplified70.9%
if -3.69999999999999989e70 < (*.f64 x y) < 1.1e59Initial program 99.5%
Taylor expanded in a around 0 68.9%
Taylor expanded in x around 0 63.8%
Final simplification66.3%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* t (* z 0.0625))))
(if (<= t -6.8e-117)
t_1
(if (<= t 3.8e-140) (* x y) (if (<= t 1.42e+38) (* b (* a -0.25)) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = t * (z * 0.0625);
double tmp;
if (t <= -6.8e-117) {
tmp = t_1;
} else if (t <= 3.8e-140) {
tmp = x * y;
} else if (t <= 1.42e+38) {
tmp = b * (a * -0.25);
} 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 = t * (z * 0.0625d0)
if (t <= (-6.8d-117)) then
tmp = t_1
else if (t <= 3.8d-140) then
tmp = x * y
else if (t <= 1.42d+38) then
tmp = b * (a * (-0.25d0))
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 = t * (z * 0.0625);
double tmp;
if (t <= -6.8e-117) {
tmp = t_1;
} else if (t <= 3.8e-140) {
tmp = x * y;
} else if (t <= 1.42e+38) {
tmp = b * (a * -0.25);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = t * (z * 0.0625) tmp = 0 if t <= -6.8e-117: tmp = t_1 elif t <= 3.8e-140: tmp = x * y elif t <= 1.42e+38: tmp = b * (a * -0.25) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(t * Float64(z * 0.0625)) tmp = 0.0 if (t <= -6.8e-117) tmp = t_1; elseif (t <= 3.8e-140) tmp = Float64(x * y); elseif (t <= 1.42e+38) tmp = Float64(b * Float64(a * -0.25)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = t * (z * 0.0625); tmp = 0.0; if (t <= -6.8e-117) tmp = t_1; elseif (t <= 3.8e-140) tmp = x * y; elseif (t <= 1.42e+38) tmp = b * (a * -0.25); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(t * N[(z * 0.0625), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -6.8e-117], t$95$1, If[LessEqual[t, 3.8e-140], N[(x * y), $MachinePrecision], If[LessEqual[t, 1.42e+38], N[(b * N[(a * -0.25), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \left(z \cdot 0.0625\right)\\
\mathbf{if}\;t \leq -6.8 \cdot 10^{-117}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 3.8 \cdot 10^{-140}:\\
\;\;\;\;x \cdot y\\
\mathbf{elif}\;t \leq 1.42 \cdot 10^{+38}:\\
\;\;\;\;b \cdot \left(a \cdot -0.25\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -6.80000000000000069e-117 or 1.4200000000000001e38 < t Initial program 96.7%
Taylor expanded in x around inf 82.3%
Taylor expanded in t around inf 61.8%
Taylor expanded in t around inf 45.5%
associate-*r*46.1%
*-commutative46.1%
associate-*r*46.1%
Simplified46.1%
if -6.80000000000000069e-117 < t < 3.79999999999999998e-140Initial program 98.6%
Taylor expanded in a around 0 69.9%
Taylor expanded in t around 0 65.6%
+-commutative65.6%
Simplified65.6%
Taylor expanded in x around inf 43.6%
if 3.79999999999999998e-140 < t < 1.4200000000000001e38Initial program 100.0%
Taylor expanded in x around 0 84.4%
Taylor expanded in t around 0 66.1%
Taylor expanded in c around 0 41.7%
*-commutative41.7%
associate-*r*41.7%
*-commutative41.7%
associate-*r*41.7%
Simplified41.7%
Final simplification44.7%
(FPCore (x y z t a b c) :precision binary64 (if (or (<= (* x y) -3.2e-20) (not (<= (* x y) 3.2e-43))) (* x y) c))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (((x * y) <= -3.2e-20) || !((x * y) <= 3.2e-43)) {
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) <= (-3.2d-20)) .or. (.not. ((x * y) <= 3.2d-43))) 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) <= -3.2e-20) || !((x * y) <= 3.2e-43)) {
tmp = x * y;
} else {
tmp = c;
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if ((x * y) <= -3.2e-20) or not ((x * y) <= 3.2e-43): tmp = x * y else: tmp = c return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if ((Float64(x * y) <= -3.2e-20) || !(Float64(x * y) <= 3.2e-43)) 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) <= -3.2e-20) || ~(((x * y) <= 3.2e-43))) 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], -3.2e-20], N[Not[LessEqual[N[(x * y), $MachinePrecision], 3.2e-43]], $MachinePrecision]], N[(x * y), $MachinePrecision], c]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \cdot y \leq -3.2 \cdot 10^{-20} \lor \neg \left(x \cdot y \leq 3.2 \cdot 10^{-43}\right):\\
\;\;\;\;x \cdot y\\
\mathbf{else}:\\
\;\;\;\;c\\
\end{array}
\end{array}
if (*.f64 x y) < -3.1999999999999997e-20 or 3.19999999999999985e-43 < (*.f64 x y) Initial program 96.0%
Taylor expanded in a around 0 78.5%
Taylor expanded in t around 0 56.7%
+-commutative56.7%
Simplified56.7%
Taylor expanded in x around inf 52.6%
if -3.1999999999999997e-20 < (*.f64 x y) < 3.19999999999999985e-43Initial program 99.4%
Taylor expanded in c around inf 35.1%
Final simplification43.6%
(FPCore (x y z t a b c) :precision binary64 (+ c (- (+ (* z (* t 0.0625)) (* x y)) (* a (/ b 4.0)))))
double code(double x, double y, double z, double t, double a, double b, double c) {
return c + (((z * (t * 0.0625)) + (x * y)) - (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 + (((z * (t * 0.0625d0)) + (x * y)) - (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 + (((z * (t * 0.0625)) + (x * y)) - (a * (b / 4.0)));
}
def code(x, y, z, t, a, b, c): return c + (((z * (t * 0.0625)) + (x * y)) - (a * (b / 4.0)))
function code(x, y, z, t, a, b, c) return Float64(c + Float64(Float64(Float64(z * Float64(t * 0.0625)) + Float64(x * y)) - Float64(a * Float64(b / 4.0)))) end
function tmp = code(x, y, z, t, a, b, c) tmp = c + (((z * (t * 0.0625)) + (x * y)) - (a * (b / 4.0))); end
code[x_, y_, z_, t_, a_, b_, c_] := N[(c + N[(N[(N[(z * N[(t * 0.0625), $MachinePrecision]), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision] - N[(a * N[(b / 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
c + \left(\left(z \cdot \left(t \cdot 0.0625\right) + x \cdot y\right) - a \cdot \frac{b}{4}\right)
\end{array}
Initial program 97.7%
associate-+l-97.7%
*-commutative97.7%
associate-+l-97.7%
fma-define98.1%
*-commutative98.1%
associate-/l*98.8%
associate-/l*98.8%
Simplified98.8%
fma-undefine98.4%
associate-*r/97.7%
+-commutative97.7%
associate-*r/98.4%
div-inv98.4%
metadata-eval98.4%
Applied egg-rr98.4%
Final simplification98.4%
(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 97.7%
Final simplification97.7%
(FPCore (x y z t a b c) :precision binary64 (if (or (<= t -8e-34) (not (<= t 1.65e+120))) (* t (* z 0.0625)) (+ c (* x y))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((t <= -8e-34) || !(t <= 1.65e+120)) {
tmp = t * (z * 0.0625);
} else {
tmp = c + (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 ((t <= (-8d-34)) .or. (.not. (t <= 1.65d+120))) then
tmp = t * (z * 0.0625d0)
else
tmp = c + (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 ((t <= -8e-34) || !(t <= 1.65e+120)) {
tmp = t * (z * 0.0625);
} else {
tmp = c + (x * y);
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if (t <= -8e-34) or not (t <= 1.65e+120): tmp = t * (z * 0.0625) else: tmp = c + (x * y) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if ((t <= -8e-34) || !(t <= 1.65e+120)) tmp = Float64(t * Float64(z * 0.0625)); else tmp = Float64(c + Float64(x * y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if ((t <= -8e-34) || ~((t <= 1.65e+120))) tmp = t * (z * 0.0625); else tmp = c + (x * y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[t, -8e-34], N[Not[LessEqual[t, 1.65e+120]], $MachinePrecision]], N[(t * N[(z * 0.0625), $MachinePrecision]), $MachinePrecision], N[(c + N[(x * y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -8 \cdot 10^{-34} \lor \neg \left(t \leq 1.65 \cdot 10^{+120}\right):\\
\;\;\;\;t \cdot \left(z \cdot 0.0625\right)\\
\mathbf{else}:\\
\;\;\;\;c + x \cdot y\\
\end{array}
\end{array}
if t < -7.99999999999999942e-34 or 1.64999999999999995e120 < t Initial program 95.9%
Taylor expanded in x around inf 80.7%
Taylor expanded in t around inf 65.2%
Taylor expanded in t around inf 52.1%
associate-*r*52.8%
*-commutative52.8%
associate-*r*52.8%
Simplified52.8%
if -7.99999999999999942e-34 < t < 1.64999999999999995e120Initial program 99.3%
Taylor expanded in a around 0 70.0%
Taylor expanded in t around 0 60.0%
+-commutative60.0%
Simplified60.0%
Final simplification56.7%
(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 97.7%
Taylor expanded in c around inf 20.5%
herbie shell --seed 2024144
(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))