
(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)) (/ 1.0 (/ (/ 4.0 b) a))) c))
double code(double x, double y, double z, double t, double a, double b, double c) {
return (((x * y) + ((z * t) / 16.0)) - (1.0 / ((4.0 / b) / a))) + 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)) - (1.0d0 / ((4.0d0 / b) / a))) + 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)) - (1.0 / ((4.0 / b) / a))) + c;
}
def code(x, y, z, t, a, b, c): return (((x * y) + ((z * t) / 16.0)) - (1.0 / ((4.0 / b) / a))) + c
function code(x, y, z, t, a, b, c) return Float64(Float64(Float64(Float64(x * y) + Float64(Float64(z * t) / 16.0)) - Float64(1.0 / Float64(Float64(4.0 / b) / a))) + c) end
function tmp = code(x, y, z, t, a, b, c) tmp = (((x * y) + ((z * t) / 16.0)) - (1.0 / ((4.0 / b) / a))) + 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[(1.0 / N[(N[(4.0 / b), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + c), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(x \cdot y + \frac{z \cdot t}{16}\right) - \frac{1}{\frac{\frac{4}{b}}{a}}\right) + c
\end{array}
Initial program 99.3%
Applied egg-rr0
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (+ (* 0.0625 (* t z)) c)) (t_2 (+ (* -0.25 (* a b)) (* x y))))
(if (<= (* x y) -2e+75)
t_2
(if (<= (* x y) 4e-200)
t_1
(if (<= (* x y) 2e-133)
(+ (* a (* b -0.25)) c)
(if (<= (* x y) 1e+209) 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 * (t * z)) + c;
double t_2 = (-0.25 * (a * b)) + (x * y);
double tmp;
if ((x * y) <= -2e+75) {
tmp = t_2;
} else if ((x * y) <= 4e-200) {
tmp = t_1;
} else if ((x * y) <= 2e-133) {
tmp = (a * (b * -0.25)) + c;
} else if ((x * y) <= 1e+209) {
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 * (t * z)) + c
t_2 = ((-0.25d0) * (a * b)) + (x * y)
if ((x * y) <= (-2d+75)) then
tmp = t_2
else if ((x * y) <= 4d-200) then
tmp = t_1
else if ((x * y) <= 2d-133) then
tmp = (a * (b * (-0.25d0))) + c
else if ((x * y) <= 1d+209) 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 * (t * z)) + c;
double t_2 = (-0.25 * (a * b)) + (x * y);
double tmp;
if ((x * y) <= -2e+75) {
tmp = t_2;
} else if ((x * y) <= 4e-200) {
tmp = t_1;
} else if ((x * y) <= 2e-133) {
tmp = (a * (b * -0.25)) + c;
} else if ((x * y) <= 1e+209) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = (0.0625 * (t * z)) + c t_2 = (-0.25 * (a * b)) + (x * y) tmp = 0 if (x * y) <= -2e+75: tmp = t_2 elif (x * y) <= 4e-200: tmp = t_1 elif (x * y) <= 2e-133: tmp = (a * (b * -0.25)) + c elif (x * y) <= 1e+209: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(0.0625 * Float64(t * z)) + c) t_2 = Float64(Float64(-0.25 * Float64(a * b)) + Float64(x * y)) tmp = 0.0 if (Float64(x * y) <= -2e+75) tmp = t_2; elseif (Float64(x * y) <= 4e-200) tmp = t_1; elseif (Float64(x * y) <= 2e-133) tmp = Float64(Float64(a * Float64(b * -0.25)) + c); elseif (Float64(x * y) <= 1e+209) 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 * (t * z)) + c; t_2 = (-0.25 * (a * b)) + (x * y); tmp = 0.0; if ((x * y) <= -2e+75) tmp = t_2; elseif ((x * y) <= 4e-200) tmp = t_1; elseif ((x * y) <= 2e-133) tmp = (a * (b * -0.25)) + c; elseif ((x * y) <= 1e+209) 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[(N[(0.0625 * N[(t * z), $MachinePrecision]), $MachinePrecision] + c), $MachinePrecision]}, Block[{t$95$2 = N[(N[(-0.25 * N[(a * b), $MachinePrecision]), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(x * y), $MachinePrecision], -2e+75], t$95$2, If[LessEqual[N[(x * y), $MachinePrecision], 4e-200], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], 2e-133], N[(N[(a * N[(b * -0.25), $MachinePrecision]), $MachinePrecision] + c), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 1e+209], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 0.0625 \cdot \left(t \cdot z\right) + c\\
t_2 := -0.25 \cdot \left(a \cdot b\right) + x \cdot y\\
\mathbf{if}\;x \cdot y \leq -2 \cdot 10^{+75}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x \cdot y \leq 4 \cdot 10^{-200}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \cdot y \leq 2 \cdot 10^{-133}:\\
\;\;\;\;a \cdot \left(b \cdot -0.25\right) + c\\
\mathbf{elif}\;x \cdot y \leq 10^{+209}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if (*.f64 x y) < -1.99999999999999985e75 or 1.0000000000000001e209 < (*.f64 x y) Initial program 98.8%
Applied egg-rr0
Taylor expanded in x around inf 0
Simplified0
Taylor expanded in c around 0 0
Simplified0
if -1.99999999999999985e75 < (*.f64 x y) < 3.9999999999999999e-200 or 2.0000000000000001e-133 < (*.f64 x y) < 1.0000000000000001e209Initial program 100.0%
Taylor expanded in z around inf 0
Simplified0
if 3.9999999999999999e-200 < (*.f64 x y) < 2.0000000000000001e-133Initial program 94.6%
Taylor expanded in a around inf 0
Simplified0
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (+ (* 0.0625 (* t z)) c)) (t_2 (+ (* x y) c)))
(if (<= (* x y) -2e+75)
t_2
(if (<= (* x y) 4e-200)
t_1
(if (<= (* x y) 2e-133)
(+ (* a (* b -0.25)) c)
(if (<= (* x y) 1e+227) 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 * (t * z)) + c;
double t_2 = (x * y) + c;
double tmp;
if ((x * y) <= -2e+75) {
tmp = t_2;
} else if ((x * y) <= 4e-200) {
tmp = t_1;
} else if ((x * y) <= 2e-133) {
tmp = (a * (b * -0.25)) + c;
} else if ((x * y) <= 1e+227) {
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 * (t * z)) + c
t_2 = (x * y) + c
if ((x * y) <= (-2d+75)) then
tmp = t_2
else if ((x * y) <= 4d-200) then
tmp = t_1
else if ((x * y) <= 2d-133) then
tmp = (a * (b * (-0.25d0))) + c
else if ((x * y) <= 1d+227) 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 * (t * z)) + c;
double t_2 = (x * y) + c;
double tmp;
if ((x * y) <= -2e+75) {
tmp = t_2;
} else if ((x * y) <= 4e-200) {
tmp = t_1;
} else if ((x * y) <= 2e-133) {
tmp = (a * (b * -0.25)) + c;
} else if ((x * y) <= 1e+227) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = (0.0625 * (t * z)) + c t_2 = (x * y) + c tmp = 0 if (x * y) <= -2e+75: tmp = t_2 elif (x * y) <= 4e-200: tmp = t_1 elif (x * y) <= 2e-133: tmp = (a * (b * -0.25)) + c elif (x * y) <= 1e+227: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(0.0625 * Float64(t * z)) + c) t_2 = Float64(Float64(x * y) + c) tmp = 0.0 if (Float64(x * y) <= -2e+75) tmp = t_2; elseif (Float64(x * y) <= 4e-200) tmp = t_1; elseif (Float64(x * y) <= 2e-133) tmp = Float64(Float64(a * Float64(b * -0.25)) + c); elseif (Float64(x * y) <= 1e+227) 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 * (t * z)) + c; t_2 = (x * y) + c; tmp = 0.0; if ((x * y) <= -2e+75) tmp = t_2; elseif ((x * y) <= 4e-200) tmp = t_1; elseif ((x * y) <= 2e-133) tmp = (a * (b * -0.25)) + c; elseif ((x * y) <= 1e+227) 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[(N[(0.0625 * N[(t * z), $MachinePrecision]), $MachinePrecision] + c), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x * y), $MachinePrecision] + c), $MachinePrecision]}, If[LessEqual[N[(x * y), $MachinePrecision], -2e+75], t$95$2, If[LessEqual[N[(x * y), $MachinePrecision], 4e-200], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], 2e-133], N[(N[(a * N[(b * -0.25), $MachinePrecision]), $MachinePrecision] + c), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 1e+227], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 0.0625 \cdot \left(t \cdot z\right) + c\\
t_2 := x \cdot y + c\\
\mathbf{if}\;x \cdot y \leq -2 \cdot 10^{+75}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x \cdot y \leq 4 \cdot 10^{-200}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \cdot y \leq 2 \cdot 10^{-133}:\\
\;\;\;\;a \cdot \left(b \cdot -0.25\right) + c\\
\mathbf{elif}\;x \cdot y \leq 10^{+227}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if (*.f64 x y) < -1.99999999999999985e75 or 1.0000000000000001e227 < (*.f64 x y) Initial program 98.8%
Taylor expanded in x around inf 0
Simplified0
if -1.99999999999999985e75 < (*.f64 x y) < 3.9999999999999999e-200 or 2.0000000000000001e-133 < (*.f64 x y) < 1.0000000000000001e227Initial program 100.0%
Taylor expanded in z around inf 0
Simplified0
if 3.9999999999999999e-200 < (*.f64 x y) < 2.0000000000000001e-133Initial program 94.6%
Taylor expanded in a around inf 0
Simplified0
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* 0.0625 (* t z))))
(if (<= (* x y) -2e+75)
(* x y)
(if (<= (* x y) -1e-266)
t_1
(if (<= (* x y) 2e-133) c (if (<= (* x y) 1e+227) t_1 (* x y)))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = 0.0625 * (t * z);
double tmp;
if ((x * y) <= -2e+75) {
tmp = x * y;
} else if ((x * y) <= -1e-266) {
tmp = t_1;
} else if ((x * y) <= 2e-133) {
tmp = c;
} else if ((x * y) <= 1e+227) {
tmp = t_1;
} else {
tmp = x * y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: t_1
real(8) :: tmp
t_1 = 0.0625d0 * (t * z)
if ((x * y) <= (-2d+75)) then
tmp = x * y
else if ((x * y) <= (-1d-266)) then
tmp = t_1
else if ((x * y) <= 2d-133) then
tmp = c
else if ((x * y) <= 1d+227) then
tmp = t_1
else
tmp = x * y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = 0.0625 * (t * z);
double tmp;
if ((x * y) <= -2e+75) {
tmp = x * y;
} else if ((x * y) <= -1e-266) {
tmp = t_1;
} else if ((x * y) <= 2e-133) {
tmp = c;
} else if ((x * y) <= 1e+227) {
tmp = t_1;
} else {
tmp = x * y;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = 0.0625 * (t * z) tmp = 0 if (x * y) <= -2e+75: tmp = x * y elif (x * y) <= -1e-266: tmp = t_1 elif (x * y) <= 2e-133: tmp = c elif (x * y) <= 1e+227: tmp = t_1 else: tmp = x * y return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(0.0625 * Float64(t * z)) tmp = 0.0 if (Float64(x * y) <= -2e+75) tmp = Float64(x * y); elseif (Float64(x * y) <= -1e-266) tmp = t_1; elseif (Float64(x * y) <= 2e-133) tmp = c; elseif (Float64(x * y) <= 1e+227) tmp = t_1; else tmp = Float64(x * y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = 0.0625 * (t * z); tmp = 0.0; if ((x * y) <= -2e+75) tmp = x * y; elseif ((x * y) <= -1e-266) tmp = t_1; elseif ((x * y) <= 2e-133) tmp = c; elseif ((x * y) <= 1e+227) tmp = t_1; else tmp = x * y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(0.0625 * N[(t * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(x * y), $MachinePrecision], -2e+75], N[(x * y), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], -1e-266], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], 2e-133], c, If[LessEqual[N[(x * y), $MachinePrecision], 1e+227], t$95$1, N[(x * y), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 0.0625 \cdot \left(t \cdot z\right)\\
\mathbf{if}\;x \cdot y \leq -2 \cdot 10^{+75}:\\
\;\;\;\;x \cdot y\\
\mathbf{elif}\;x \cdot y \leq -1 \cdot 10^{-266}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \cdot y \leq 2 \cdot 10^{-133}:\\
\;\;\;\;c\\
\mathbf{elif}\;x \cdot y \leq 10^{+227}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x \cdot y\\
\end{array}
\end{array}
if (*.f64 x y) < -1.99999999999999985e75 or 1.0000000000000001e227 < (*.f64 x y) Initial program 98.8%
Taylor expanded in x around inf 0
Simplified0
if -1.99999999999999985e75 < (*.f64 x y) < -9.9999999999999998e-267 or 2.0000000000000001e-133 < (*.f64 x y) < 1.0000000000000001e227Initial program 100.0%
Taylor expanded in z around inf 0
Simplified0
if -9.9999999999999998e-267 < (*.f64 x y) < 2.0000000000000001e-133Initial program 98.5%
Taylor expanded in c around inf 0
Simplified0
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (+ (* x y) c)) (t_2 (* 0.0625 (* t z))))
(if (<= t -2.2e-8)
t_2
(if (<= t 3.8e-206)
t_1
(if (<= t 1.15e-185) (* a (* b -0.25)) (if (<= t 1.85e+59) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = (x * y) + c;
double t_2 = 0.0625 * (t * z);
double tmp;
if (t <= -2.2e-8) {
tmp = t_2;
} else if (t <= 3.8e-206) {
tmp = t_1;
} else if (t <= 1.15e-185) {
tmp = a * (b * -0.25);
} else if (t <= 1.85e+59) {
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 = (x * y) + c
t_2 = 0.0625d0 * (t * z)
if (t <= (-2.2d-8)) then
tmp = t_2
else if (t <= 3.8d-206) then
tmp = t_1
else if (t <= 1.15d-185) then
tmp = a * (b * (-0.25d0))
else if (t <= 1.85d+59) 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 = (x * y) + c;
double t_2 = 0.0625 * (t * z);
double tmp;
if (t <= -2.2e-8) {
tmp = t_2;
} else if (t <= 3.8e-206) {
tmp = t_1;
} else if (t <= 1.15e-185) {
tmp = a * (b * -0.25);
} else if (t <= 1.85e+59) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = (x * y) + c t_2 = 0.0625 * (t * z) tmp = 0 if t <= -2.2e-8: tmp = t_2 elif t <= 3.8e-206: tmp = t_1 elif t <= 1.15e-185: tmp = a * (b * -0.25) elif t <= 1.85e+59: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(x * y) + c) t_2 = Float64(0.0625 * Float64(t * z)) tmp = 0.0 if (t <= -2.2e-8) tmp = t_2; elseif (t <= 3.8e-206) tmp = t_1; elseif (t <= 1.15e-185) tmp = Float64(a * Float64(b * -0.25)); elseif (t <= 1.85e+59) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = (x * y) + c; t_2 = 0.0625 * (t * z); tmp = 0.0; if (t <= -2.2e-8) tmp = t_2; elseif (t <= 3.8e-206) tmp = t_1; elseif (t <= 1.15e-185) tmp = a * (b * -0.25); elseif (t <= 1.85e+59) 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[(N[(x * y), $MachinePrecision] + c), $MachinePrecision]}, Block[{t$95$2 = N[(0.0625 * N[(t * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.2e-8], t$95$2, If[LessEqual[t, 3.8e-206], t$95$1, If[LessEqual[t, 1.15e-185], N[(a * N[(b * -0.25), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.85e+59], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot y + c\\
t_2 := 0.0625 \cdot \left(t \cdot z\right)\\
\mathbf{if}\;t \leq -2.2 \cdot 10^{-8}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq 3.8 \cdot 10^{-206}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 1.15 \cdot 10^{-185}:\\
\;\;\;\;a \cdot \left(b \cdot -0.25\right)\\
\mathbf{elif}\;t \leq 1.85 \cdot 10^{+59}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if t < -2.1999999999999998e-8 or 1.84999999999999999e59 < t Initial program 100.0%
Taylor expanded in z around inf 0
Simplified0
if -2.1999999999999998e-8 < t < 3.80000000000000003e-206 or 1.15e-185 < t < 1.84999999999999999e59Initial program 98.6%
Taylor expanded in x around inf 0
Simplified0
if 3.80000000000000003e-206 < t < 1.15e-185Initial program 100.0%
Taylor expanded in a around inf 0
Simplified0
(FPCore (x y z t a b c)
:precision binary64
(if (<= (* a b) -4e+197)
(+ (* -0.25 (* a b)) (* x y))
(if (<= (* a b) 1e+134)
(+ (+ (* 0.0625 (* t z)) (* x y)) c)
(- (+ c (* y x)) (/ a (/ 4.0 b))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((a * b) <= -4e+197) {
tmp = (-0.25 * (a * b)) + (x * y);
} else if ((a * b) <= 1e+134) {
tmp = ((0.0625 * (t * z)) + (x * y)) + c;
} else {
tmp = (c + (y * x)) - (a / (4.0 / b));
}
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+197)) then
tmp = ((-0.25d0) * (a * b)) + (x * y)
else if ((a * b) <= 1d+134) then
tmp = ((0.0625d0 * (t * z)) + (x * y)) + c
else
tmp = (c + (y * x)) - (a / (4.0d0 / b))
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+197) {
tmp = (-0.25 * (a * b)) + (x * y);
} else if ((a * b) <= 1e+134) {
tmp = ((0.0625 * (t * z)) + (x * y)) + c;
} else {
tmp = (c + (y * x)) - (a / (4.0 / b));
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if (a * b) <= -4e+197: tmp = (-0.25 * (a * b)) + (x * y) elif (a * b) <= 1e+134: tmp = ((0.0625 * (t * z)) + (x * y)) + c else: tmp = (c + (y * x)) - (a / (4.0 / b)) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (Float64(a * b) <= -4e+197) tmp = Float64(Float64(-0.25 * Float64(a * b)) + Float64(x * y)); elseif (Float64(a * b) <= 1e+134) tmp = Float64(Float64(Float64(0.0625 * Float64(t * z)) + Float64(x * y)) + c); else tmp = Float64(Float64(c + Float64(y * x)) - Float64(a / Float64(4.0 / b))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if ((a * b) <= -4e+197) tmp = (-0.25 * (a * b)) + (x * y); elseif ((a * b) <= 1e+134) tmp = ((0.0625 * (t * z)) + (x * y)) + c; else tmp = (c + (y * x)) - (a / (4.0 / b)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[N[(a * b), $MachinePrecision], -4e+197], N[(N[(-0.25 * N[(a * b), $MachinePrecision]), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * b), $MachinePrecision], 1e+134], N[(N[(N[(0.0625 * N[(t * z), $MachinePrecision]), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision] + c), $MachinePrecision], N[(N[(c + N[(y * x), $MachinePrecision]), $MachinePrecision] - N[(a / N[(4.0 / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \cdot b \leq -4 \cdot 10^{+197}:\\
\;\;\;\;-0.25 \cdot \left(a \cdot b\right) + x \cdot y\\
\mathbf{elif}\;a \cdot b \leq 10^{+134}:\\
\;\;\;\;\left(0.0625 \cdot \left(t \cdot z\right) + x \cdot y\right) + c\\
\mathbf{else}:\\
\;\;\;\;\left(c + y \cdot x\right) - \frac{a}{\frac{4}{b}}\\
\end{array}
\end{array}
if (*.f64 a b) < -3.9999999999999998e197Initial program 100.0%
Applied egg-rr0
Taylor expanded in x around inf 0
Simplified0
Taylor expanded in c around 0 0
Simplified0
if -3.9999999999999998e197 < (*.f64 a b) < 9.99999999999999921e133Initial program 99.5%
Taylor expanded in a around 0 0
Simplified0
if 9.99999999999999921e133 < (*.f64 a b) Initial program 97.4%
Applied egg-rr0
Taylor expanded in x around inf 0
Simplified0
Applied egg-rr0
(FPCore (x y z t a b c)
:precision binary64
(if (<= (* a b) -4e+197)
(+ (* -0.25 (* a b)) (* x y))
(if (<= (* a b) 1e+134)
(+ (+ (* 0.0625 (* t z)) (* x y)) c)
(+ (- (* x y) (/ (* a b) 4.0)) c))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((a * b) <= -4e+197) {
tmp = (-0.25 * (a * b)) + (x * y);
} else if ((a * b) <= 1e+134) {
tmp = ((0.0625 * (t * z)) + (x * y)) + c;
} else {
tmp = ((x * y) - ((a * b) / 4.0)) + c;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if ((a * b) <= (-4d+197)) then
tmp = ((-0.25d0) * (a * b)) + (x * y)
else if ((a * b) <= 1d+134) then
tmp = ((0.0625d0 * (t * z)) + (x * y)) + c
else
tmp = ((x * y) - ((a * b) / 4.0d0)) + c
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((a * b) <= -4e+197) {
tmp = (-0.25 * (a * b)) + (x * y);
} else if ((a * b) <= 1e+134) {
tmp = ((0.0625 * (t * z)) + (x * y)) + c;
} else {
tmp = ((x * y) - ((a * b) / 4.0)) + c;
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if (a * b) <= -4e+197: tmp = (-0.25 * (a * b)) + (x * y) elif (a * b) <= 1e+134: tmp = ((0.0625 * (t * z)) + (x * y)) + c else: tmp = ((x * y) - ((a * b) / 4.0)) + c return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (Float64(a * b) <= -4e+197) tmp = Float64(Float64(-0.25 * Float64(a * b)) + Float64(x * y)); elseif (Float64(a * b) <= 1e+134) tmp = Float64(Float64(Float64(0.0625 * Float64(t * z)) + Float64(x * y)) + c); else tmp = Float64(Float64(Float64(x * y) - Float64(Float64(a * b) / 4.0)) + c); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if ((a * b) <= -4e+197) tmp = (-0.25 * (a * b)) + (x * y); elseif ((a * b) <= 1e+134) tmp = ((0.0625 * (t * z)) + (x * y)) + c; else tmp = ((x * y) - ((a * b) / 4.0)) + c; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[N[(a * b), $MachinePrecision], -4e+197], N[(N[(-0.25 * N[(a * b), $MachinePrecision]), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * b), $MachinePrecision], 1e+134], N[(N[(N[(0.0625 * N[(t * z), $MachinePrecision]), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision] + c), $MachinePrecision], N[(N[(N[(x * y), $MachinePrecision] - N[(N[(a * b), $MachinePrecision] / 4.0), $MachinePrecision]), $MachinePrecision] + c), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \cdot b \leq -4 \cdot 10^{+197}:\\
\;\;\;\;-0.25 \cdot \left(a \cdot b\right) + x \cdot y\\
\mathbf{elif}\;a \cdot b \leq 10^{+134}:\\
\;\;\;\;\left(0.0625 \cdot \left(t \cdot z\right) + x \cdot y\right) + c\\
\mathbf{else}:\\
\;\;\;\;\left(x \cdot y - \frac{a \cdot b}{4}\right) + c\\
\end{array}
\end{array}
if (*.f64 a b) < -3.9999999999999998e197Initial program 100.0%
Applied egg-rr0
Taylor expanded in x around inf 0
Simplified0
Taylor expanded in c around 0 0
Simplified0
if -3.9999999999999998e197 < (*.f64 a b) < 9.99999999999999921e133Initial program 99.5%
Taylor expanded in a around 0 0
Simplified0
if 9.99999999999999921e133 < (*.f64 a b) Initial program 97.4%
Taylor expanded in x around inf 0
Simplified0
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (+ (* -0.25 (* a b)) (* x y))))
(if (<= (* a b) -4e+197)
t_1
(if (<= (* a b) 1e+134) (+ (+ (* 0.0625 (* t z)) (* x y)) c) t_1))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = (-0.25 * (a * b)) + (x * y);
double tmp;
if ((a * b) <= -4e+197) {
tmp = t_1;
} else if ((a * b) <= 1e+134) {
tmp = ((0.0625 * (t * z)) + (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 = ((-0.25d0) * (a * b)) + (x * y)
if ((a * b) <= (-4d+197)) then
tmp = t_1
else if ((a * b) <= 1d+134) then
tmp = ((0.0625d0 * (t * z)) + (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 = (-0.25 * (a * b)) + (x * y);
double tmp;
if ((a * b) <= -4e+197) {
tmp = t_1;
} else if ((a * b) <= 1e+134) {
tmp = ((0.0625 * (t * z)) + (x * y)) + c;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = (-0.25 * (a * b)) + (x * y) tmp = 0 if (a * b) <= -4e+197: tmp = t_1 elif (a * b) <= 1e+134: tmp = ((0.0625 * (t * z)) + (x * y)) + c else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(-0.25 * Float64(a * b)) + Float64(x * y)) tmp = 0.0 if (Float64(a * b) <= -4e+197) tmp = t_1; elseif (Float64(a * b) <= 1e+134) tmp = Float64(Float64(Float64(0.0625 * Float64(t * z)) + 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 = (-0.25 * (a * b)) + (x * y); tmp = 0.0; if ((a * b) <= -4e+197) tmp = t_1; elseif ((a * b) <= 1e+134) tmp = ((0.0625 * (t * z)) + (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[(-0.25 * N[(a * b), $MachinePrecision]), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(a * b), $MachinePrecision], -4e+197], t$95$1, If[LessEqual[N[(a * b), $MachinePrecision], 1e+134], N[(N[(N[(0.0625 * N[(t * z), $MachinePrecision]), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision] + c), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := -0.25 \cdot \left(a \cdot b\right) + x \cdot y\\
\mathbf{if}\;a \cdot b \leq -4 \cdot 10^{+197}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \cdot b \leq 10^{+134}:\\
\;\;\;\;\left(0.0625 \cdot \left(t \cdot z\right) + x \cdot y\right) + c\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (*.f64 a b) < -3.9999999999999998e197 or 9.99999999999999921e133 < (*.f64 a b) Initial program 98.4%
Applied egg-rr0
Taylor expanded in x around inf 0
Simplified0
Taylor expanded in c around 0 0
Simplified0
if -3.9999999999999998e197 < (*.f64 a b) < 9.99999999999999921e133Initial program 99.5%
Taylor expanded in a around 0 0
Simplified0
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* 0.0625 (* t z))) (t_2 (+ t_1 (* x y))))
(if (<= y -7.5e-101)
t_2
(if (<= y 6e-235)
(+ (* a (* b -0.25)) c)
(if (<= y 3.7e+101) (+ t_1 c) t_2)))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = 0.0625 * (t * z);
double t_2 = t_1 + (x * y);
double tmp;
if (y <= -7.5e-101) {
tmp = t_2;
} else if (y <= 6e-235) {
tmp = (a * (b * -0.25)) + c;
} else if (y <= 3.7e+101) {
tmp = t_1 + c;
} 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 * (t * z)
t_2 = t_1 + (x * y)
if (y <= (-7.5d-101)) then
tmp = t_2
else if (y <= 6d-235) then
tmp = (a * (b * (-0.25d0))) + c
else if (y <= 3.7d+101) then
tmp = t_1 + c
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 * (t * z);
double t_2 = t_1 + (x * y);
double tmp;
if (y <= -7.5e-101) {
tmp = t_2;
} else if (y <= 6e-235) {
tmp = (a * (b * -0.25)) + c;
} else if (y <= 3.7e+101) {
tmp = t_1 + c;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = 0.0625 * (t * z) t_2 = t_1 + (x * y) tmp = 0 if y <= -7.5e-101: tmp = t_2 elif y <= 6e-235: tmp = (a * (b * -0.25)) + c elif y <= 3.7e+101: tmp = t_1 + c else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(0.0625 * Float64(t * z)) t_2 = Float64(t_1 + Float64(x * y)) tmp = 0.0 if (y <= -7.5e-101) tmp = t_2; elseif (y <= 6e-235) tmp = Float64(Float64(a * Float64(b * -0.25)) + c); elseif (y <= 3.7e+101) tmp = Float64(t_1 + c); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = 0.0625 * (t * z); t_2 = t_1 + (x * y); tmp = 0.0; if (y <= -7.5e-101) tmp = t_2; elseif (y <= 6e-235) tmp = (a * (b * -0.25)) + c; elseif (y <= 3.7e+101) tmp = t_1 + c; 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[(t * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 + N[(x * y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -7.5e-101], t$95$2, If[LessEqual[y, 6e-235], N[(N[(a * N[(b * -0.25), $MachinePrecision]), $MachinePrecision] + c), $MachinePrecision], If[LessEqual[y, 3.7e+101], N[(t$95$1 + c), $MachinePrecision], t$95$2]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 0.0625 \cdot \left(t \cdot z\right)\\
t_2 := t\_1 + x \cdot y\\
\mathbf{if}\;y \leq -7.5 \cdot 10^{-101}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq 6 \cdot 10^{-235}:\\
\;\;\;\;a \cdot \left(b \cdot -0.25\right) + c\\
\mathbf{elif}\;y \leq 3.7 \cdot 10^{+101}:\\
\;\;\;\;t\_1 + c\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if y < -7.5000000000000001e-101 or 3.6999999999999997e101 < y Initial program 99.3%
Taylor expanded in a around 0 0
Simplified0
Taylor expanded in c around 0 0
Simplified0
if -7.5000000000000001e-101 < y < 5.9999999999999997e-235Initial program 100.0%
Taylor expanded in a around inf 0
Simplified0
if 5.9999999999999997e-235 < y < 3.6999999999999997e101Initial program 98.6%
Taylor expanded in z around inf 0
Simplified0
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (+ (* x y) c)))
(if (<= (* x y) -2e+75)
t_1
(if (<= (* x y) 1e+227) (+ (* 0.0625 (* t z)) c) 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 * y) <= -2e+75) {
tmp = t_1;
} else if ((x * y) <= 1e+227) {
tmp = (0.0625 * (t * z)) + 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) + c
if ((x * y) <= (-2d+75)) then
tmp = t_1
else if ((x * y) <= 1d+227) then
tmp = (0.0625d0 * (t * z)) + 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) + c;
double tmp;
if ((x * y) <= -2e+75) {
tmp = t_1;
} else if ((x * y) <= 1e+227) {
tmp = (0.0625 * (t * z)) + c;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = (x * y) + c tmp = 0 if (x * y) <= -2e+75: tmp = t_1 elif (x * y) <= 1e+227: tmp = (0.0625 * (t * z)) + c 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 (Float64(x * y) <= -2e+75) tmp = t_1; elseif (Float64(x * y) <= 1e+227) tmp = Float64(Float64(0.0625 * Float64(t * z)) + c); 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 * y) <= -2e+75) tmp = t_1; elseif ((x * y) <= 1e+227) tmp = (0.0625 * (t * z)) + 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] + c), $MachinePrecision]}, If[LessEqual[N[(x * y), $MachinePrecision], -2e+75], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], 1e+227], N[(N[(0.0625 * N[(t * z), $MachinePrecision]), $MachinePrecision] + c), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot y + c\\
\mathbf{if}\;x \cdot y \leq -2 \cdot 10^{+75}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \cdot y \leq 10^{+227}:\\
\;\;\;\;0.0625 \cdot \left(t \cdot z\right) + c\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (*.f64 x y) < -1.99999999999999985e75 or 1.0000000000000001e227 < (*.f64 x y) Initial program 98.8%
Taylor expanded in x around inf 0
Simplified0
if -1.99999999999999985e75 < (*.f64 x y) < 1.0000000000000001e227Initial program 99.5%
Taylor expanded in z around inf 0
Simplified0
(FPCore (x y z t a b c) :precision binary64 (if (<= (* x y) -2.1e+65) (* x y) (if (<= (* x y) 2.15e+70) 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.1e+65) {
tmp = x * y;
} else if ((x * y) <= 2.15e+70) {
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.1d+65)) then
tmp = x * y
else if ((x * y) <= 2.15d+70) 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.1e+65) {
tmp = x * y;
} else if ((x * y) <= 2.15e+70) {
tmp = c;
} else {
tmp = x * y;
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if (x * y) <= -2.1e+65: tmp = x * y elif (x * y) <= 2.15e+70: 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.1e+65) tmp = Float64(x * y); elseif (Float64(x * y) <= 2.15e+70) 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.1e+65) tmp = x * y; elseif ((x * y) <= 2.15e+70) 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.1e+65], N[(x * y), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 2.15e+70], c, N[(x * y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \cdot y \leq -2.1 \cdot 10^{+65}:\\
\;\;\;\;x \cdot y\\
\mathbf{elif}\;x \cdot y \leq 2.15 \cdot 10^{+70}:\\
\;\;\;\;c\\
\mathbf{else}:\\
\;\;\;\;x \cdot y\\
\end{array}
\end{array}
if (*.f64 x y) < -2.09999999999999991e65 or 2.15e70 < (*.f64 x y) Initial program 99.0%
Taylor expanded in x around inf 0
Simplified0
if -2.09999999999999991e65 < (*.f64 x y) < 2.15e70Initial program 99.4%
Taylor expanded in c around inf 0
Simplified0
(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 99.3%
(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 99.3%
Taylor expanded in c around inf 0
Simplified0
herbie shell --seed 2024110
(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))