
(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 (if (<= (- (+ (* x y) (/ (* z t) 16.0)) (/ (* a b) 4.0)) INFINITY) (+ c (- (fma x y (* z (/ t 16.0))) (* a (/ b 4.0)))) (+ c (* z (+ (* t 0.0625) (/ (* x y) z))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((((x * y) + ((z * t) / 16.0)) - ((a * b) / 4.0)) <= ((double) INFINITY)) {
tmp = c + (fma(x, y, (z * (t / 16.0))) - (a * (b / 4.0)));
} else {
tmp = c + (z * ((t * 0.0625) + ((x * y) / z)));
}
return tmp;
}
function code(x, y, z, t, a, b, c) tmp = 0.0 if (Float64(Float64(Float64(x * y) + Float64(Float64(z * t) / 16.0)) - Float64(Float64(a * b) / 4.0)) <= Inf) tmp = Float64(c + Float64(fma(x, y, Float64(z * Float64(t / 16.0))) - Float64(a * Float64(b / 4.0)))); else tmp = Float64(c + Float64(z * Float64(Float64(t * 0.0625) + Float64(Float64(x * y) / z)))); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[N[(N[(N[(x * y), $MachinePrecision] + N[(N[(z * t), $MachinePrecision] / 16.0), $MachinePrecision]), $MachinePrecision] - N[(N[(a * b), $MachinePrecision] / 4.0), $MachinePrecision]), $MachinePrecision], Infinity], N[(c + N[(N[(x * y + N[(z * N[(t / 16.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * N[(b / 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(c + N[(z * N[(N[(t * 0.0625), $MachinePrecision] + N[(N[(x * y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\left(x \cdot y + \frac{z \cdot t}{16}\right) - \frac{a \cdot b}{4} \leq \infty:\\
\;\;\;\;c + \left(\mathsf{fma}\left(x, y, z \cdot \frac{t}{16}\right) - a \cdot \frac{b}{4}\right)\\
\mathbf{else}:\\
\;\;\;\;c + z \cdot \left(t \cdot 0.0625 + \frac{x \cdot y}{z}\right)\\
\end{array}
\end{array}
if (-.f64 (+.f64 (*.f64 x y) (/.f64 (*.f64 z t) #s(literal 16 binary64))) (/.f64 (*.f64 a b) #s(literal 4 binary64))) < +inf.0Initial program 100.0%
associate-+l-100.0%
+-commutative100.0%
*-commutative100.0%
+-commutative100.0%
associate-+l-100.0%
fma-define100.0%
*-commutative100.0%
associate-/l*100.0%
associate-/l*100.0%
Simplified100.0%
if +inf.0 < (-.f64 (+.f64 (*.f64 x y) (/.f64 (*.f64 z t) #s(literal 16 binary64))) (/.f64 (*.f64 a b) #s(literal 4 binary64))) Initial program 0.0%
associate--l+0.0%
fma-define11.1%
associate-/l*11.1%
fmm-def33.3%
distribute-neg-frac233.3%
metadata-eval33.3%
Simplified33.3%
Taylor expanded in a around 0 33.3%
Taylor expanded in z around inf 66.7%
Final simplification98.8%
(FPCore (x y z t a b c) :precision binary64 (+ (fma x y (fma z (/ t 16.0) (/ (* a b) -4.0))) c))
double code(double x, double y, double z, double t, double a, double b, double c) {
return fma(x, y, fma(z, (t / 16.0), ((a * b) / -4.0))) + c;
}
function code(x, y, z, t, a, b, c) return Float64(fma(x, y, fma(z, Float64(t / 16.0), Float64(Float64(a * b) / -4.0))) + c) end
code[x_, y_, z_, t_, a_, b_, c_] := N[(N[(x * y + N[(z * N[(t / 16.0), $MachinePrecision] + N[(N[(a * b), $MachinePrecision] / -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + c), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(x, y, \mathsf{fma}\left(z, \frac{t}{16}, \frac{a \cdot b}{-4}\right)\right) + c
\end{array}
Initial program 96.5%
associate--l+96.5%
fma-define96.9%
associate-/l*96.9%
fmm-def97.7%
distribute-neg-frac297.7%
metadata-eval97.7%
Simplified97.7%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (- (+ (* x y) (/ (* z t) 16.0)) (/ (* a b) 4.0))))
(if (<= t_1 INFINITY)
(+ c t_1)
(+ c (* z (+ (* t 0.0625) (/ (* x y) z)))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = ((x * y) + ((z * t) / 16.0)) - ((a * b) / 4.0);
double tmp;
if (t_1 <= ((double) INFINITY)) {
tmp = c + t_1;
} else {
tmp = c + (z * ((t * 0.0625) + ((x * y) / z)));
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = ((x * y) + ((z * t) / 16.0)) - ((a * b) / 4.0);
double tmp;
if (t_1 <= Double.POSITIVE_INFINITY) {
tmp = c + t_1;
} else {
tmp = c + (z * ((t * 0.0625) + ((x * y) / z)));
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = ((x * y) + ((z * t) / 16.0)) - ((a * b) / 4.0) tmp = 0 if t_1 <= math.inf: tmp = c + t_1 else: tmp = c + (z * ((t * 0.0625) + ((x * y) / z))) return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(Float64(x * y) + Float64(Float64(z * t) / 16.0)) - Float64(Float64(a * b) / 4.0)) tmp = 0.0 if (t_1 <= Inf) tmp = Float64(c + t_1); else tmp = Float64(c + Float64(z * Float64(Float64(t * 0.0625) + Float64(Float64(x * y) / z)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = ((x * y) + ((z * t) / 16.0)) - ((a * b) / 4.0); tmp = 0.0; if (t_1 <= Inf) tmp = c + t_1; else tmp = c + (z * ((t * 0.0625) + ((x * y) / z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(N[(x * y), $MachinePrecision] + N[(N[(z * t), $MachinePrecision] / 16.0), $MachinePrecision]), $MachinePrecision] - N[(N[(a * b), $MachinePrecision] / 4.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, Infinity], N[(c + t$95$1), $MachinePrecision], N[(c + N[(z * N[(N[(t * 0.0625), $MachinePrecision] + N[(N[(x * y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(x \cdot y + \frac{z \cdot t}{16}\right) - \frac{a \cdot b}{4}\\
\mathbf{if}\;t\_1 \leq \infty:\\
\;\;\;\;c + t\_1\\
\mathbf{else}:\\
\;\;\;\;c + z \cdot \left(t \cdot 0.0625 + \frac{x \cdot y}{z}\right)\\
\end{array}
\end{array}
if (-.f64 (+.f64 (*.f64 x y) (/.f64 (*.f64 z t) #s(literal 16 binary64))) (/.f64 (*.f64 a b) #s(literal 4 binary64))) < +inf.0Initial program 100.0%
if +inf.0 < (-.f64 (+.f64 (*.f64 x y) (/.f64 (*.f64 z t) #s(literal 16 binary64))) (/.f64 (*.f64 a b) #s(literal 4 binary64))) Initial program 0.0%
associate--l+0.0%
fma-define11.1%
associate-/l*11.1%
fmm-def33.3%
distribute-neg-frac233.3%
metadata-eval33.3%
Simplified33.3%
Taylor expanded in a around 0 33.3%
Taylor expanded in z around inf 66.7%
Final simplification98.8%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* t (* z 0.0625))))
(if (<= (* x y) -1e+252)
(* x y)
(if (<= (* x y) 0.0)
t_1
(if (<= (* x y) 2.55e-143) c (if (<= (* x y) 2.8e+123) t_1 (* x y)))))))
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 ((x * y) <= -1e+252) {
tmp = x * y;
} else if ((x * y) <= 0.0) {
tmp = t_1;
} else if ((x * y) <= 2.55e-143) {
tmp = c;
} else if ((x * y) <= 2.8e+123) {
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 = t * (z * 0.0625d0)
if ((x * y) <= (-1d+252)) then
tmp = x * y
else if ((x * y) <= 0.0d0) then
tmp = t_1
else if ((x * y) <= 2.55d-143) then
tmp = c
else if ((x * y) <= 2.8d+123) 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 = t * (z * 0.0625);
double tmp;
if ((x * y) <= -1e+252) {
tmp = x * y;
} else if ((x * y) <= 0.0) {
tmp = t_1;
} else if ((x * y) <= 2.55e-143) {
tmp = c;
} else if ((x * y) <= 2.8e+123) {
tmp = t_1;
} else {
tmp = x * y;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = t * (z * 0.0625) tmp = 0 if (x * y) <= -1e+252: tmp = x * y elif (x * y) <= 0.0: tmp = t_1 elif (x * y) <= 2.55e-143: tmp = c elif (x * y) <= 2.8e+123: tmp = t_1 else: tmp = x * y return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(t * Float64(z * 0.0625)) tmp = 0.0 if (Float64(x * y) <= -1e+252) tmp = Float64(x * y); elseif (Float64(x * y) <= 0.0) tmp = t_1; elseif (Float64(x * y) <= 2.55e-143) tmp = c; elseif (Float64(x * y) <= 2.8e+123) 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 = t * (z * 0.0625); tmp = 0.0; if ((x * y) <= -1e+252) tmp = x * y; elseif ((x * y) <= 0.0) tmp = t_1; elseif ((x * y) <= 2.55e-143) tmp = c; elseif ((x * y) <= 2.8e+123) 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[(t * N[(z * 0.0625), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(x * y), $MachinePrecision], -1e+252], N[(x * y), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 0.0], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], 2.55e-143], c, If[LessEqual[N[(x * y), $MachinePrecision], 2.8e+123], t$95$1, N[(x * y), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \left(z \cdot 0.0625\right)\\
\mathbf{if}\;x \cdot y \leq -1 \cdot 10^{+252}:\\
\;\;\;\;x \cdot y\\
\mathbf{elif}\;x \cdot y \leq 0:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \cdot y \leq 2.55 \cdot 10^{-143}:\\
\;\;\;\;c\\
\mathbf{elif}\;x \cdot y \leq 2.8 \cdot 10^{+123}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x \cdot y\\
\end{array}
\end{array}
if (*.f64 x y) < -1.0000000000000001e252 or 2.80000000000000011e123 < (*.f64 x y) Initial program 88.5%
associate--l+88.5%
fma-define90.2%
associate-/l*90.2%
fmm-def90.2%
distribute-neg-frac290.2%
metadata-eval90.2%
Simplified90.2%
Taylor expanded in a around 0 87.5%
Taylor expanded in t around 0 83.4%
Taylor expanded in c around 0 80.4%
if -1.0000000000000001e252 < (*.f64 x y) < -0.0 or 2.5500000000000002e-143 < (*.f64 x y) < 2.80000000000000011e123Initial program 98.8%
associate--l+98.8%
fma-define98.8%
associate-/l*98.8%
fmm-def100.0%
distribute-neg-frac2100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in a around 0 68.3%
Taylor expanded in t around inf 56.7%
Taylor expanded in c around 0 39.9%
associate-*r*39.9%
*-commutative39.9%
associate-*r*39.9%
Simplified39.9%
if -0.0 < (*.f64 x y) < 2.5500000000000002e-143Initial program 100.0%
associate--l+100.0%
fma-define100.0%
associate-/l*100.0%
fmm-def100.0%
distribute-neg-frac2100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in c around inf 53.7%
Final simplification50.8%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (+ c (* x y))))
(if (<= (* x y) -1.95e+208)
t_1
(if (<= (* x y) -5.8e-239)
(+ c (* 0.0625 (* z t)))
(if (<= (* x y) 1.4e+52) (+ c (* a (* b -0.25))) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = c + (x * y);
double tmp;
if ((x * y) <= -1.95e+208) {
tmp = t_1;
} else if ((x * y) <= -5.8e-239) {
tmp = c + (0.0625 * (z * t));
} else if ((x * y) <= 1.4e+52) {
tmp = c + (a * (b * -0.25));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: t_1
real(8) :: tmp
t_1 = c + (x * y)
if ((x * y) <= (-1.95d+208)) then
tmp = t_1
else if ((x * y) <= (-5.8d-239)) then
tmp = c + (0.0625d0 * (z * t))
else if ((x * y) <= 1.4d+52) then
tmp = c + (a * (b * (-0.25d0)))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = c + (x * y);
double tmp;
if ((x * y) <= -1.95e+208) {
tmp = t_1;
} else if ((x * y) <= -5.8e-239) {
tmp = c + (0.0625 * (z * t));
} else if ((x * y) <= 1.4e+52) {
tmp = c + (a * (b * -0.25));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = c + (x * y) tmp = 0 if (x * y) <= -1.95e+208: tmp = t_1 elif (x * y) <= -5.8e-239: tmp = c + (0.0625 * (z * t)) elif (x * y) <= 1.4e+52: tmp = c + (a * (b * -0.25)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(c + Float64(x * y)) tmp = 0.0 if (Float64(x * y) <= -1.95e+208) tmp = t_1; elseif (Float64(x * y) <= -5.8e-239) tmp = Float64(c + Float64(0.0625 * Float64(z * t))); elseif (Float64(x * y) <= 1.4e+52) tmp = Float64(c + Float64(a * Float64(b * -0.25))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = c + (x * y); tmp = 0.0; if ((x * y) <= -1.95e+208) tmp = t_1; elseif ((x * y) <= -5.8e-239) tmp = c + (0.0625 * (z * t)); elseif ((x * y) <= 1.4e+52) tmp = c + (a * (b * -0.25)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(c + N[(x * y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(x * y), $MachinePrecision], -1.95e+208], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], -5.8e-239], N[(c + N[(0.0625 * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 1.4e+52], N[(c + N[(a * N[(b * -0.25), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := c + x \cdot y\\
\mathbf{if}\;x \cdot y \leq -1.95 \cdot 10^{+208}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \cdot y \leq -5.8 \cdot 10^{-239}:\\
\;\;\;\;c + 0.0625 \cdot \left(z \cdot t\right)\\
\mathbf{elif}\;x \cdot y \leq 1.4 \cdot 10^{+52}:\\
\;\;\;\;c + a \cdot \left(b \cdot -0.25\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (*.f64 x y) < -1.95e208 or 1.4e52 < (*.f64 x y) Initial program 91.5%
associate--l+91.5%
fma-define92.7%
associate-/l*92.7%
fmm-def92.7%
distribute-neg-frac292.7%
metadata-eval92.7%
Simplified92.7%
Taylor expanded in a around 0 88.4%
Taylor expanded in t around 0 76.3%
if -1.95e208 < (*.f64 x y) < -5.8000000000000004e-239Initial program 98.4%
associate--l+98.4%
fma-define98.4%
associate-/l*98.4%
fmm-def100.0%
distribute-neg-frac2100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in a around 0 72.2%
Taylor expanded in t around inf 58.8%
if -5.8000000000000004e-239 < (*.f64 x y) < 1.4e52Initial program 99.1%
associate--l+99.1%
fma-define99.1%
associate-/l*99.1%
fmm-def100.0%
distribute-neg-frac2100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in a around inf 65.3%
*-commutative65.3%
associate-*r*65.3%
Simplified65.3%
Final simplification67.1%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* 0.0625 (* z t))))
(if (or (<= (* x y) -1.58e+156) (not (<= (* x y) 9e+52)))
(+ c (+ (* x y) t_1))
(+ c (- t_1 (* (* a b) 0.25))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = 0.0625 * (z * t);
double tmp;
if (((x * y) <= -1.58e+156) || !((x * y) <= 9e+52)) {
tmp = c + ((x * y) + t_1);
} else {
tmp = c + (t_1 - ((a * b) * 0.25));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: t_1
real(8) :: tmp
t_1 = 0.0625d0 * (z * t)
if (((x * y) <= (-1.58d+156)) .or. (.not. ((x * y) <= 9d+52))) then
tmp = c + ((x * y) + t_1)
else
tmp = c + (t_1 - ((a * b) * 0.25d0))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = 0.0625 * (z * t);
double tmp;
if (((x * y) <= -1.58e+156) || !((x * y) <= 9e+52)) {
tmp = c + ((x * y) + t_1);
} else {
tmp = c + (t_1 - ((a * b) * 0.25));
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = 0.0625 * (z * t) tmp = 0 if ((x * y) <= -1.58e+156) or not ((x * y) <= 9e+52): tmp = c + ((x * y) + t_1) else: tmp = c + (t_1 - ((a * b) * 0.25)) return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(0.0625 * Float64(z * t)) tmp = 0.0 if ((Float64(x * y) <= -1.58e+156) || !(Float64(x * y) <= 9e+52)) tmp = Float64(c + Float64(Float64(x * y) + t_1)); else tmp = Float64(c + Float64(t_1 - Float64(Float64(a * b) * 0.25))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = 0.0625 * (z * t); tmp = 0.0; if (((x * y) <= -1.58e+156) || ~(((x * y) <= 9e+52))) tmp = c + ((x * y) + t_1); else tmp = c + (t_1 - ((a * b) * 0.25)); 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]}, If[Or[LessEqual[N[(x * y), $MachinePrecision], -1.58e+156], N[Not[LessEqual[N[(x * y), $MachinePrecision], 9e+52]], $MachinePrecision]], N[(c + N[(N[(x * y), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision], N[(c + N[(t$95$1 - N[(N[(a * b), $MachinePrecision] * 0.25), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 0.0625 \cdot \left(z \cdot t\right)\\
\mathbf{if}\;x \cdot y \leq -1.58 \cdot 10^{+156} \lor \neg \left(x \cdot y \leq 9 \cdot 10^{+52}\right):\\
\;\;\;\;c + \left(x \cdot y + t\_1\right)\\
\mathbf{else}:\\
\;\;\;\;c + \left(t\_1 - \left(a \cdot b\right) \cdot 0.25\right)\\
\end{array}
\end{array}
if (*.f64 x y) < -1.57999999999999997e156 or 8.9999999999999999e52 < (*.f64 x y) Initial program 90.7%
associate--l+90.7%
fma-define91.9%
associate-/l*91.9%
fmm-def93.0%
distribute-neg-frac293.0%
metadata-eval93.0%
Simplified93.0%
Taylor expanded in a around 0 87.8%
if -1.57999999999999997e156 < (*.f64 x y) < 8.9999999999999999e52Initial program 99.4%
Taylor expanded in x around 0 92.9%
Final simplification91.2%
(FPCore (x y z t a b c) :precision binary64 (if (or (<= b -4.2e-109) (not (<= b 1.2e+32))) (+ c (* a (* b -0.25))) (+ c (+ (* x y) (* 0.0625 (* z t))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((b <= -4.2e-109) || !(b <= 1.2e+32)) {
tmp = c + (a * (b * -0.25));
} else {
tmp = c + ((x * y) + (0.0625 * (z * t)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if ((b <= (-4.2d-109)) .or. (.not. (b <= 1.2d+32))) then
tmp = c + (a * (b * (-0.25d0)))
else
tmp = c + ((x * y) + (0.0625d0 * (z * t)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((b <= -4.2e-109) || !(b <= 1.2e+32)) {
tmp = c + (a * (b * -0.25));
} else {
tmp = c + ((x * y) + (0.0625 * (z * t)));
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if (b <= -4.2e-109) or not (b <= 1.2e+32): tmp = c + (a * (b * -0.25)) else: tmp = c + ((x * y) + (0.0625 * (z * t))) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if ((b <= -4.2e-109) || !(b <= 1.2e+32)) tmp = Float64(c + Float64(a * Float64(b * -0.25))); else tmp = Float64(c + Float64(Float64(x * y) + Float64(0.0625 * Float64(z * t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if ((b <= -4.2e-109) || ~((b <= 1.2e+32))) tmp = c + (a * (b * -0.25)); else tmp = c + ((x * y) + (0.0625 * (z * t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[b, -4.2e-109], N[Not[LessEqual[b, 1.2e+32]], $MachinePrecision]], N[(c + N[(a * N[(b * -0.25), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(c + N[(N[(x * y), $MachinePrecision] + N[(0.0625 * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -4.2 \cdot 10^{-109} \lor \neg \left(b \leq 1.2 \cdot 10^{+32}\right):\\
\;\;\;\;c + a \cdot \left(b \cdot -0.25\right)\\
\mathbf{else}:\\
\;\;\;\;c + \left(x \cdot y + 0.0625 \cdot \left(z \cdot t\right)\right)\\
\end{array}
\end{array}
if b < -4.19999999999999992e-109 or 1.19999999999999996e32 < b Initial program 94.1%
associate--l+94.1%
fma-define94.8%
associate-/l*94.8%
fmm-def96.3%
distribute-neg-frac296.3%
metadata-eval96.3%
Simplified96.3%
Taylor expanded in a around inf 58.1%
*-commutative58.1%
associate-*r*58.1%
Simplified58.1%
if -4.19999999999999992e-109 < b < 1.19999999999999996e32Initial program 99.1%
associate--l+99.1%
fma-define99.2%
associate-/l*99.2%
fmm-def99.2%
distribute-neg-frac299.2%
metadata-eval99.2%
Simplified99.2%
Taylor expanded in a around 0 93.5%
Final simplification74.8%
(FPCore (x y z t a b c) :precision binary64 (if (or (<= (* x y) -2.05e+208) (not (<= (* x y) 5.5e+122))) (+ c (* x y)) (+ c (* 0.0625 (* z t)))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (((x * y) <= -2.05e+208) || !((x * y) <= 5.5e+122)) {
tmp = c + (x * y);
} else {
tmp = c + (0.0625 * (z * t));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if (((x * y) <= (-2.05d+208)) .or. (.not. ((x * y) <= 5.5d+122))) then
tmp = c + (x * y)
else
tmp = c + (0.0625d0 * (z * t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (((x * y) <= -2.05e+208) || !((x * y) <= 5.5e+122)) {
tmp = c + (x * y);
} else {
tmp = c + (0.0625 * (z * t));
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if ((x * y) <= -2.05e+208) or not ((x * y) <= 5.5e+122): tmp = c + (x * y) else: tmp = c + (0.0625 * (z * t)) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if ((Float64(x * y) <= -2.05e+208) || !(Float64(x * y) <= 5.5e+122)) tmp = Float64(c + Float64(x * y)); else tmp = Float64(c + Float64(0.0625 * Float64(z * t))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (((x * y) <= -2.05e+208) || ~(((x * y) <= 5.5e+122))) tmp = c + (x * y); else tmp = c + (0.0625 * (z * t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[N[(x * y), $MachinePrecision], -2.05e+208], N[Not[LessEqual[N[(x * y), $MachinePrecision], 5.5e+122]], $MachinePrecision]], N[(c + N[(x * y), $MachinePrecision]), $MachinePrecision], N[(c + N[(0.0625 * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \cdot y \leq -2.05 \cdot 10^{+208} \lor \neg \left(x \cdot y \leq 5.5 \cdot 10^{+122}\right):\\
\;\;\;\;c + x \cdot y\\
\mathbf{else}:\\
\;\;\;\;c + 0.0625 \cdot \left(z \cdot t\right)\\
\end{array}
\end{array}
if (*.f64 x y) < -2.0499999999999999e208 or 5.4999999999999998e122 < (*.f64 x y) Initial program 90.3%
associate--l+90.3%
fma-define91.7%
associate-/l*91.7%
fmm-def91.7%
distribute-neg-frac291.7%
metadata-eval91.7%
Simplified91.7%
Taylor expanded in a around 0 89.4%
Taylor expanded in t around 0 80.6%
if -2.0499999999999999e208 < (*.f64 x y) < 5.4999999999999998e122Initial program 98.9%
associate--l+98.9%
fma-define98.9%
associate-/l*98.9%
fmm-def100.0%
distribute-neg-frac2100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in a around 0 66.5%
Taylor expanded in t around inf 57.9%
Final simplification64.3%
(FPCore (x y z t a b c)
:precision binary64
(if (<= b -4.2e-109)
(+ c (* a (* b -0.25)))
(if (<= b 4e+15)
(+ c (+ (* x y) (* 0.0625 (* z t))))
(+ c (- (* x y) (* a (/ b 4.0)))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (b <= -4.2e-109) {
tmp = c + (a * (b * -0.25));
} else if (b <= 4e+15) {
tmp = c + ((x * y) + (0.0625 * (z * t)));
} else {
tmp = c + ((x * y) - (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 (b <= (-4.2d-109)) then
tmp = c + (a * (b * (-0.25d0)))
else if (b <= 4d+15) then
tmp = c + ((x * y) + (0.0625d0 * (z * t)))
else
tmp = c + ((x * y) - (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 (b <= -4.2e-109) {
tmp = c + (a * (b * -0.25));
} else if (b <= 4e+15) {
tmp = c + ((x * y) + (0.0625 * (z * t)));
} else {
tmp = c + ((x * y) - (a * (b / 4.0)));
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if b <= -4.2e-109: tmp = c + (a * (b * -0.25)) elif b <= 4e+15: tmp = c + ((x * y) + (0.0625 * (z * t))) else: tmp = c + ((x * y) - (a * (b / 4.0))) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (b <= -4.2e-109) tmp = Float64(c + Float64(a * Float64(b * -0.25))); elseif (b <= 4e+15) tmp = Float64(c + Float64(Float64(x * y) + Float64(0.0625 * Float64(z * t)))); else tmp = Float64(c + Float64(Float64(x * y) - Float64(a * Float64(b / 4.0)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (b <= -4.2e-109) tmp = c + (a * (b * -0.25)); elseif (b <= 4e+15) tmp = c + ((x * y) + (0.0625 * (z * t))); else tmp = c + ((x * y) - (a * (b / 4.0))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[b, -4.2e-109], N[(c + N[(a * N[(b * -0.25), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 4e+15], 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[(a * N[(b / 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -4.2 \cdot 10^{-109}:\\
\;\;\;\;c + a \cdot \left(b \cdot -0.25\right)\\
\mathbf{elif}\;b \leq 4 \cdot 10^{+15}:\\
\;\;\;\;c + \left(x \cdot y + 0.0625 \cdot \left(z \cdot t\right)\right)\\
\mathbf{else}:\\
\;\;\;\;c + \left(x \cdot y - a \cdot \frac{b}{4}\right)\\
\end{array}
\end{array}
if b < -4.19999999999999992e-109Initial program 92.3%
associate--l+92.3%
fma-define93.6%
associate-/l*93.6%
fmm-def96.1%
distribute-neg-frac296.1%
metadata-eval96.1%
Simplified96.1%
Taylor expanded in a around inf 50.8%
*-commutative50.8%
associate-*r*50.8%
Simplified50.8%
if -4.19999999999999992e-109 < b < 4e15Initial program 99.1%
associate--l+99.1%
fma-define99.1%
associate-/l*99.1%
fmm-def99.1%
distribute-neg-frac299.1%
metadata-eval99.1%
Simplified99.1%
Taylor expanded in a around 0 93.7%
if 4e15 < b Initial program 96.8%
associate-+l-96.8%
+-commutative96.8%
*-commutative96.8%
+-commutative96.8%
associate-+l-96.8%
fma-define96.8%
*-commutative96.8%
associate-/l*96.8%
associate-/l*96.8%
Simplified96.8%
Taylor expanded in x around inf 79.7%
Final simplification77.2%
(FPCore (x y z t a b c) :precision binary64 (if (or (<= b -4.2e-109) (not (<= b 6.9e+31))) (+ c (* a (* b -0.25))) (+ (* x y) (* 0.0625 (* z t)))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((b <= -4.2e-109) || !(b <= 6.9e+31)) {
tmp = c + (a * (b * -0.25));
} else {
tmp = (x * y) + (0.0625 * (z * t));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if ((b <= (-4.2d-109)) .or. (.not. (b <= 6.9d+31))) then
tmp = c + (a * (b * (-0.25d0)))
else
tmp = (x * y) + (0.0625d0 * (z * t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((b <= -4.2e-109) || !(b <= 6.9e+31)) {
tmp = c + (a * (b * -0.25));
} else {
tmp = (x * y) + (0.0625 * (z * t));
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if (b <= -4.2e-109) or not (b <= 6.9e+31): tmp = c + (a * (b * -0.25)) else: tmp = (x * y) + (0.0625 * (z * t)) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if ((b <= -4.2e-109) || !(b <= 6.9e+31)) tmp = Float64(c + Float64(a * Float64(b * -0.25))); else tmp = Float64(Float64(x * y) + Float64(0.0625 * Float64(z * t))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if ((b <= -4.2e-109) || ~((b <= 6.9e+31))) tmp = c + (a * (b * -0.25)); else tmp = (x * y) + (0.0625 * (z * t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[b, -4.2e-109], N[Not[LessEqual[b, 6.9e+31]], $MachinePrecision]], N[(c + N[(a * N[(b * -0.25), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * y), $MachinePrecision] + N[(0.0625 * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -4.2 \cdot 10^{-109} \lor \neg \left(b \leq 6.9 \cdot 10^{+31}\right):\\
\;\;\;\;c + a \cdot \left(b \cdot -0.25\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot y + 0.0625 \cdot \left(z \cdot t\right)\\
\end{array}
\end{array}
if b < -4.19999999999999992e-109 or 6.8999999999999999e31 < b Initial program 94.1%
associate--l+94.1%
fma-define94.8%
associate-/l*94.8%
fmm-def96.3%
distribute-neg-frac296.3%
metadata-eval96.3%
Simplified96.3%
Taylor expanded in a around inf 58.1%
*-commutative58.1%
associate-*r*58.1%
Simplified58.1%
if -4.19999999999999992e-109 < b < 6.8999999999999999e31Initial program 99.1%
associate--l+99.1%
fma-define99.2%
associate-/l*99.2%
fmm-def99.2%
distribute-neg-frac299.2%
metadata-eval99.2%
Simplified99.2%
Taylor expanded in a around 0 93.5%
Taylor expanded in z around inf 88.9%
Taylor expanded in c around 0 67.2%
Taylor expanded in z around 0 69.5%
Final simplification63.5%
(FPCore (x y z t a b c) :precision binary64 (if (or (<= (* x y) -3.2e-103) (not (<= (* x y) 5e+43))) (* x y) c))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (((x * y) <= -3.2e-103) || !((x * y) <= 5e+43)) {
tmp = x * y;
} else {
tmp = c;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if (((x * y) <= (-3.2d-103)) .or. (.not. ((x * y) <= 5d+43))) then
tmp = x * y
else
tmp = c
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (((x * y) <= -3.2e-103) || !((x * y) <= 5e+43)) {
tmp = x * y;
} else {
tmp = c;
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if ((x * y) <= -3.2e-103) or not ((x * y) <= 5e+43): tmp = x * y else: tmp = c return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if ((Float64(x * y) <= -3.2e-103) || !(Float64(x * y) <= 5e+43)) tmp = Float64(x * y); else tmp = c; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (((x * y) <= -3.2e-103) || ~(((x * y) <= 5e+43))) tmp = x * y; else tmp = c; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[N[(x * y), $MachinePrecision], -3.2e-103], N[Not[LessEqual[N[(x * y), $MachinePrecision], 5e+43]], $MachinePrecision]], N[(x * y), $MachinePrecision], c]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \cdot y \leq -3.2 \cdot 10^{-103} \lor \neg \left(x \cdot y \leq 5 \cdot 10^{+43}\right):\\
\;\;\;\;x \cdot y\\
\mathbf{else}:\\
\;\;\;\;c\\
\end{array}
\end{array}
if (*.f64 x y) < -3.19999999999999976e-103 or 5.0000000000000004e43 < (*.f64 x y) Initial program 93.9%
associate--l+93.9%
fma-define94.7%
associate-/l*94.7%
fmm-def95.5%
distribute-neg-frac295.5%
metadata-eval95.5%
Simplified95.5%
Taylor expanded in a around 0 81.2%
Taylor expanded in t around 0 57.2%
Taylor expanded in c around 0 49.7%
if -3.19999999999999976e-103 < (*.f64 x y) < 5.0000000000000004e43Initial program 99.2%
associate--l+99.2%
fma-define99.2%
associate-/l*99.2%
fmm-def100.0%
distribute-neg-frac2100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in c around inf 29.3%
Final simplification39.8%
(FPCore (x y z t a b c) :precision binary64 (if (or (<= t -3.2e-66) (not (<= t 2.8e+153))) (* t (* z 0.0625)) (+ c (* x y))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((t <= -3.2e-66) || !(t <= 2.8e+153)) {
tmp = t * (z * 0.0625);
} else {
tmp = c + (x * y);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if ((t <= (-3.2d-66)) .or. (.not. (t <= 2.8d+153))) then
tmp = t * (z * 0.0625d0)
else
tmp = c + (x * y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((t <= -3.2e-66) || !(t <= 2.8e+153)) {
tmp = t * (z * 0.0625);
} else {
tmp = c + (x * y);
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if (t <= -3.2e-66) or not (t <= 2.8e+153): tmp = t * (z * 0.0625) else: tmp = c + (x * y) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if ((t <= -3.2e-66) || !(t <= 2.8e+153)) tmp = Float64(t * Float64(z * 0.0625)); else tmp = Float64(c + Float64(x * y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if ((t <= -3.2e-66) || ~((t <= 2.8e+153))) tmp = t * (z * 0.0625); else tmp = c + (x * y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[t, -3.2e-66], N[Not[LessEqual[t, 2.8e+153]], $MachinePrecision]], N[(t * N[(z * 0.0625), $MachinePrecision]), $MachinePrecision], N[(c + N[(x * y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.2 \cdot 10^{-66} \lor \neg \left(t \leq 2.8 \cdot 10^{+153}\right):\\
\;\;\;\;t \cdot \left(z \cdot 0.0625\right)\\
\mathbf{else}:\\
\;\;\;\;c + x \cdot y\\
\end{array}
\end{array}
if t < -3.19999999999999982e-66 or 2.79999999999999985e153 < t Initial program 94.9%
associate--l+94.9%
fma-define95.8%
associate-/l*95.8%
fmm-def96.6%
distribute-neg-frac296.6%
metadata-eval96.6%
Simplified96.6%
Taylor expanded in a around 0 76.6%
Taylor expanded in t around inf 54.8%
Taylor expanded in c around 0 44.0%
associate-*r*44.0%
*-commutative44.0%
associate-*r*44.0%
Simplified44.0%
if -3.19999999999999982e-66 < t < 2.79999999999999985e153Initial program 97.8%
associate--l+97.8%
fma-define97.8%
associate-/l*97.8%
fmm-def98.5%
distribute-neg-frac298.5%
metadata-eval98.5%
Simplified98.5%
Taylor expanded in a around 0 69.8%
Taylor expanded in t around 0 50.9%
Final simplification47.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 96.5%
associate--l+96.5%
fma-define96.9%
associate-/l*96.9%
fmm-def97.7%
distribute-neg-frac297.7%
metadata-eval97.7%
Simplified97.7%
Taylor expanded in c around inf 18.9%
herbie shell --seed 2024181
(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))