
(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 13 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 (+ (- (+ (* x y) (/ (* z t) 16.0)) (/ (* b a) 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)) - ((b * a) / 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)) - ((b * a) / 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)) - ((b * a) / 4.0)) + c;
}
def code(x, y, z, t, a, b, c): return (((x * y) + ((z * t) / 16.0)) - ((b * a) / 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(b * a) / 4.0)) + c) end
function tmp = code(x, y, z, t, a, b, c) tmp = (((x * y) + ((z * t) / 16.0)) - ((b * a) / 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[(b * a), $MachinePrecision] / 4.0), $MachinePrecision]), $MachinePrecision] + c), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(x \cdot y + \frac{z \cdot t}{16}\right) - \frac{b \cdot a}{4}\right) + c
\end{array}
Initial program 98.8%
Final simplification98.8%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* b (* -0.25 a))))
(if (<= (* x y) -2.35e+55)
(* x y)
(if (<= (* x y) -7.2e-186)
t_1
(if (<= (* x y) 1.9e-289)
c
(if (<= (* x y) 5e-68) t_1 (if (<= (* x y) 1.55e+46) c (* x y))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = b * (-0.25 * a);
double tmp;
if ((x * y) <= -2.35e+55) {
tmp = x * y;
} else if ((x * y) <= -7.2e-186) {
tmp = t_1;
} else if ((x * y) <= 1.9e-289) {
tmp = c;
} else if ((x * y) <= 5e-68) {
tmp = t_1;
} else if ((x * y) <= 1.55e+46) {
tmp = c;
} else {
tmp = x * y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: t_1
real(8) :: tmp
t_1 = b * ((-0.25d0) * a)
if ((x * y) <= (-2.35d+55)) then
tmp = x * y
else if ((x * y) <= (-7.2d-186)) then
tmp = t_1
else if ((x * y) <= 1.9d-289) then
tmp = c
else if ((x * y) <= 5d-68) then
tmp = t_1
else if ((x * y) <= 1.55d+46) then
tmp = c
else
tmp = x * y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = b * (-0.25 * a);
double tmp;
if ((x * y) <= -2.35e+55) {
tmp = x * y;
} else if ((x * y) <= -7.2e-186) {
tmp = t_1;
} else if ((x * y) <= 1.9e-289) {
tmp = c;
} else if ((x * y) <= 5e-68) {
tmp = t_1;
} else if ((x * y) <= 1.55e+46) {
tmp = c;
} else {
tmp = x * y;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = b * (-0.25 * a) tmp = 0 if (x * y) <= -2.35e+55: tmp = x * y elif (x * y) <= -7.2e-186: tmp = t_1 elif (x * y) <= 1.9e-289: tmp = c elif (x * y) <= 5e-68: tmp = t_1 elif (x * y) <= 1.55e+46: tmp = c else: tmp = x * y return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(b * Float64(-0.25 * a)) tmp = 0.0 if (Float64(x * y) <= -2.35e+55) tmp = Float64(x * y); elseif (Float64(x * y) <= -7.2e-186) tmp = t_1; elseif (Float64(x * y) <= 1.9e-289) tmp = c; elseif (Float64(x * y) <= 5e-68) tmp = t_1; elseif (Float64(x * y) <= 1.55e+46) tmp = c; else tmp = Float64(x * y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = b * (-0.25 * a); tmp = 0.0; if ((x * y) <= -2.35e+55) tmp = x * y; elseif ((x * y) <= -7.2e-186) tmp = t_1; elseif ((x * y) <= 1.9e-289) tmp = c; elseif ((x * y) <= 5e-68) tmp = t_1; elseif ((x * y) <= 1.55e+46) tmp = c; else tmp = x * y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(b * N[(-0.25 * a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(x * y), $MachinePrecision], -2.35e+55], N[(x * y), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], -7.2e-186], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], 1.9e-289], c, If[LessEqual[N[(x * y), $MachinePrecision], 5e-68], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], 1.55e+46], c, N[(x * y), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \left(-0.25 \cdot a\right)\\
\mathbf{if}\;x \cdot y \leq -2.35 \cdot 10^{+55}:\\
\;\;\;\;x \cdot y\\
\mathbf{elif}\;x \cdot y \leq -7.2 \cdot 10^{-186}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \cdot y \leq 1.9 \cdot 10^{-289}:\\
\;\;\;\;c\\
\mathbf{elif}\;x \cdot y \leq 5 \cdot 10^{-68}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \cdot y \leq 1.55 \cdot 10^{+46}:\\
\;\;\;\;c\\
\mathbf{else}:\\
\;\;\;\;x \cdot y\\
\end{array}
\end{array}
if (*.f64 x y) < -2.35e55 or 1.54999999999999988e46 < (*.f64 x y) Initial program 97.0%
+-commutativeN/A
sub-negN/A
+-commutativeN/A
associate-+r+N/A
unsub-negN/A
associate-+l-N/A
--lowering--.f64N/A
sub-negN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
--lowering--.f64N/A
Simplified97.0%
Taylor expanded in x around inf
*-lowering-*.f6465.8%
Simplified65.8%
if -2.35e55 < (*.f64 x y) < -7.1999999999999997e-186 or 1.90000000000000005e-289 < (*.f64 x y) < 4.99999999999999971e-68Initial program 100.0%
+-commutativeN/A
sub-negN/A
+-commutativeN/A
associate-+r+N/A
unsub-negN/A
associate-+l-N/A
--lowering--.f64N/A
sub-negN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
--lowering--.f64N/A
Simplified100.0%
Taylor expanded in a around inf
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6442.7%
Simplified42.7%
if -7.1999999999999997e-186 < (*.f64 x y) < 1.90000000000000005e-289 or 4.99999999999999971e-68 < (*.f64 x y) < 1.54999999999999988e46Initial program 100.0%
+-commutativeN/A
sub-negN/A
+-commutativeN/A
associate-+r+N/A
unsub-negN/A
associate-+l-N/A
--lowering--.f64N/A
sub-negN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
--lowering--.f64N/A
Simplified100.0%
Taylor expanded in c around inf
Simplified45.0%
Final simplification52.4%
(FPCore (x y z t a b c)
:precision binary64
(if (<= (* x y) -1.3e+54)
(* x y)
(if (<= (* x y) -7.2e-153)
(* b (* -0.25 a))
(if (<= (* x y) 3.7e-68)
(* t (* z 0.0625))
(if (<= (* x y) 1.2e+46) c (* x y))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((x * y) <= -1.3e+54) {
tmp = x * y;
} else if ((x * y) <= -7.2e-153) {
tmp = b * (-0.25 * a);
} else if ((x * y) <= 3.7e-68) {
tmp = t * (z * 0.0625);
} else if ((x * y) <= 1.2e+46) {
tmp = c;
} else {
tmp = x * y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if ((x * y) <= (-1.3d+54)) then
tmp = x * y
else if ((x * y) <= (-7.2d-153)) then
tmp = b * ((-0.25d0) * a)
else if ((x * y) <= 3.7d-68) then
tmp = t * (z * 0.0625d0)
else if ((x * y) <= 1.2d+46) then
tmp = c
else
tmp = x * y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((x * y) <= -1.3e+54) {
tmp = x * y;
} else if ((x * y) <= -7.2e-153) {
tmp = b * (-0.25 * a);
} else if ((x * y) <= 3.7e-68) {
tmp = t * (z * 0.0625);
} else if ((x * y) <= 1.2e+46) {
tmp = c;
} else {
tmp = x * y;
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if (x * y) <= -1.3e+54: tmp = x * y elif (x * y) <= -7.2e-153: tmp = b * (-0.25 * a) elif (x * y) <= 3.7e-68: tmp = t * (z * 0.0625) elif (x * y) <= 1.2e+46: tmp = c else: tmp = x * y return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (Float64(x * y) <= -1.3e+54) tmp = Float64(x * y); elseif (Float64(x * y) <= -7.2e-153) tmp = Float64(b * Float64(-0.25 * a)); elseif (Float64(x * y) <= 3.7e-68) tmp = Float64(t * Float64(z * 0.0625)); elseif (Float64(x * y) <= 1.2e+46) tmp = c; else tmp = Float64(x * y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if ((x * y) <= -1.3e+54) tmp = x * y; elseif ((x * y) <= -7.2e-153) tmp = b * (-0.25 * a); elseif ((x * y) <= 3.7e-68) tmp = t * (z * 0.0625); elseif ((x * y) <= 1.2e+46) tmp = c; else tmp = x * y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[N[(x * y), $MachinePrecision], -1.3e+54], N[(x * y), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], -7.2e-153], N[(b * N[(-0.25 * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 3.7e-68], N[(t * N[(z * 0.0625), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 1.2e+46], c, N[(x * y), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \cdot y \leq -1.3 \cdot 10^{+54}:\\
\;\;\;\;x \cdot y\\
\mathbf{elif}\;x \cdot y \leq -7.2 \cdot 10^{-153}:\\
\;\;\;\;b \cdot \left(-0.25 \cdot a\right)\\
\mathbf{elif}\;x \cdot y \leq 3.7 \cdot 10^{-68}:\\
\;\;\;\;t \cdot \left(z \cdot 0.0625\right)\\
\mathbf{elif}\;x \cdot y \leq 1.2 \cdot 10^{+46}:\\
\;\;\;\;c\\
\mathbf{else}:\\
\;\;\;\;x \cdot y\\
\end{array}
\end{array}
if (*.f64 x y) < -1.30000000000000003e54 or 1.20000000000000004e46 < (*.f64 x y) Initial program 97.0%
+-commutativeN/A
sub-negN/A
+-commutativeN/A
associate-+r+N/A
unsub-negN/A
associate-+l-N/A
--lowering--.f64N/A
sub-negN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
--lowering--.f64N/A
Simplified97.0%
Taylor expanded in x around inf
*-lowering-*.f6465.8%
Simplified65.8%
if -1.30000000000000003e54 < (*.f64 x y) < -7.1999999999999995e-153Initial program 100.0%
+-commutativeN/A
sub-negN/A
+-commutativeN/A
associate-+r+N/A
unsub-negN/A
associate-+l-N/A
--lowering--.f64N/A
sub-negN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
--lowering--.f64N/A
Simplified100.0%
Taylor expanded in a around inf
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6446.6%
Simplified46.6%
if -7.1999999999999995e-153 < (*.f64 x y) < 3.70000000000000002e-68Initial program 100.0%
+-commutativeN/A
sub-negN/A
+-commutativeN/A
associate-+r+N/A
unsub-negN/A
associate-+l-N/A
--lowering--.f64N/A
sub-negN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
--lowering--.f64N/A
Simplified100.0%
Taylor expanded in z around inf
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6441.3%
Simplified41.3%
if 3.70000000000000002e-68 < (*.f64 x y) < 1.20000000000000004e46Initial program 99.9%
+-commutativeN/A
sub-negN/A
+-commutativeN/A
associate-+r+N/A
unsub-negN/A
associate-+l-N/A
--lowering--.f64N/A
sub-negN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
--lowering--.f64N/A
Simplified99.9%
Taylor expanded in c around inf
Simplified51.3%
Final simplification52.6%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (+ (* x y) (* b (* -0.25 a)))))
(if (<= (* x y) -2e+59)
t_1
(if (<= (* x y) -1e-173)
(- c (* (* b a) 0.25))
(if (<= (* x y) 1e+49) (- c (* -0.0625 (* z t))) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = (x * y) + (b * (-0.25 * a));
double tmp;
if ((x * y) <= -2e+59) {
tmp = t_1;
} else if ((x * y) <= -1e-173) {
tmp = c - ((b * a) * 0.25);
} else if ((x * y) <= 1e+49) {
tmp = c - (-0.0625 * (z * t));
} 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 = (x * y) + (b * ((-0.25d0) * a))
if ((x * y) <= (-2d+59)) then
tmp = t_1
else if ((x * y) <= (-1d-173)) then
tmp = c - ((b * a) * 0.25d0)
else if ((x * y) <= 1d+49) then
tmp = c - ((-0.0625d0) * (z * t))
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 = (x * y) + (b * (-0.25 * a));
double tmp;
if ((x * y) <= -2e+59) {
tmp = t_1;
} else if ((x * y) <= -1e-173) {
tmp = c - ((b * a) * 0.25);
} else if ((x * y) <= 1e+49) {
tmp = c - (-0.0625 * (z * t));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = (x * y) + (b * (-0.25 * a)) tmp = 0 if (x * y) <= -2e+59: tmp = t_1 elif (x * y) <= -1e-173: tmp = c - ((b * a) * 0.25) elif (x * y) <= 1e+49: tmp = c - (-0.0625 * (z * t)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(x * y) + Float64(b * Float64(-0.25 * a))) tmp = 0.0 if (Float64(x * y) <= -2e+59) tmp = t_1; elseif (Float64(x * y) <= -1e-173) tmp = Float64(c - Float64(Float64(b * a) * 0.25)); elseif (Float64(x * y) <= 1e+49) tmp = Float64(c - Float64(-0.0625 * Float64(z * t))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = (x * y) + (b * (-0.25 * a)); tmp = 0.0; if ((x * y) <= -2e+59) tmp = t_1; elseif ((x * y) <= -1e-173) tmp = c - ((b * a) * 0.25); elseif ((x * y) <= 1e+49) tmp = c - (-0.0625 * (z * t)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(x * y), $MachinePrecision] + N[(b * N[(-0.25 * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(x * y), $MachinePrecision], -2e+59], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], -1e-173], N[(c - N[(N[(b * a), $MachinePrecision] * 0.25), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 1e+49], N[(c - N[(-0.0625 * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot y + b \cdot \left(-0.25 \cdot a\right)\\
\mathbf{if}\;x \cdot y \leq -2 \cdot 10^{+59}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \cdot y \leq -1 \cdot 10^{-173}:\\
\;\;\;\;c - \left(b \cdot a\right) \cdot 0.25\\
\mathbf{elif}\;x \cdot y \leq 10^{+49}:\\
\;\;\;\;c - -0.0625 \cdot \left(z \cdot t\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (*.f64 x y) < -1.99999999999999994e59 or 9.99999999999999946e48 < (*.f64 x y) Initial program 96.9%
+-commutativeN/A
sub-negN/A
+-commutativeN/A
associate-+r+N/A
unsub-negN/A
associate-+l-N/A
--lowering--.f64N/A
sub-negN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
--lowering--.f64N/A
Simplified96.9%
Taylor expanded in z around 0
--lowering--.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6488.9%
Simplified88.9%
Taylor expanded in c around 0
cancel-sign-sub-invN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6483.1%
Simplified83.1%
if -1.99999999999999994e59 < (*.f64 x y) < -1e-173Initial program 100.0%
+-commutativeN/A
sub-negN/A
+-commutativeN/A
associate-+r+N/A
unsub-negN/A
associate-+l-N/A
--lowering--.f64N/A
sub-negN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
--lowering--.f64N/A
Simplified100.0%
Taylor expanded in a around inf
*-lowering-*.f64N/A
*-lowering-*.f6475.1%
Simplified75.1%
if -1e-173 < (*.f64 x y) < 9.99999999999999946e48Initial program 100.0%
+-commutativeN/A
sub-negN/A
+-commutativeN/A
associate-+r+N/A
unsub-negN/A
associate-+l-N/A
--lowering--.f64N/A
sub-negN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
--lowering--.f64N/A
Simplified100.0%
Taylor expanded in z around inf
*-lowering-*.f64N/A
*-lowering-*.f6469.2%
Simplified69.2%
Final simplification75.4%
(FPCore (x y z t a b c)
:precision binary64
(if (<= (* b a) -5e+119)
(+ c (* b (- (/ (* x y) b) (* 0.25 a))))
(if (<= (* b a) 1e-46)
(+ c (- (* x y) (* -0.0625 (* z t))))
(+ c (- (* x y) (* (* b a) 0.25))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((b * a) <= -5e+119) {
tmp = c + (b * (((x * y) / b) - (0.25 * a)));
} else if ((b * a) <= 1e-46) {
tmp = c + ((x * y) - (-0.0625 * (z * t)));
} else {
tmp = c + ((x * y) - ((b * a) * 0.25));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if ((b * a) <= (-5d+119)) then
tmp = c + (b * (((x * y) / b) - (0.25d0 * a)))
else if ((b * a) <= 1d-46) then
tmp = c + ((x * y) - ((-0.0625d0) * (z * t)))
else
tmp = c + ((x * y) - ((b * a) * 0.25d0))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((b * a) <= -5e+119) {
tmp = c + (b * (((x * y) / b) - (0.25 * a)));
} else if ((b * a) <= 1e-46) {
tmp = c + ((x * y) - (-0.0625 * (z * t)));
} else {
tmp = c + ((x * y) - ((b * a) * 0.25));
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if (b * a) <= -5e+119: tmp = c + (b * (((x * y) / b) - (0.25 * a))) elif (b * a) <= 1e-46: tmp = c + ((x * y) - (-0.0625 * (z * t))) else: tmp = c + ((x * y) - ((b * a) * 0.25)) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (Float64(b * a) <= -5e+119) tmp = Float64(c + Float64(b * Float64(Float64(Float64(x * y) / b) - Float64(0.25 * a)))); elseif (Float64(b * a) <= 1e-46) tmp = Float64(c + Float64(Float64(x * y) - Float64(-0.0625 * Float64(z * t)))); else tmp = Float64(c + Float64(Float64(x * y) - Float64(Float64(b * a) * 0.25))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if ((b * a) <= -5e+119) tmp = c + (b * (((x * y) / b) - (0.25 * a))); elseif ((b * a) <= 1e-46) tmp = c + ((x * y) - (-0.0625 * (z * t))); else tmp = c + ((x * y) - ((b * a) * 0.25)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[N[(b * a), $MachinePrecision], -5e+119], N[(c + N[(b * N[(N[(N[(x * y), $MachinePrecision] / b), $MachinePrecision] - N[(0.25 * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * a), $MachinePrecision], 1e-46], N[(c + N[(N[(x * y), $MachinePrecision] - N[(-0.0625 * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(c + N[(N[(x * y), $MachinePrecision] - N[(N[(b * a), $MachinePrecision] * 0.25), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \cdot a \leq -5 \cdot 10^{+119}:\\
\;\;\;\;c + b \cdot \left(\frac{x \cdot y}{b} - 0.25 \cdot a\right)\\
\mathbf{elif}\;b \cdot a \leq 10^{-46}:\\
\;\;\;\;c + \left(x \cdot y - -0.0625 \cdot \left(z \cdot t\right)\right)\\
\mathbf{else}:\\
\;\;\;\;c + \left(x \cdot y - \left(b \cdot a\right) \cdot 0.25\right)\\
\end{array}
\end{array}
if (*.f64 a b) < -4.9999999999999999e119Initial program 97.3%
+-commutativeN/A
sub-negN/A
+-commutativeN/A
associate-+r+N/A
unsub-negN/A
associate-+l-N/A
--lowering--.f64N/A
sub-negN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
--lowering--.f64N/A
Simplified97.3%
Taylor expanded in b around inf
*-lowering-*.f64N/A
+-commutativeN/A
associate--l+N/A
associate-*r/N/A
div-subN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6497.5%
Simplified97.5%
Taylor expanded in t around 0
*-lowering-*.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f6488.6%
Simplified88.6%
if -4.9999999999999999e119 < (*.f64 a b) < 1.00000000000000002e-46Initial program 99.3%
+-commutativeN/A
sub-negN/A
+-commutativeN/A
associate-+r+N/A
unsub-negN/A
associate-+l-N/A
--lowering--.f64N/A
sub-negN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
--lowering--.f64N/A
Simplified99.3%
Taylor expanded in a around 0
--lowering--.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6495.9%
Simplified95.9%
if 1.00000000000000002e-46 < (*.f64 a b) Initial program 98.5%
+-commutativeN/A
sub-negN/A
+-commutativeN/A
associate-+r+N/A
unsub-negN/A
associate-+l-N/A
--lowering--.f64N/A
sub-negN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
--lowering--.f64N/A
Simplified98.5%
Taylor expanded in z around 0
--lowering--.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6488.7%
Simplified88.7%
Final simplification92.9%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (+ c (- (* x y) (* (* b a) 0.25)))))
(if (<= (* b a) -5e+119)
t_1
(if (<= (* b a) 1e-46) (+ c (- (* x y) (* -0.0625 (* z t)))) t_1))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = c + ((x * y) - ((b * a) * 0.25));
double tmp;
if ((b * a) <= -5e+119) {
tmp = t_1;
} else if ((b * a) <= 1e-46) {
tmp = c + ((x * y) - (-0.0625 * (z * t)));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: t_1
real(8) :: tmp
t_1 = c + ((x * y) - ((b * a) * 0.25d0))
if ((b * a) <= (-5d+119)) then
tmp = t_1
else if ((b * a) <= 1d-46) then
tmp = c + ((x * y) - ((-0.0625d0) * (z * t)))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = c + ((x * y) - ((b * a) * 0.25));
double tmp;
if ((b * a) <= -5e+119) {
tmp = t_1;
} else if ((b * a) <= 1e-46) {
tmp = c + ((x * y) - (-0.0625 * (z * t)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = c + ((x * y) - ((b * a) * 0.25)) tmp = 0 if (b * a) <= -5e+119: tmp = t_1 elif (b * a) <= 1e-46: tmp = c + ((x * y) - (-0.0625 * (z * t))) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(c + Float64(Float64(x * y) - Float64(Float64(b * a) * 0.25))) tmp = 0.0 if (Float64(b * a) <= -5e+119) tmp = t_1; elseif (Float64(b * a) <= 1e-46) tmp = Float64(c + Float64(Float64(x * y) - Float64(-0.0625 * Float64(z * t)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = c + ((x * y) - ((b * a) * 0.25)); tmp = 0.0; if ((b * a) <= -5e+119) tmp = t_1; elseif ((b * a) <= 1e-46) tmp = c + ((x * y) - (-0.0625 * (z * t))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(c + N[(N[(x * y), $MachinePrecision] - N[(N[(b * a), $MachinePrecision] * 0.25), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b * a), $MachinePrecision], -5e+119], t$95$1, If[LessEqual[N[(b * a), $MachinePrecision], 1e-46], N[(c + N[(N[(x * y), $MachinePrecision] - N[(-0.0625 * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := c + \left(x \cdot y - \left(b \cdot a\right) \cdot 0.25\right)\\
\mathbf{if}\;b \cdot a \leq -5 \cdot 10^{+119}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \cdot a \leq 10^{-46}:\\
\;\;\;\;c + \left(x \cdot y - -0.0625 \cdot \left(z \cdot t\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (*.f64 a b) < -4.9999999999999999e119 or 1.00000000000000002e-46 < (*.f64 a b) Initial program 98.1%
+-commutativeN/A
sub-negN/A
+-commutativeN/A
associate-+r+N/A
unsub-negN/A
associate-+l-N/A
--lowering--.f64N/A
sub-negN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
--lowering--.f64N/A
Simplified98.1%
Taylor expanded in z around 0
--lowering--.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6488.6%
Simplified88.6%
if -4.9999999999999999e119 < (*.f64 a b) < 1.00000000000000002e-46Initial program 99.3%
+-commutativeN/A
sub-negN/A
+-commutativeN/A
associate-+r+N/A
unsub-negN/A
associate-+l-N/A
--lowering--.f64N/A
sub-negN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
--lowering--.f64N/A
Simplified99.3%
Taylor expanded in a around 0
--lowering--.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6495.9%
Simplified95.9%
Final simplification92.8%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* b (* -0.25 a))))
(if (<= (* b a) -5e+119)
(+ (/ y (/ 1.0 x)) t_1)
(if (<= (* b a) 2e+128)
(+ c (- (* x y) (* -0.0625 (* z t))))
(+ (* x y) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = b * (-0.25 * a);
double tmp;
if ((b * a) <= -5e+119) {
tmp = (y / (1.0 / x)) + t_1;
} else if ((b * a) <= 2e+128) {
tmp = c + ((x * y) - (-0.0625 * (z * t)));
} else {
tmp = (x * y) + t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: t_1
real(8) :: tmp
t_1 = b * ((-0.25d0) * a)
if ((b * a) <= (-5d+119)) then
tmp = (y / (1.0d0 / x)) + t_1
else if ((b * a) <= 2d+128) then
tmp = c + ((x * y) - ((-0.0625d0) * (z * t)))
else
tmp = (x * y) + t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = b * (-0.25 * a);
double tmp;
if ((b * a) <= -5e+119) {
tmp = (y / (1.0 / x)) + t_1;
} else if ((b * a) <= 2e+128) {
tmp = c + ((x * y) - (-0.0625 * (z * t)));
} else {
tmp = (x * y) + t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = b * (-0.25 * a) tmp = 0 if (b * a) <= -5e+119: tmp = (y / (1.0 / x)) + t_1 elif (b * a) <= 2e+128: tmp = c + ((x * y) - (-0.0625 * (z * t))) else: tmp = (x * y) + t_1 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(b * Float64(-0.25 * a)) tmp = 0.0 if (Float64(b * a) <= -5e+119) tmp = Float64(Float64(y / Float64(1.0 / x)) + t_1); elseif (Float64(b * a) <= 2e+128) tmp = Float64(c + Float64(Float64(x * y) - Float64(-0.0625 * Float64(z * t)))); else tmp = Float64(Float64(x * y) + t_1); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = b * (-0.25 * a); tmp = 0.0; if ((b * a) <= -5e+119) tmp = (y / (1.0 / x)) + t_1; elseif ((b * a) <= 2e+128) tmp = c + ((x * y) - (-0.0625 * (z * t))); else tmp = (x * y) + t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(b * N[(-0.25 * a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b * a), $MachinePrecision], -5e+119], N[(N[(y / N[(1.0 / x), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision], If[LessEqual[N[(b * a), $MachinePrecision], 2e+128], N[(c + N[(N[(x * y), $MachinePrecision] - N[(-0.0625 * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * y), $MachinePrecision] + t$95$1), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \left(-0.25 \cdot a\right)\\
\mathbf{if}\;b \cdot a \leq -5 \cdot 10^{+119}:\\
\;\;\;\;\frac{y}{\frac{1}{x}} + t\_1\\
\mathbf{elif}\;b \cdot a \leq 2 \cdot 10^{+128}:\\
\;\;\;\;c + \left(x \cdot y - -0.0625 \cdot \left(z \cdot t\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot y + t\_1\\
\end{array}
\end{array}
if (*.f64 a b) < -4.9999999999999999e119Initial program 97.3%
+-commutativeN/A
sub-negN/A
+-commutativeN/A
associate-+r+N/A
unsub-negN/A
associate-+l-N/A
--lowering--.f64N/A
sub-negN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
--lowering--.f64N/A
Simplified97.3%
Taylor expanded in z around 0
--lowering--.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6488.5%
Simplified88.5%
Taylor expanded in c around 0
cancel-sign-sub-invN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6480.6%
Simplified80.6%
*-commutativeN/A
/-rgt-identityN/A
div-invN/A
metadata-evalN/A
*-inversesN/A
associate-/l*N/A
*-commutativeN/A
clear-numN/A
un-div-invN/A
clear-numN/A
*-commutativeN/A
associate-/l*N/A
*-inversesN/A
metadata-evalN/A
div-invN/A
/-rgt-identityN/A
/-lowering-/.f64N/A
/-lowering-/.f6480.6%
Applied egg-rr80.6%
if -4.9999999999999999e119 < (*.f64 a b) < 2.0000000000000002e128Initial program 98.9%
+-commutativeN/A
sub-negN/A
+-commutativeN/A
associate-+r+N/A
unsub-negN/A
associate-+l-N/A
--lowering--.f64N/A
sub-negN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
--lowering--.f64N/A
Simplified98.9%
Taylor expanded in a around 0
--lowering--.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6492.1%
Simplified92.1%
if 2.0000000000000002e128 < (*.f64 a b) Initial program 100.0%
+-commutativeN/A
sub-negN/A
+-commutativeN/A
associate-+r+N/A
unsub-negN/A
associate-+l-N/A
--lowering--.f64N/A
sub-negN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
--lowering--.f64N/A
Simplified100.0%
Taylor expanded in z around 0
--lowering--.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6491.4%
Simplified91.4%
Taylor expanded in c around 0
cancel-sign-sub-invN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6488.4%
Simplified88.4%
Final simplification89.9%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (+ c (- (* x y) (* (* b a) 0.25)))))
(if (<= x -2.4e+52)
t_1
(if (<= x 4.1e-38) (- c (+ (* -0.0625 (* z t)) (/ (* b a) 4.0))) t_1))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = c + ((x * y) - ((b * a) * 0.25));
double tmp;
if (x <= -2.4e+52) {
tmp = t_1;
} else if (x <= 4.1e-38) {
tmp = c - ((-0.0625 * (z * t)) + ((b * a) / 4.0));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: t_1
real(8) :: tmp
t_1 = c + ((x * y) - ((b * a) * 0.25d0))
if (x <= (-2.4d+52)) then
tmp = t_1
else if (x <= 4.1d-38) then
tmp = c - (((-0.0625d0) * (z * t)) + ((b * a) / 4.0d0))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = c + ((x * y) - ((b * a) * 0.25));
double tmp;
if (x <= -2.4e+52) {
tmp = t_1;
} else if (x <= 4.1e-38) {
tmp = c - ((-0.0625 * (z * t)) + ((b * a) / 4.0));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = c + ((x * y) - ((b * a) * 0.25)) tmp = 0 if x <= -2.4e+52: tmp = t_1 elif x <= 4.1e-38: tmp = c - ((-0.0625 * (z * t)) + ((b * a) / 4.0)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(c + Float64(Float64(x * y) - Float64(Float64(b * a) * 0.25))) tmp = 0.0 if (x <= -2.4e+52) tmp = t_1; elseif (x <= 4.1e-38) tmp = Float64(c - Float64(Float64(-0.0625 * Float64(z * t)) + Float64(Float64(b * a) / 4.0))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = c + ((x * y) - ((b * a) * 0.25)); tmp = 0.0; if (x <= -2.4e+52) tmp = t_1; elseif (x <= 4.1e-38) tmp = c - ((-0.0625 * (z * t)) + ((b * a) / 4.0)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(c + N[(N[(x * y), $MachinePrecision] - N[(N[(b * a), $MachinePrecision] * 0.25), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -2.4e+52], t$95$1, If[LessEqual[x, 4.1e-38], N[(c - N[(N[(-0.0625 * N[(z * t), $MachinePrecision]), $MachinePrecision] + N[(N[(b * a), $MachinePrecision] / 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := c + \left(x \cdot y - \left(b \cdot a\right) \cdot 0.25\right)\\
\mathbf{if}\;x \leq -2.4 \cdot 10^{+52}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 4.1 \cdot 10^{-38}:\\
\;\;\;\;c - \left(-0.0625 \cdot \left(z \cdot t\right) + \frac{b \cdot a}{4}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -2.4e52 or 4.0999999999999998e-38 < x Initial program 97.6%
+-commutativeN/A
sub-negN/A
+-commutativeN/A
associate-+r+N/A
unsub-negN/A
associate-+l-N/A
--lowering--.f64N/A
sub-negN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
--lowering--.f64N/A
Simplified97.6%
Taylor expanded in z around 0
--lowering--.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6484.2%
Simplified84.2%
if -2.4e52 < x < 4.0999999999999998e-38Initial program 100.0%
+-commutativeN/A
sub-negN/A
+-commutativeN/A
associate-+r+N/A
unsub-negN/A
associate-+l-N/A
--lowering--.f64N/A
sub-negN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
--lowering--.f64N/A
Simplified100.0%
Taylor expanded in z around inf
*-lowering-*.f64N/A
*-lowering-*.f6486.5%
Simplified86.5%
Final simplification85.4%
(FPCore (x y z t a b c)
:precision binary64
(if (<= x -2.05e+52)
(+ (* x y) c)
(if (<= x 1.36e-250)
(- c (* -0.0625 (* z t)))
(if (<= x 35000.0) (- c (* (* b a) 0.25)) (* x y)))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (x <= -2.05e+52) {
tmp = (x * y) + c;
} else if (x <= 1.36e-250) {
tmp = c - (-0.0625 * (z * t));
} else if (x <= 35000.0) {
tmp = c - ((b * a) * 0.25);
} else {
tmp = x * y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if (x <= (-2.05d+52)) then
tmp = (x * y) + c
else if (x <= 1.36d-250) then
tmp = c - ((-0.0625d0) * (z * t))
else if (x <= 35000.0d0) then
tmp = c - ((b * a) * 0.25d0)
else
tmp = x * y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (x <= -2.05e+52) {
tmp = (x * y) + c;
} else if (x <= 1.36e-250) {
tmp = c - (-0.0625 * (z * t));
} else if (x <= 35000.0) {
tmp = c - ((b * a) * 0.25);
} else {
tmp = x * y;
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if x <= -2.05e+52: tmp = (x * y) + c elif x <= 1.36e-250: tmp = c - (-0.0625 * (z * t)) elif x <= 35000.0: tmp = c - ((b * a) * 0.25) else: tmp = x * y return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (x <= -2.05e+52) tmp = Float64(Float64(x * y) + c); elseif (x <= 1.36e-250) tmp = Float64(c - Float64(-0.0625 * Float64(z * t))); elseif (x <= 35000.0) tmp = Float64(c - Float64(Float64(b * a) * 0.25)); else tmp = Float64(x * y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (x <= -2.05e+52) tmp = (x * y) + c; elseif (x <= 1.36e-250) tmp = c - (-0.0625 * (z * t)); elseif (x <= 35000.0) tmp = c - ((b * a) * 0.25); else tmp = x * y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[x, -2.05e+52], N[(N[(x * y), $MachinePrecision] + c), $MachinePrecision], If[LessEqual[x, 1.36e-250], N[(c - N[(-0.0625 * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 35000.0], N[(c - N[(N[(b * a), $MachinePrecision] * 0.25), $MachinePrecision]), $MachinePrecision], N[(x * y), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.05 \cdot 10^{+52}:\\
\;\;\;\;x \cdot y + c\\
\mathbf{elif}\;x \leq 1.36 \cdot 10^{-250}:\\
\;\;\;\;c - -0.0625 \cdot \left(z \cdot t\right)\\
\mathbf{elif}\;x \leq 35000:\\
\;\;\;\;c - \left(b \cdot a\right) \cdot 0.25\\
\mathbf{else}:\\
\;\;\;\;x \cdot y\\
\end{array}
\end{array}
if x < -2.05e52Initial program 98.2%
+-commutativeN/A
sub-negN/A
+-commutativeN/A
associate-+r+N/A
unsub-negN/A
associate-+l-N/A
--lowering--.f64N/A
sub-negN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
--lowering--.f64N/A
Simplified98.2%
Taylor expanded in x around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f64N/A
*-lowering-*.f6475.4%
Simplified75.4%
associate--r-N/A
--rgt-identityN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f6475.4%
Applied egg-rr75.4%
if -2.05e52 < x < 1.36000000000000007e-250Initial program 100.0%
+-commutativeN/A
sub-negN/A
+-commutativeN/A
associate-+r+N/A
unsub-negN/A
associate-+l-N/A
--lowering--.f64N/A
sub-negN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
--lowering--.f64N/A
Simplified100.0%
Taylor expanded in z around inf
*-lowering-*.f64N/A
*-lowering-*.f6464.9%
Simplified64.9%
if 1.36000000000000007e-250 < x < 35000Initial program 100.0%
+-commutativeN/A
sub-negN/A
+-commutativeN/A
associate-+r+N/A
unsub-negN/A
associate-+l-N/A
--lowering--.f64N/A
sub-negN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
--lowering--.f64N/A
Simplified100.0%
Taylor expanded in a around inf
*-lowering-*.f64N/A
*-lowering-*.f6473.5%
Simplified73.5%
if 35000 < x Initial program 97.0%
+-commutativeN/A
sub-negN/A
+-commutativeN/A
associate-+r+N/A
unsub-negN/A
associate-+l-N/A
--lowering--.f64N/A
sub-negN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
--lowering--.f64N/A
Simplified97.0%
Taylor expanded in x around inf
*-lowering-*.f6438.8%
Simplified38.8%
Final simplification61.8%
(FPCore (x y z t a b c) :precision binary64 (let* ((t_1 (+ (* x y) c))) (if (<= x -1.8e+52) t_1 (if (<= x 1.6e-37) (- c (* -0.0625 (* z t))) t_1))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = (x * y) + c;
double tmp;
if (x <= -1.8e+52) {
tmp = t_1;
} else if (x <= 1.6e-37) {
tmp = c - (-0.0625 * (z * t));
} 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 = (x * y) + c
if (x <= (-1.8d+52)) then
tmp = t_1
else if (x <= 1.6d-37) then
tmp = c - ((-0.0625d0) * (z * t))
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 = (x * y) + c;
double tmp;
if (x <= -1.8e+52) {
tmp = t_1;
} else if (x <= 1.6e-37) {
tmp = c - (-0.0625 * (z * t));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = (x * y) + c tmp = 0 if x <= -1.8e+52: tmp = t_1 elif x <= 1.6e-37: tmp = c - (-0.0625 * (z * t)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(x * y) + c) tmp = 0.0 if (x <= -1.8e+52) tmp = t_1; elseif (x <= 1.6e-37) tmp = Float64(c - Float64(-0.0625 * Float64(z * t))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = (x * y) + c; tmp = 0.0; if (x <= -1.8e+52) tmp = t_1; elseif (x <= 1.6e-37) tmp = c - (-0.0625 * (z * t)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(x * y), $MachinePrecision] + c), $MachinePrecision]}, If[LessEqual[x, -1.8e+52], t$95$1, If[LessEqual[x, 1.6e-37], N[(c - N[(-0.0625 * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot y + c\\
\mathbf{if}\;x \leq -1.8 \cdot 10^{+52}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 1.6 \cdot 10^{-37}:\\
\;\;\;\;c - -0.0625 \cdot \left(z \cdot t\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -1.8e52 or 1.5999999999999999e-37 < x Initial program 97.6%
+-commutativeN/A
sub-negN/A
+-commutativeN/A
associate-+r+N/A
unsub-negN/A
associate-+l-N/A
--lowering--.f64N/A
sub-negN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
--lowering--.f64N/A
Simplified97.6%
Taylor expanded in x around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f64N/A
*-lowering-*.f6467.0%
Simplified67.0%
associate--r-N/A
--rgt-identityN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f6467.0%
Applied egg-rr67.0%
if -1.8e52 < x < 1.5999999999999999e-37Initial program 100.0%
+-commutativeN/A
sub-negN/A
+-commutativeN/A
associate-+r+N/A
unsub-negN/A
associate-+l-N/A
--lowering--.f64N/A
sub-negN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
--lowering--.f64N/A
Simplified100.0%
Taylor expanded in z around inf
*-lowering-*.f64N/A
*-lowering-*.f6458.0%
Simplified58.0%
Final simplification62.4%
(FPCore (x y z t a b c) :precision binary64 (if (<= (* x y) -2.9e+58) (* x y) (if (<= (* x y) 6.2e+47) c (* x y))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((x * y) <= -2.9e+58) {
tmp = x * y;
} else if ((x * y) <= 6.2e+47) {
tmp = c;
} else {
tmp = x * y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if ((x * y) <= (-2.9d+58)) then
tmp = x * y
else if ((x * y) <= 6.2d+47) then
tmp = c
else
tmp = x * y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((x * y) <= -2.9e+58) {
tmp = x * y;
} else if ((x * y) <= 6.2e+47) {
tmp = c;
} else {
tmp = x * y;
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if (x * y) <= -2.9e+58: tmp = x * y elif (x * y) <= 6.2e+47: tmp = c else: tmp = x * y return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (Float64(x * y) <= -2.9e+58) tmp = Float64(x * y); elseif (Float64(x * y) <= 6.2e+47) tmp = c; else tmp = Float64(x * y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if ((x * y) <= -2.9e+58) tmp = x * y; elseif ((x * y) <= 6.2e+47) tmp = c; else tmp = x * y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[N[(x * y), $MachinePrecision], -2.9e+58], N[(x * y), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 6.2e+47], c, N[(x * y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \cdot y \leq -2.9 \cdot 10^{+58}:\\
\;\;\;\;x \cdot y\\
\mathbf{elif}\;x \cdot y \leq 6.2 \cdot 10^{+47}:\\
\;\;\;\;c\\
\mathbf{else}:\\
\;\;\;\;x \cdot y\\
\end{array}
\end{array}
if (*.f64 x y) < -2.90000000000000002e58 or 6.2000000000000001e47 < (*.f64 x y) Initial program 96.9%
+-commutativeN/A
sub-negN/A
+-commutativeN/A
associate-+r+N/A
unsub-negN/A
associate-+l-N/A
--lowering--.f64N/A
sub-negN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
--lowering--.f64N/A
Simplified96.9%
Taylor expanded in x around inf
*-lowering-*.f6466.0%
Simplified66.0%
if -2.90000000000000002e58 < (*.f64 x y) < 6.2000000000000001e47Initial program 100.0%
+-commutativeN/A
sub-negN/A
+-commutativeN/A
associate-+r+N/A
unsub-negN/A
associate-+l-N/A
--lowering--.f64N/A
sub-negN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
--lowering--.f64N/A
Simplified100.0%
Taylor expanded in c around inf
Simplified34.6%
(FPCore (x y z t a b c) :precision binary64 (let* ((t_1 (* t (* z 0.0625)))) (if (<= z -1e+159) t_1 (if (<= z 2.4e+85) (+ (* x y) c) 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 (z <= -1e+159) {
tmp = t_1;
} else if (z <= 2.4e+85) {
tmp = (x * y) + c;
} 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 (z <= (-1d+159)) then
tmp = t_1
else if (z <= 2.4d+85) then
tmp = (x * y) + c
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 (z <= -1e+159) {
tmp = t_1;
} else if (z <= 2.4e+85) {
tmp = (x * y) + c;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = t * (z * 0.0625) tmp = 0 if z <= -1e+159: tmp = t_1 elif z <= 2.4e+85: tmp = (x * y) + c 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 (z <= -1e+159) tmp = t_1; elseif (z <= 2.4e+85) tmp = Float64(Float64(x * y) + c); 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 (z <= -1e+159) tmp = t_1; elseif (z <= 2.4e+85) tmp = (x * y) + c; 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[z, -1e+159], t$95$1, If[LessEqual[z, 2.4e+85], N[(N[(x * y), $MachinePrecision] + c), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \left(z \cdot 0.0625\right)\\
\mathbf{if}\;z \leq -1 \cdot 10^{+159}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 2.4 \cdot 10^{+85}:\\
\;\;\;\;x \cdot y + c\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -9.9999999999999993e158 or 2.39999999999999997e85 < z Initial program 95.9%
+-commutativeN/A
sub-negN/A
+-commutativeN/A
associate-+r+N/A
unsub-negN/A
associate-+l-N/A
--lowering--.f64N/A
sub-negN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
--lowering--.f64N/A
Simplified95.9%
Taylor expanded in z around inf
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6456.4%
Simplified56.4%
if -9.9999999999999993e158 < z < 2.39999999999999997e85Initial program 100.0%
+-commutativeN/A
sub-negN/A
+-commutativeN/A
associate-+r+N/A
unsub-negN/A
associate-+l-N/A
--lowering--.f64N/A
sub-negN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
--lowering--.f64N/A
Simplified100.0%
Taylor expanded in x around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f64N/A
*-lowering-*.f6460.7%
Simplified60.7%
associate--r-N/A
--rgt-identityN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f6460.7%
Applied egg-rr60.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 98.8%
+-commutativeN/A
sub-negN/A
+-commutativeN/A
associate-+r+N/A
unsub-negN/A
associate-+l-N/A
--lowering--.f64N/A
sub-negN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
--lowering--.f64N/A
Simplified98.8%
Taylor expanded in c around inf
Simplified24.4%
herbie shell --seed 2024192
(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))