
(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 12 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)) (/ (* 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}
Initial program 98.8%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* 0.0625 (* z t))) (t_2 (* (* a b) -0.25)))
(if (<= (* a b) -7.1e+96)
t_2
(if (<= (* a b) -3.8e-22)
t_1
(if (<= (* a b) -1.35e-128)
c
(if (<= (* a b) 6.2e-46)
(* x y)
(if (<= (* a b) 8.6e+78) t_1 t_2)))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = 0.0625 * (z * t);
double t_2 = (a * b) * -0.25;
double tmp;
if ((a * b) <= -7.1e+96) {
tmp = t_2;
} else if ((a * b) <= -3.8e-22) {
tmp = t_1;
} else if ((a * b) <= -1.35e-128) {
tmp = c;
} else if ((a * b) <= 6.2e-46) {
tmp = x * y;
} else if ((a * b) <= 8.6e+78) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = 0.0625d0 * (z * t)
t_2 = (a * b) * (-0.25d0)
if ((a * b) <= (-7.1d+96)) then
tmp = t_2
else if ((a * b) <= (-3.8d-22)) then
tmp = t_1
else if ((a * b) <= (-1.35d-128)) then
tmp = c
else if ((a * b) <= 6.2d-46) then
tmp = x * y
else if ((a * b) <= 8.6d+78) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = 0.0625 * (z * t);
double t_2 = (a * b) * -0.25;
double tmp;
if ((a * b) <= -7.1e+96) {
tmp = t_2;
} else if ((a * b) <= -3.8e-22) {
tmp = t_1;
} else if ((a * b) <= -1.35e-128) {
tmp = c;
} else if ((a * b) <= 6.2e-46) {
tmp = x * y;
} else if ((a * b) <= 8.6e+78) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = 0.0625 * (z * t) t_2 = (a * b) * -0.25 tmp = 0 if (a * b) <= -7.1e+96: tmp = t_2 elif (a * b) <= -3.8e-22: tmp = t_1 elif (a * b) <= -1.35e-128: tmp = c elif (a * b) <= 6.2e-46: tmp = x * y elif (a * b) <= 8.6e+78: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(0.0625 * Float64(z * t)) t_2 = Float64(Float64(a * b) * -0.25) tmp = 0.0 if (Float64(a * b) <= -7.1e+96) tmp = t_2; elseif (Float64(a * b) <= -3.8e-22) tmp = t_1; elseif (Float64(a * b) <= -1.35e-128) tmp = c; elseif (Float64(a * b) <= 6.2e-46) tmp = Float64(x * y); elseif (Float64(a * b) <= 8.6e+78) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = 0.0625 * (z * t); t_2 = (a * b) * -0.25; tmp = 0.0; if ((a * b) <= -7.1e+96) tmp = t_2; elseif ((a * b) <= -3.8e-22) tmp = t_1; elseif ((a * b) <= -1.35e-128) tmp = c; elseif ((a * b) <= 6.2e-46) tmp = x * y; elseif ((a * b) <= 8.6e+78) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(0.0625 * N[(z * t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(a * b), $MachinePrecision] * -0.25), $MachinePrecision]}, If[LessEqual[N[(a * b), $MachinePrecision], -7.1e+96], t$95$2, If[LessEqual[N[(a * b), $MachinePrecision], -3.8e-22], t$95$1, If[LessEqual[N[(a * b), $MachinePrecision], -1.35e-128], c, If[LessEqual[N[(a * b), $MachinePrecision], 6.2e-46], N[(x * y), $MachinePrecision], If[LessEqual[N[(a * b), $MachinePrecision], 8.6e+78], t$95$1, t$95$2]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 0.0625 \cdot \left(z \cdot t\right)\\
t_2 := \left(a \cdot b\right) \cdot -0.25\\
\mathbf{if}\;a \cdot b \leq -7.1 \cdot 10^{+96}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;a \cdot b \leq -3.8 \cdot 10^{-22}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \cdot b \leq -1.35 \cdot 10^{-128}:\\
\;\;\;\;c\\
\mathbf{elif}\;a \cdot b \leq 6.2 \cdot 10^{-46}:\\
\;\;\;\;x \cdot y\\
\mathbf{elif}\;a \cdot b \leq 8.6 \cdot 10^{+78}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if (*.f64 a b) < -7.09999999999999954e96 or 8.59999999999999962e78 < (*.f64 a b) Initial program 97.8%
+-commutativeN/A
sub-negN/A
associate-+r+N/A
+-commutativeN/A
+-lowering-+.f64N/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
associate-+r+N/A
+-commutativeN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f6497.8%
Simplified97.8%
Taylor expanded in a around inf
*-lowering-*.f64N/A
*-lowering-*.f6471.1%
Simplified71.1%
if -7.09999999999999954e96 < (*.f64 a b) < -3.80000000000000023e-22 or 6.2000000000000002e-46 < (*.f64 a b) < 8.59999999999999962e78Initial program 98.1%
+-commutativeN/A
sub-negN/A
associate-+r+N/A
+-commutativeN/A
+-lowering-+.f64N/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
associate-+r+N/A
+-commutativeN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f6498.1%
Simplified98.1%
Taylor expanded in z around inf
*-lowering-*.f64N/A
*-lowering-*.f6448.5%
Simplified48.5%
if -3.80000000000000023e-22 < (*.f64 a b) < -1.35000000000000003e-128Initial program 100.0%
+-commutativeN/A
sub-negN/A
associate-+r+N/A
+-commutativeN/A
+-lowering-+.f64N/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
associate-+r+N/A
+-commutativeN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64100.0%
Simplified100.0%
Taylor expanded in c around inf
Simplified54.2%
if -1.35000000000000003e-128 < (*.f64 a b) < 6.2000000000000002e-46Initial program 100.0%
+-commutativeN/A
sub-negN/A
associate-+r+N/A
+-commutativeN/A
+-lowering-+.f64N/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
associate-+r+N/A
+-commutativeN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64100.0%
Simplified100.0%
Taylor expanded in x around inf
*-lowering-*.f6450.3%
Simplified50.3%
Final simplification57.8%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* (* a b) -0.25)))
(if (<= (* x y) -4e+172)
(* x y)
(if (<= (* x y) -1.9e-132)
t_1
(if (<= (* x y) 9.5e-305) c (if (<= (* x y) 1.45e+28) t_1 (* x y)))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = (a * b) * -0.25;
double tmp;
if ((x * y) <= -4e+172) {
tmp = x * y;
} else if ((x * y) <= -1.9e-132) {
tmp = t_1;
} else if ((x * y) <= 9.5e-305) {
tmp = c;
} else if ((x * y) <= 1.45e+28) {
tmp = t_1;
} else {
tmp = x * y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: t_1
real(8) :: tmp
t_1 = (a * b) * (-0.25d0)
if ((x * y) <= (-4d+172)) then
tmp = x * y
else if ((x * y) <= (-1.9d-132)) then
tmp = t_1
else if ((x * y) <= 9.5d-305) then
tmp = c
else if ((x * y) <= 1.45d+28) then
tmp = t_1
else
tmp = x * y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = (a * b) * -0.25;
double tmp;
if ((x * y) <= -4e+172) {
tmp = x * y;
} else if ((x * y) <= -1.9e-132) {
tmp = t_1;
} else if ((x * y) <= 9.5e-305) {
tmp = c;
} else if ((x * y) <= 1.45e+28) {
tmp = t_1;
} else {
tmp = x * y;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = (a * b) * -0.25 tmp = 0 if (x * y) <= -4e+172: tmp = x * y elif (x * y) <= -1.9e-132: tmp = t_1 elif (x * y) <= 9.5e-305: tmp = c elif (x * y) <= 1.45e+28: tmp = t_1 else: tmp = x * y return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(a * b) * -0.25) tmp = 0.0 if (Float64(x * y) <= -4e+172) tmp = Float64(x * y); elseif (Float64(x * y) <= -1.9e-132) tmp = t_1; elseif (Float64(x * y) <= 9.5e-305) tmp = c; elseif (Float64(x * y) <= 1.45e+28) tmp = t_1; else tmp = Float64(x * y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = (a * b) * -0.25; tmp = 0.0; if ((x * y) <= -4e+172) tmp = x * y; elseif ((x * y) <= -1.9e-132) tmp = t_1; elseif ((x * y) <= 9.5e-305) tmp = c; elseif ((x * y) <= 1.45e+28) 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[(N[(a * b), $MachinePrecision] * -0.25), $MachinePrecision]}, If[LessEqual[N[(x * y), $MachinePrecision], -4e+172], N[(x * y), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], -1.9e-132], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], 9.5e-305], c, If[LessEqual[N[(x * y), $MachinePrecision], 1.45e+28], t$95$1, N[(x * y), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(a \cdot b\right) \cdot -0.25\\
\mathbf{if}\;x \cdot y \leq -4 \cdot 10^{+172}:\\
\;\;\;\;x \cdot y\\
\mathbf{elif}\;x \cdot y \leq -1.9 \cdot 10^{-132}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \cdot y \leq 9.5 \cdot 10^{-305}:\\
\;\;\;\;c\\
\mathbf{elif}\;x \cdot y \leq 1.45 \cdot 10^{+28}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x \cdot y\\
\end{array}
\end{array}
if (*.f64 x y) < -4.0000000000000003e172 or 1.4500000000000001e28 < (*.f64 x y) Initial program 96.6%
+-commutativeN/A
sub-negN/A
associate-+r+N/A
+-commutativeN/A
+-lowering-+.f64N/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
associate-+r+N/A
+-commutativeN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f6496.6%
Simplified96.6%
Taylor expanded in x around inf
*-lowering-*.f6471.8%
Simplified71.8%
if -4.0000000000000003e172 < (*.f64 x y) < -1.8999999999999998e-132 or 9.49999999999999902e-305 < (*.f64 x y) < 1.4500000000000001e28Initial program 100.0%
+-commutativeN/A
sub-negN/A
associate-+r+N/A
+-commutativeN/A
+-lowering-+.f64N/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
associate-+r+N/A
+-commutativeN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64100.0%
Simplified100.0%
Taylor expanded in a around inf
*-lowering-*.f64N/A
*-lowering-*.f6446.7%
Simplified46.7%
if -1.8999999999999998e-132 < (*.f64 x y) < 9.49999999999999902e-305Initial program 100.0%
+-commutativeN/A
sub-negN/A
associate-+r+N/A
+-commutativeN/A
+-lowering-+.f64N/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
associate-+r+N/A
+-commutativeN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64100.0%
Simplified100.0%
Taylor expanded in c around inf
Simplified48.0%
Final simplification55.6%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (+ (* x y) (/ (* a b) -4.0))))
(if (<= (* a b) -2e-24)
t_1
(if (<= (* a b) 5e-44)
(+ (* x y) c)
(if (<= (* a b) 2e+77) (+ (* 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 = (x * y) + ((a * b) / -4.0);
double tmp;
if ((a * b) <= -2e-24) {
tmp = t_1;
} else if ((a * b) <= 5e-44) {
tmp = (x * y) + c;
} else if ((a * b) <= 2e+77) {
tmp = (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 = (x * y) + ((a * b) / (-4.0d0))
if ((a * b) <= (-2d-24)) then
tmp = t_1
else if ((a * b) <= 5d-44) then
tmp = (x * y) + c
else if ((a * b) <= 2d+77) then
tmp = (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 = (x * y) + ((a * b) / -4.0);
double tmp;
if ((a * b) <= -2e-24) {
tmp = t_1;
} else if ((a * b) <= 5e-44) {
tmp = (x * y) + c;
} else if ((a * b) <= 2e+77) {
tmp = (x * y) + (0.0625 * (z * t));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = (x * y) + ((a * b) / -4.0) tmp = 0 if (a * b) <= -2e-24: tmp = t_1 elif (a * b) <= 5e-44: tmp = (x * y) + c elif (a * b) <= 2e+77: tmp = (x * y) + (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(Float64(a * b) / -4.0)) tmp = 0.0 if (Float64(a * b) <= -2e-24) tmp = t_1; elseif (Float64(a * b) <= 5e-44) tmp = Float64(Float64(x * y) + c); elseif (Float64(a * b) <= 2e+77) tmp = 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 = (x * y) + ((a * b) / -4.0); tmp = 0.0; if ((a * b) <= -2e-24) tmp = t_1; elseif ((a * b) <= 5e-44) tmp = (x * y) + c; elseif ((a * b) <= 2e+77) tmp = (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[(N[(x * y), $MachinePrecision] + N[(N[(a * b), $MachinePrecision] / -4.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(a * b), $MachinePrecision], -2e-24], t$95$1, If[LessEqual[N[(a * b), $MachinePrecision], 5e-44], N[(N[(x * y), $MachinePrecision] + c), $MachinePrecision], If[LessEqual[N[(a * b), $MachinePrecision], 2e+77], N[(N[(x * y), $MachinePrecision] + N[(0.0625 * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot y + \frac{a \cdot b}{-4}\\
\mathbf{if}\;a \cdot b \leq -2 \cdot 10^{-24}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \cdot b \leq 5 \cdot 10^{-44}:\\
\;\;\;\;x \cdot y + c\\
\mathbf{elif}\;a \cdot b \leq 2 \cdot 10^{+77}:\\
\;\;\;\;x \cdot y + 0.0625 \cdot \left(z \cdot t\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (*.f64 a b) < -1.99999999999999985e-24 or 1.99999999999999997e77 < (*.f64 a b) Initial program 97.6%
+-commutativeN/A
sub-negN/A
associate-+r+N/A
+-commutativeN/A
+-lowering-+.f64N/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
associate-+r+N/A
+-commutativeN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f6497.6%
Simplified97.6%
Taylor expanded in x around inf
*-lowering-*.f6475.8%
Simplified75.8%
if -1.99999999999999985e-24 < (*.f64 a b) < 5.00000000000000039e-44Initial program 100.0%
+-commutativeN/A
sub-negN/A
associate-+r+N/A
+-commutativeN/A
+-lowering-+.f64N/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
associate-+r+N/A
+-commutativeN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64100.0%
Simplified100.0%
Taylor expanded in a around 0
+-commutativeN/A
associate-+l+N/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f6497.8%
Simplified97.8%
Taylor expanded in t around 0
+-lowering-+.f64N/A
*-lowering-*.f6475.1%
Simplified75.1%
if 5.00000000000000039e-44 < (*.f64 a b) < 1.99999999999999997e77Initial program 100.0%
+-commutativeN/A
sub-negN/A
associate-+r+N/A
+-commutativeN/A
+-lowering-+.f64N/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
associate-+r+N/A
+-commutativeN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64100.0%
Simplified100.0%
Taylor expanded in a around 0
+-commutativeN/A
associate-+l+N/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f6489.4%
Simplified89.4%
Taylor expanded in c around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6470.8%
Simplified70.8%
Final simplification75.1%
(FPCore (x y z t a b c)
:precision binary64
(if (<= (* a b) -4e+88)
(* b (+ (* a -0.25) (/ c b)))
(if (<= (* a b) 500000000.0)
(+ (* x y) c)
(if (<= (* a b) 2e+77) (* 0.0625 (* z t)) (+ c (/ (* a b) -4.0))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((a * b) <= -4e+88) {
tmp = b * ((a * -0.25) + (c / b));
} else if ((a * b) <= 500000000.0) {
tmp = (x * y) + c;
} else if ((a * b) <= 2e+77) {
tmp = 0.0625 * (z * t);
} else {
tmp = c + ((a * b) / -4.0);
}
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+88)) then
tmp = b * ((a * (-0.25d0)) + (c / b))
else if ((a * b) <= 500000000.0d0) then
tmp = (x * y) + c
else if ((a * b) <= 2d+77) then
tmp = 0.0625d0 * (z * t)
else
tmp = c + ((a * b) / (-4.0d0))
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+88) {
tmp = b * ((a * -0.25) + (c / b));
} else if ((a * b) <= 500000000.0) {
tmp = (x * y) + c;
} else if ((a * b) <= 2e+77) {
tmp = 0.0625 * (z * t);
} else {
tmp = c + ((a * b) / -4.0);
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if (a * b) <= -4e+88: tmp = b * ((a * -0.25) + (c / b)) elif (a * b) <= 500000000.0: tmp = (x * y) + c elif (a * b) <= 2e+77: tmp = 0.0625 * (z * t) else: tmp = c + ((a * b) / -4.0) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (Float64(a * b) <= -4e+88) tmp = Float64(b * Float64(Float64(a * -0.25) + Float64(c / b))); elseif (Float64(a * b) <= 500000000.0) tmp = Float64(Float64(x * y) + c); elseif (Float64(a * b) <= 2e+77) tmp = Float64(0.0625 * Float64(z * t)); else tmp = Float64(c + Float64(Float64(a * b) / -4.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if ((a * b) <= -4e+88) tmp = b * ((a * -0.25) + (c / b)); elseif ((a * b) <= 500000000.0) tmp = (x * y) + c; elseif ((a * b) <= 2e+77) tmp = 0.0625 * (z * t); else tmp = c + ((a * b) / -4.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[N[(a * b), $MachinePrecision], -4e+88], N[(b * N[(N[(a * -0.25), $MachinePrecision] + N[(c / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * b), $MachinePrecision], 500000000.0], N[(N[(x * y), $MachinePrecision] + c), $MachinePrecision], If[LessEqual[N[(a * b), $MachinePrecision], 2e+77], N[(0.0625 * N[(z * t), $MachinePrecision]), $MachinePrecision], N[(c + N[(N[(a * b), $MachinePrecision] / -4.0), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \cdot b \leq -4 \cdot 10^{+88}:\\
\;\;\;\;b \cdot \left(a \cdot -0.25 + \frac{c}{b}\right)\\
\mathbf{elif}\;a \cdot b \leq 500000000:\\
\;\;\;\;x \cdot y + c\\
\mathbf{elif}\;a \cdot b \leq 2 \cdot 10^{+77}:\\
\;\;\;\;0.0625 \cdot \left(z \cdot t\right)\\
\mathbf{else}:\\
\;\;\;\;c + \frac{a \cdot b}{-4}\\
\end{array}
\end{array}
if (*.f64 a b) < -3.99999999999999984e88Initial program 100.0%
+-commutativeN/A
sub-negN/A
associate-+r+N/A
+-commutativeN/A
+-lowering-+.f64N/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
associate-+r+N/A
+-commutativeN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64100.0%
Simplified100.0%
Taylor expanded in c around inf
Simplified75.5%
Taylor expanded in b around inf
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f6475.5%
Simplified75.5%
if -3.99999999999999984e88 < (*.f64 a b) < 5e8Initial program 99.3%
+-commutativeN/A
sub-negN/A
associate-+r+N/A
+-commutativeN/A
+-lowering-+.f64N/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
associate-+r+N/A
+-commutativeN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f6499.3%
Simplified99.3%
Taylor expanded in a around 0
+-commutativeN/A
associate-+l+N/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f6493.4%
Simplified93.4%
Taylor expanded in t around 0
+-lowering-+.f64N/A
*-lowering-*.f6468.5%
Simplified68.5%
if 5e8 < (*.f64 a b) < 1.99999999999999997e77Initial program 100.0%
+-commutativeN/A
sub-negN/A
associate-+r+N/A
+-commutativeN/A
+-lowering-+.f64N/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
associate-+r+N/A
+-commutativeN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64100.0%
Simplified100.0%
Taylor expanded in z around inf
*-lowering-*.f64N/A
*-lowering-*.f6463.9%
Simplified63.9%
if 1.99999999999999997e77 < (*.f64 a b) Initial program 95.9%
+-commutativeN/A
sub-negN/A
associate-+r+N/A
+-commutativeN/A
+-lowering-+.f64N/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
associate-+r+N/A
+-commutativeN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f6495.9%
Simplified95.9%
Taylor expanded in c around inf
Simplified74.3%
Final simplification70.7%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (+ c (/ (* a b) -4.0))))
(if (<= (* a b) -1.35e+94)
t_1
(if (<= (* a b) 1780000000.0)
(+ (* x y) c)
(if (<= (* a b) 1.7e+77) (* 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 + ((a * b) / -4.0);
double tmp;
if ((a * b) <= -1.35e+94) {
tmp = t_1;
} else if ((a * b) <= 1780000000.0) {
tmp = (x * y) + c;
} else if ((a * b) <= 1.7e+77) {
tmp = 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 + ((a * b) / (-4.0d0))
if ((a * b) <= (-1.35d+94)) then
tmp = t_1
else if ((a * b) <= 1780000000.0d0) then
tmp = (x * y) + c
else if ((a * b) <= 1.7d+77) then
tmp = 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 + ((a * b) / -4.0);
double tmp;
if ((a * b) <= -1.35e+94) {
tmp = t_1;
} else if ((a * b) <= 1780000000.0) {
tmp = (x * y) + c;
} else if ((a * b) <= 1.7e+77) {
tmp = 0.0625 * (z * t);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = c + ((a * b) / -4.0) tmp = 0 if (a * b) <= -1.35e+94: tmp = t_1 elif (a * b) <= 1780000000.0: tmp = (x * y) + c elif (a * b) <= 1.7e+77: tmp = 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(a * b) / -4.0)) tmp = 0.0 if (Float64(a * b) <= -1.35e+94) tmp = t_1; elseif (Float64(a * b) <= 1780000000.0) tmp = Float64(Float64(x * y) + c); elseif (Float64(a * b) <= 1.7e+77) tmp = 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 + ((a * b) / -4.0); tmp = 0.0; if ((a * b) <= -1.35e+94) tmp = t_1; elseif ((a * b) <= 1780000000.0) tmp = (x * y) + c; elseif ((a * b) <= 1.7e+77) tmp = 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[(a * b), $MachinePrecision] / -4.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(a * b), $MachinePrecision], -1.35e+94], t$95$1, If[LessEqual[N[(a * b), $MachinePrecision], 1780000000.0], N[(N[(x * y), $MachinePrecision] + c), $MachinePrecision], If[LessEqual[N[(a * b), $MachinePrecision], 1.7e+77], N[(0.0625 * N[(z * t), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := c + \frac{a \cdot b}{-4}\\
\mathbf{if}\;a \cdot b \leq -1.35 \cdot 10^{+94}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \cdot b \leq 1780000000:\\
\;\;\;\;x \cdot y + c\\
\mathbf{elif}\;a \cdot b \leq 1.7 \cdot 10^{+77}:\\
\;\;\;\;0.0625 \cdot \left(z \cdot t\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (*.f64 a b) < -1.3500000000000001e94 or 1.69999999999999998e77 < (*.f64 a b) Initial program 97.9%
+-commutativeN/A
sub-negN/A
associate-+r+N/A
+-commutativeN/A
+-lowering-+.f64N/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
associate-+r+N/A
+-commutativeN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f6497.9%
Simplified97.9%
Taylor expanded in c around inf
Simplified77.6%
if -1.3500000000000001e94 < (*.f64 a b) < 1.78e9Initial program 99.3%
+-commutativeN/A
sub-negN/A
associate-+r+N/A
+-commutativeN/A
+-lowering-+.f64N/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
associate-+r+N/A
+-commutativeN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f6499.3%
Simplified99.3%
Taylor expanded in a around 0
+-commutativeN/A
associate-+l+N/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f6492.7%
Simplified92.7%
Taylor expanded in t around 0
+-lowering-+.f64N/A
*-lowering-*.f6467.4%
Simplified67.4%
if 1.78e9 < (*.f64 a b) < 1.69999999999999998e77Initial program 100.0%
+-commutativeN/A
sub-negN/A
associate-+r+N/A
+-commutativeN/A
+-lowering-+.f64N/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
associate-+r+N/A
+-commutativeN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64100.0%
Simplified100.0%
Taylor expanded in z around inf
*-lowering-*.f64N/A
*-lowering-*.f6463.9%
Simplified63.9%
Final simplification70.9%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* 0.0625 (* z t))) (t_2 (/ (* a b) -4.0)))
(if (<= (* a b) -5e+96)
(+ t_2 t_1)
(if (<= (* a b) 2e+77) (+ t_1 (+ (* x y) c)) (+ (* x y) t_2)))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = 0.0625 * (z * t);
double t_2 = (a * b) / -4.0;
double tmp;
if ((a * b) <= -5e+96) {
tmp = t_2 + t_1;
} else if ((a * b) <= 2e+77) {
tmp = t_1 + ((x * y) + c);
} else {
tmp = (x * y) + t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = 0.0625d0 * (z * t)
t_2 = (a * b) / (-4.0d0)
if ((a * b) <= (-5d+96)) then
tmp = t_2 + t_1
else if ((a * b) <= 2d+77) then
tmp = t_1 + ((x * y) + c)
else
tmp = (x * y) + t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = 0.0625 * (z * t);
double t_2 = (a * b) / -4.0;
double tmp;
if ((a * b) <= -5e+96) {
tmp = t_2 + t_1;
} else if ((a * b) <= 2e+77) {
tmp = t_1 + ((x * y) + c);
} else {
tmp = (x * y) + t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = 0.0625 * (z * t) t_2 = (a * b) / -4.0 tmp = 0 if (a * b) <= -5e+96: tmp = t_2 + t_1 elif (a * b) <= 2e+77: tmp = t_1 + ((x * y) + c) else: tmp = (x * y) + t_2 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(0.0625 * Float64(z * t)) t_2 = Float64(Float64(a * b) / -4.0) tmp = 0.0 if (Float64(a * b) <= -5e+96) tmp = Float64(t_2 + t_1); elseif (Float64(a * b) <= 2e+77) tmp = Float64(t_1 + Float64(Float64(x * y) + c)); else tmp = Float64(Float64(x * y) + t_2); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = 0.0625 * (z * t); t_2 = (a * b) / -4.0; tmp = 0.0; if ((a * b) <= -5e+96) tmp = t_2 + t_1; elseif ((a * b) <= 2e+77) tmp = t_1 + ((x * y) + c); else tmp = (x * y) + t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(0.0625 * N[(z * t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(a * b), $MachinePrecision] / -4.0), $MachinePrecision]}, If[LessEqual[N[(a * b), $MachinePrecision], -5e+96], N[(t$95$2 + t$95$1), $MachinePrecision], If[LessEqual[N[(a * b), $MachinePrecision], 2e+77], N[(t$95$1 + N[(N[(x * y), $MachinePrecision] + c), $MachinePrecision]), $MachinePrecision], N[(N[(x * y), $MachinePrecision] + t$95$2), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 0.0625 \cdot \left(z \cdot t\right)\\
t_2 := \frac{a \cdot b}{-4}\\
\mathbf{if}\;a \cdot b \leq -5 \cdot 10^{+96}:\\
\;\;\;\;t\_2 + t\_1\\
\mathbf{elif}\;a \cdot b \leq 2 \cdot 10^{+77}:\\
\;\;\;\;t\_1 + \left(x \cdot y + c\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot y + t\_2\\
\end{array}
\end{array}
if (*.f64 a b) < -5.0000000000000004e96Initial program 100.0%
+-commutativeN/A
sub-negN/A
associate-+r+N/A
+-commutativeN/A
+-lowering-+.f64N/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
associate-+r+N/A
+-commutativeN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64100.0%
Simplified100.0%
Taylor expanded in z around inf
*-lowering-*.f64N/A
*-lowering-*.f6487.4%
Simplified87.4%
if -5.0000000000000004e96 < (*.f64 a b) < 1.99999999999999997e77Initial program 99.4%
+-commutativeN/A
sub-negN/A
associate-+r+N/A
+-commutativeN/A
+-lowering-+.f64N/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
associate-+r+N/A
+-commutativeN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f6499.4%
Simplified99.4%
Taylor expanded in a around 0
+-commutativeN/A
associate-+l+N/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f6492.1%
Simplified92.1%
if 1.99999999999999997e77 < (*.f64 a b) Initial program 95.9%
+-commutativeN/A
sub-negN/A
associate-+r+N/A
+-commutativeN/A
+-lowering-+.f64N/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
associate-+r+N/A
+-commutativeN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f6495.9%
Simplified95.9%
Taylor expanded in x around inf
*-lowering-*.f6484.1%
Simplified84.1%
Final simplification89.7%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (+ (* x y) (/ (* a b) -4.0))))
(if (<= (* a b) -2e+123)
t_1
(if (<= (* a b) 2e+77) (+ (* 0.0625 (* z t)) (+ (* x y) c)) t_1))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = (x * y) + ((a * b) / -4.0);
double tmp;
if ((a * b) <= -2e+123) {
tmp = t_1;
} else if ((a * b) <= 2e+77) {
tmp = (0.0625 * (z * t)) + ((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 = (x * y) + ((a * b) / (-4.0d0))
if ((a * b) <= (-2d+123)) then
tmp = t_1
else if ((a * b) <= 2d+77) then
tmp = (0.0625d0 * (z * t)) + ((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 = (x * y) + ((a * b) / -4.0);
double tmp;
if ((a * b) <= -2e+123) {
tmp = t_1;
} else if ((a * b) <= 2e+77) {
tmp = (0.0625 * (z * t)) + ((x * y) + c);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = (x * y) + ((a * b) / -4.0) tmp = 0 if (a * b) <= -2e+123: tmp = t_1 elif (a * b) <= 2e+77: tmp = (0.0625 * (z * t)) + ((x * y) + c) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(x * y) + Float64(Float64(a * b) / -4.0)) tmp = 0.0 if (Float64(a * b) <= -2e+123) tmp = t_1; elseif (Float64(a * b) <= 2e+77) tmp = Float64(Float64(0.0625 * Float64(z * t)) + 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 = (x * y) + ((a * b) / -4.0); tmp = 0.0; if ((a * b) <= -2e+123) tmp = t_1; elseif ((a * b) <= 2e+77) tmp = (0.0625 * (z * t)) + ((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[(N[(x * y), $MachinePrecision] + N[(N[(a * b), $MachinePrecision] / -4.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(a * b), $MachinePrecision], -2e+123], t$95$1, If[LessEqual[N[(a * b), $MachinePrecision], 2e+77], N[(N[(0.0625 * N[(z * t), $MachinePrecision]), $MachinePrecision] + N[(N[(x * y), $MachinePrecision] + c), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot y + \frac{a \cdot b}{-4}\\
\mathbf{if}\;a \cdot b \leq -2 \cdot 10^{+123}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \cdot b \leq 2 \cdot 10^{+77}:\\
\;\;\;\;0.0625 \cdot \left(z \cdot t\right) + \left(x \cdot y + c\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (*.f64 a b) < -1.99999999999999996e123 or 1.99999999999999997e77 < (*.f64 a b) Initial program 97.7%
+-commutativeN/A
sub-negN/A
associate-+r+N/A
+-commutativeN/A
+-lowering-+.f64N/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
associate-+r+N/A
+-commutativeN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f6497.7%
Simplified97.7%
Taylor expanded in x around inf
*-lowering-*.f6485.6%
Simplified85.6%
if -1.99999999999999996e123 < (*.f64 a b) < 1.99999999999999997e77Initial program 99.4%
+-commutativeN/A
sub-negN/A
associate-+r+N/A
+-commutativeN/A
+-lowering-+.f64N/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
associate-+r+N/A
+-commutativeN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f6499.4%
Simplified99.4%
Taylor expanded in a around 0
+-commutativeN/A
associate-+l+N/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f6490.9%
Simplified90.9%
Final simplification89.1%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (+ (* x y) (* 0.0625 (* z t)))))
(if (<= (* x y) -4.8e+168)
t_1
(if (<= (* x y) 1.35e-24) (+ c (/ (* a b) -4.0)) t_1))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = (x * y) + (0.0625 * (z * t));
double tmp;
if ((x * y) <= -4.8e+168) {
tmp = t_1;
} else if ((x * y) <= 1.35e-24) {
tmp = c + ((a * b) / -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 = (x * y) + (0.0625d0 * (z * t))
if ((x * y) <= (-4.8d+168)) then
tmp = t_1
else if ((x * y) <= 1.35d-24) then
tmp = c + ((a * b) / (-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 = (x * y) + (0.0625 * (z * t));
double tmp;
if ((x * y) <= -4.8e+168) {
tmp = t_1;
} else if ((x * y) <= 1.35e-24) {
tmp = c + ((a * b) / -4.0);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = (x * y) + (0.0625 * (z * t)) tmp = 0 if (x * y) <= -4.8e+168: tmp = t_1 elif (x * y) <= 1.35e-24: tmp = c + ((a * b) / -4.0) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(x * y) + Float64(0.0625 * Float64(z * t))) tmp = 0.0 if (Float64(x * y) <= -4.8e+168) tmp = t_1; elseif (Float64(x * y) <= 1.35e-24) tmp = Float64(c + Float64(Float64(a * b) / -4.0)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = (x * y) + (0.0625 * (z * t)); tmp = 0.0; if ((x * y) <= -4.8e+168) tmp = t_1; elseif ((x * y) <= 1.35e-24) tmp = c + ((a * b) / -4.0); 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[(0.0625 * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(x * y), $MachinePrecision], -4.8e+168], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], 1.35e-24], N[(c + N[(N[(a * b), $MachinePrecision] / -4.0), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot y + 0.0625 \cdot \left(z \cdot t\right)\\
\mathbf{if}\;x \cdot y \leq -4.8 \cdot 10^{+168}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \cdot y \leq 1.35 \cdot 10^{-24}:\\
\;\;\;\;c + \frac{a \cdot b}{-4}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (*.f64 x y) < -4.80000000000000019e168 or 1.35000000000000003e-24 < (*.f64 x y) Initial program 97.0%
+-commutativeN/A
sub-negN/A
associate-+r+N/A
+-commutativeN/A
+-lowering-+.f64N/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
associate-+r+N/A
+-commutativeN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f6497.0%
Simplified97.0%
Taylor expanded in a around 0
+-commutativeN/A
associate-+l+N/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f6481.6%
Simplified81.6%
Taylor expanded in c around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6478.7%
Simplified78.7%
if -4.80000000000000019e168 < (*.f64 x y) < 1.35000000000000003e-24Initial program 100.0%
+-commutativeN/A
sub-negN/A
associate-+r+N/A
+-commutativeN/A
+-lowering-+.f64N/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
associate-+r+N/A
+-commutativeN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64100.0%
Simplified100.0%
Taylor expanded in c around inf
Simplified67.8%
Final simplification72.1%
(FPCore (x y z t a b c) :precision binary64 (let* ((t_1 (* (* a b) -0.25))) (if (<= (* a b) -1.65e+94) t_1 (if (<= (* a b) 7e+218) (+ (* x y) c) t_1))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = (a * b) * -0.25;
double tmp;
if ((a * b) <= -1.65e+94) {
tmp = t_1;
} else if ((a * b) <= 7e+218) {
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 = (a * b) * (-0.25d0)
if ((a * b) <= (-1.65d+94)) then
tmp = t_1
else if ((a * b) <= 7d+218) 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 = (a * b) * -0.25;
double tmp;
if ((a * b) <= -1.65e+94) {
tmp = t_1;
} else if ((a * b) <= 7e+218) {
tmp = (x * y) + c;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = (a * b) * -0.25 tmp = 0 if (a * b) <= -1.65e+94: tmp = t_1 elif (a * b) <= 7e+218: tmp = (x * y) + c else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(a * b) * -0.25) tmp = 0.0 if (Float64(a * b) <= -1.65e+94) tmp = t_1; elseif (Float64(a * b) <= 7e+218) 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 = (a * b) * -0.25; tmp = 0.0; if ((a * b) <= -1.65e+94) tmp = t_1; elseif ((a * b) <= 7e+218) 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[(N[(a * b), $MachinePrecision] * -0.25), $MachinePrecision]}, If[LessEqual[N[(a * b), $MachinePrecision], -1.65e+94], t$95$1, If[LessEqual[N[(a * b), $MachinePrecision], 7e+218], N[(N[(x * y), $MachinePrecision] + c), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(a \cdot b\right) \cdot -0.25\\
\mathbf{if}\;a \cdot b \leq -1.65 \cdot 10^{+94}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \cdot b \leq 7 \cdot 10^{+218}:\\
\;\;\;\;x \cdot y + c\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (*.f64 a b) < -1.65e94 or 7.00000000000000038e218 < (*.f64 a b) Initial program 98.6%
+-commutativeN/A
sub-negN/A
associate-+r+N/A
+-commutativeN/A
+-lowering-+.f64N/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
associate-+r+N/A
+-commutativeN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f6498.6%
Simplified98.6%
Taylor expanded in a around inf
*-lowering-*.f64N/A
*-lowering-*.f6478.4%
Simplified78.4%
if -1.65e94 < (*.f64 a b) < 7.00000000000000038e218Initial program 98.9%
+-commutativeN/A
sub-negN/A
associate-+r+N/A
+-commutativeN/A
+-lowering-+.f64N/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
associate-+r+N/A
+-commutativeN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f6498.9%
Simplified98.9%
Taylor expanded in a around 0
+-commutativeN/A
associate-+l+N/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f6488.1%
Simplified88.1%
Taylor expanded in t around 0
+-lowering-+.f64N/A
*-lowering-*.f6462.2%
Simplified62.2%
Final simplification66.9%
(FPCore (x y z t a b c) :precision binary64 (if (<= (* x y) -7e+95) (* x y) (if (<= (* x y) 1.9e-119) c (* x y))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((x * y) <= -7e+95) {
tmp = x * y;
} else if ((x * y) <= 1.9e-119) {
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) <= (-7d+95)) then
tmp = x * y
else if ((x * y) <= 1.9d-119) 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) <= -7e+95) {
tmp = x * y;
} else if ((x * y) <= 1.9e-119) {
tmp = c;
} else {
tmp = x * y;
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if (x * y) <= -7e+95: tmp = x * y elif (x * y) <= 1.9e-119: tmp = c else: tmp = x * y return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (Float64(x * y) <= -7e+95) tmp = Float64(x * y); elseif (Float64(x * y) <= 1.9e-119) 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) <= -7e+95) tmp = x * y; elseif ((x * y) <= 1.9e-119) 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], -7e+95], N[(x * y), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 1.9e-119], c, N[(x * y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \cdot y \leq -7 \cdot 10^{+95}:\\
\;\;\;\;x \cdot y\\
\mathbf{elif}\;x \cdot y \leq 1.9 \cdot 10^{-119}:\\
\;\;\;\;c\\
\mathbf{else}:\\
\;\;\;\;x \cdot y\\
\end{array}
\end{array}
if (*.f64 x y) < -6.99999999999999999e95 or 1.89999999999999987e-119 < (*.f64 x y) Initial program 97.6%
+-commutativeN/A
sub-negN/A
associate-+r+N/A
+-commutativeN/A
+-lowering-+.f64N/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
associate-+r+N/A
+-commutativeN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f6497.6%
Simplified97.6%
Taylor expanded in x around inf
*-lowering-*.f6455.0%
Simplified55.0%
if -6.99999999999999999e95 < (*.f64 x y) < 1.89999999999999987e-119Initial program 100.0%
+-commutativeN/A
sub-negN/A
associate-+r+N/A
+-commutativeN/A
+-lowering-+.f64N/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
associate-+r+N/A
+-commutativeN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64100.0%
Simplified100.0%
Taylor expanded in c around inf
Simplified35.1%
(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
associate-+r+N/A
+-commutativeN/A
+-lowering-+.f64N/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
associate-+r+N/A
+-commutativeN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f6498.8%
Simplified98.8%
Taylor expanded in c around inf
Simplified20.6%
herbie shell --seed 2024158
(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))