
(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 (fma x y (fma (/ z 16.0) t (fma (/ a -4.0) b c))))
double code(double x, double y, double z, double t, double a, double b, double c) {
return fma(x, y, fma((z / 16.0), t, fma((a / -4.0), b, c)));
}
function code(x, y, z, t, a, b, c) return fma(x, y, fma(Float64(z / 16.0), t, fma(Float64(a / -4.0), b, c))) end
code[x_, y_, z_, t_, a_, b_, c_] := N[(x * y + N[(N[(z / 16.0), $MachinePrecision] * t + N[(N[(a / -4.0), $MachinePrecision] * b + c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(x, y, \mathsf{fma}\left(\frac{z}{16}, t, \mathsf{fma}\left(\frac{a}{-4}, b, c\right)\right)\right)
\end{array}
(FPCore (x y z t a b c) :precision binary64 (+ c (- (fma x y (/ z (/ 16.0 t))) (/ a (/ 4.0 b)))))
double code(double x, double y, double z, double t, double a, double b, double c) {
return c + (fma(x, y, (z / (16.0 / t))) - (a / (4.0 / b)));
}
function code(x, y, z, t, a, b, c) return Float64(c + Float64(fma(x, y, Float64(z / Float64(16.0 / t))) - Float64(a / Float64(4.0 / b)))) end
code[x_, y_, z_, t_, a_, b_, c_] := N[(c + N[(N[(x * y + N[(z / N[(16.0 / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a / N[(4.0 / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
c + \left(\mathsf{fma}\left(x, y, \frac{z}{\frac{16}{t}}\right) - \frac{a}{\frac{4}{b}}\right)
\end{array}
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* a (* b -0.25))) (t_2 (* 0.0625 (* z t))))
(if (<= (* x y) -9e+18)
(* x y)
(if (<= (* x y) -7.7e-31)
t_1
(if (<= (* x y) -7.2e-62)
(* x y)
(if (<= (* x y) -1.4e-79)
c
(if (<= (* x y) -2.7e-257)
t_1
(if (<= (* x y) 2e-323)
c
(if (<= (* x y) 4e-160)
t_2
(if (<= (* x y) 3.5e+36)
t_1
(if (<= (* x y) 5.4e+125) t_2 (* 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 t_2 = 0.0625 * (z * t);
double tmp;
if ((x * y) <= -9e+18) {
tmp = x * y;
} else if ((x * y) <= -7.7e-31) {
tmp = t_1;
} else if ((x * y) <= -7.2e-62) {
tmp = x * y;
} else if ((x * y) <= -1.4e-79) {
tmp = c;
} else if ((x * y) <= -2.7e-257) {
tmp = t_1;
} else if ((x * y) <= 2e-323) {
tmp = c;
} else if ((x * y) <= 4e-160) {
tmp = t_2;
} else if ((x * y) <= 3.5e+36) {
tmp = t_1;
} else if ((x * y) <= 5.4e+125) {
tmp = t_2;
} 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) :: t_2
real(8) :: tmp
t_1 = a * (b * (-0.25d0))
t_2 = 0.0625d0 * (z * t)
if ((x * y) <= (-9d+18)) then
tmp = x * y
else if ((x * y) <= (-7.7d-31)) then
tmp = t_1
else if ((x * y) <= (-7.2d-62)) then
tmp = x * y
else if ((x * y) <= (-1.4d-79)) then
tmp = c
else if ((x * y) <= (-2.7d-257)) then
tmp = t_1
else if ((x * y) <= 2d-323) then
tmp = c
else if ((x * y) <= 4d-160) then
tmp = t_2
else if ((x * y) <= 3.5d+36) then
tmp = t_1
else if ((x * y) <= 5.4d+125) then
tmp = t_2
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 t_2 = 0.0625 * (z * t);
double tmp;
if ((x * y) <= -9e+18) {
tmp = x * y;
} else if ((x * y) <= -7.7e-31) {
tmp = t_1;
} else if ((x * y) <= -7.2e-62) {
tmp = x * y;
} else if ((x * y) <= -1.4e-79) {
tmp = c;
} else if ((x * y) <= -2.7e-257) {
tmp = t_1;
} else if ((x * y) <= 2e-323) {
tmp = c;
} else if ((x * y) <= 4e-160) {
tmp = t_2;
} else if ((x * y) <= 3.5e+36) {
tmp = t_1;
} else if ((x * y) <= 5.4e+125) {
tmp = t_2;
} else {
tmp = x * y;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = a * (b * -0.25) t_2 = 0.0625 * (z * t) tmp = 0 if (x * y) <= -9e+18: tmp = x * y elif (x * y) <= -7.7e-31: tmp = t_1 elif (x * y) <= -7.2e-62: tmp = x * y elif (x * y) <= -1.4e-79: tmp = c elif (x * y) <= -2.7e-257: tmp = t_1 elif (x * y) <= 2e-323: tmp = c elif (x * y) <= 4e-160: tmp = t_2 elif (x * y) <= 3.5e+36: tmp = t_1 elif (x * y) <= 5.4e+125: tmp = t_2 else: tmp = x * y return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(a * Float64(b * -0.25)) t_2 = Float64(0.0625 * Float64(z * t)) tmp = 0.0 if (Float64(x * y) <= -9e+18) tmp = Float64(x * y); elseif (Float64(x * y) <= -7.7e-31) tmp = t_1; elseif (Float64(x * y) <= -7.2e-62) tmp = Float64(x * y); elseif (Float64(x * y) <= -1.4e-79) tmp = c; elseif (Float64(x * y) <= -2.7e-257) tmp = t_1; elseif (Float64(x * y) <= 2e-323) tmp = c; elseif (Float64(x * y) <= 4e-160) tmp = t_2; elseif (Float64(x * y) <= 3.5e+36) tmp = t_1; elseif (Float64(x * y) <= 5.4e+125) tmp = t_2; 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); t_2 = 0.0625 * (z * t); tmp = 0.0; if ((x * y) <= -9e+18) tmp = x * y; elseif ((x * y) <= -7.7e-31) tmp = t_1; elseif ((x * y) <= -7.2e-62) tmp = x * y; elseif ((x * y) <= -1.4e-79) tmp = c; elseif ((x * y) <= -2.7e-257) tmp = t_1; elseif ((x * y) <= 2e-323) tmp = c; elseif ((x * y) <= 4e-160) tmp = t_2; elseif ((x * y) <= 3.5e+36) tmp = t_1; elseif ((x * y) <= 5.4e+125) tmp = t_2; else tmp = x * y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(a * N[(b * -0.25), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(0.0625 * N[(z * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(x * y), $MachinePrecision], -9e+18], N[(x * y), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], -7.7e-31], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], -7.2e-62], N[(x * y), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], -1.4e-79], c, If[LessEqual[N[(x * y), $MachinePrecision], -2.7e-257], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], 2e-323], c, If[LessEqual[N[(x * y), $MachinePrecision], 4e-160], t$95$2, If[LessEqual[N[(x * y), $MachinePrecision], 3.5e+36], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], 5.4e+125], t$95$2, N[(x * y), $MachinePrecision]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot \left(b \cdot -0.25\right)\\
t_2 := 0.0625 \cdot \left(z \cdot t\right)\\
\mathbf{if}\;x \cdot y \leq -9 \cdot 10^{+18}:\\
\;\;\;\;x \cdot y\\
\mathbf{elif}\;x \cdot y \leq -7.7 \cdot 10^{-31}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \cdot y \leq -7.2 \cdot 10^{-62}:\\
\;\;\;\;x \cdot y\\
\mathbf{elif}\;x \cdot y \leq -1.4 \cdot 10^{-79}:\\
\;\;\;\;c\\
\mathbf{elif}\;x \cdot y \leq -2.7 \cdot 10^{-257}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \cdot y \leq 2 \cdot 10^{-323}:\\
\;\;\;\;c\\
\mathbf{elif}\;x \cdot y \leq 4 \cdot 10^{-160}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \cdot y \leq 3.5 \cdot 10^{+36}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \cdot y \leq 5.4 \cdot 10^{+125}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;x \cdot y\\
\end{array}
\end{array}
(FPCore (x y z t a b c)
:precision binary64
(if (or (<= (* x y) -1.5e+95)
(and (not (<= (* x y) -8.5e-31))
(or (<= (* x y) -2.1e-63) (not (<= (* x y) 2.05e+37)))))
(+ (* x y) (* 0.0625 (* z t)))
(+ c (* a (* b -0.25)))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (((x * y) <= -1.5e+95) || (!((x * y) <= -8.5e-31) && (((x * y) <= -2.1e-63) || !((x * y) <= 2.05e+37)))) {
tmp = (x * y) + (0.0625 * (z * t));
} else {
tmp = c + (a * (b * -0.25));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if (((x * y) <= (-1.5d+95)) .or. (.not. ((x * y) <= (-8.5d-31))) .and. ((x * y) <= (-2.1d-63)) .or. (.not. ((x * y) <= 2.05d+37))) then
tmp = (x * y) + (0.0625d0 * (z * t))
else
tmp = c + (a * (b * (-0.25d0)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (((x * y) <= -1.5e+95) || (!((x * y) <= -8.5e-31) && (((x * y) <= -2.1e-63) || !((x * y) <= 2.05e+37)))) {
tmp = (x * y) + (0.0625 * (z * t));
} else {
tmp = c + (a * (b * -0.25));
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if ((x * y) <= -1.5e+95) or (not ((x * y) <= -8.5e-31) and (((x * y) <= -2.1e-63) or not ((x * y) <= 2.05e+37))): tmp = (x * y) + (0.0625 * (z * t)) else: tmp = c + (a * (b * -0.25)) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if ((Float64(x * y) <= -1.5e+95) || (!(Float64(x * y) <= -8.5e-31) && ((Float64(x * y) <= -2.1e-63) || !(Float64(x * y) <= 2.05e+37)))) tmp = Float64(Float64(x * y) + Float64(0.0625 * Float64(z * t))); else tmp = Float64(c + Float64(a * Float64(b * -0.25))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (((x * y) <= -1.5e+95) || (~(((x * y) <= -8.5e-31)) && (((x * y) <= -2.1e-63) || ~(((x * y) <= 2.05e+37))))) tmp = (x * y) + (0.0625 * (z * t)); else tmp = c + (a * (b * -0.25)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[N[(x * y), $MachinePrecision], -1.5e+95], And[N[Not[LessEqual[N[(x * y), $MachinePrecision], -8.5e-31]], $MachinePrecision], Or[LessEqual[N[(x * y), $MachinePrecision], -2.1e-63], N[Not[LessEqual[N[(x * y), $MachinePrecision], 2.05e+37]], $MachinePrecision]]]], N[(N[(x * y), $MachinePrecision] + N[(0.0625 * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(c + N[(a * N[(b * -0.25), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \cdot y \leq -1.5 \cdot 10^{+95} \lor \neg \left(x \cdot y \leq -8.5 \cdot 10^{-31}\right) \land \left(x \cdot y \leq -2.1 \cdot 10^{-63} \lor \neg \left(x \cdot y \leq 2.05 \cdot 10^{+37}\right)\right):\\
\;\;\;\;x \cdot y + 0.0625 \cdot \left(z \cdot t\right)\\
\mathbf{else}:\\
\;\;\;\;c + a \cdot \left(b \cdot -0.25\right)\\
\end{array}
\end{array}
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (+ c (* 0.0625 (* z t)))) (t_2 (+ c (* x y))))
(if (<= (* x y) -3.7e+19)
t_2
(if (<= (* x y) 1.7e-146)
t_1
(if (<= (* x y) 5.6e+30)
(+ c (* a (* b -0.25)))
(if (<= (* x y) 1.15e+126) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = c + (0.0625 * (z * t));
double t_2 = c + (x * y);
double tmp;
if ((x * y) <= -3.7e+19) {
tmp = t_2;
} else if ((x * y) <= 1.7e-146) {
tmp = t_1;
} else if ((x * y) <= 5.6e+30) {
tmp = c + (a * (b * -0.25));
} else if ((x * y) <= 1.15e+126) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = c + (0.0625d0 * (z * t))
t_2 = c + (x * y)
if ((x * y) <= (-3.7d+19)) then
tmp = t_2
else if ((x * y) <= 1.7d-146) then
tmp = t_1
else if ((x * y) <= 5.6d+30) then
tmp = c + (a * (b * (-0.25d0)))
else if ((x * y) <= 1.15d+126) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = c + (0.0625 * (z * t));
double t_2 = c + (x * y);
double tmp;
if ((x * y) <= -3.7e+19) {
tmp = t_2;
} else if ((x * y) <= 1.7e-146) {
tmp = t_1;
} else if ((x * y) <= 5.6e+30) {
tmp = c + (a * (b * -0.25));
} else if ((x * y) <= 1.15e+126) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = c + (0.0625 * (z * t)) t_2 = c + (x * y) tmp = 0 if (x * y) <= -3.7e+19: tmp = t_2 elif (x * y) <= 1.7e-146: tmp = t_1 elif (x * y) <= 5.6e+30: tmp = c + (a * (b * -0.25)) elif (x * y) <= 1.15e+126: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(c + Float64(0.0625 * Float64(z * t))) t_2 = Float64(c + Float64(x * y)) tmp = 0.0 if (Float64(x * y) <= -3.7e+19) tmp = t_2; elseif (Float64(x * y) <= 1.7e-146) tmp = t_1; elseif (Float64(x * y) <= 5.6e+30) tmp = Float64(c + Float64(a * Float64(b * -0.25))); elseif (Float64(x * y) <= 1.15e+126) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = c + (0.0625 * (z * t)); t_2 = c + (x * y); tmp = 0.0; if ((x * y) <= -3.7e+19) tmp = t_2; elseif ((x * y) <= 1.7e-146) tmp = t_1; elseif ((x * y) <= 5.6e+30) tmp = c + (a * (b * -0.25)); elseif ((x * y) <= 1.15e+126) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(c + N[(0.0625 * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(c + N[(x * y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(x * y), $MachinePrecision], -3.7e+19], t$95$2, If[LessEqual[N[(x * y), $MachinePrecision], 1.7e-146], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], 5.6e+30], N[(c + N[(a * N[(b * -0.25), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 1.15e+126], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := c + 0.0625 \cdot \left(z \cdot t\right)\\
t_2 := c + x \cdot y\\
\mathbf{if}\;x \cdot y \leq -3.7 \cdot 10^{+19}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \cdot y \leq 1.7 \cdot 10^{-146}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \cdot y \leq 5.6 \cdot 10^{+30}:\\
\;\;\;\;c + a \cdot \left(b \cdot -0.25\right)\\
\mathbf{elif}\;x \cdot y \leq 1.15 \cdot 10^{+126}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* 0.0625 (* z t))))
(if (<= z -2.6e+85)
t_1
(if (<= z -5e-105)
(* x y)
(if (<= z -3e-125)
c
(if (<= z -1.7e-205)
(* x y)
(if (<= z -8.2e-269) c (if (<= z 8.6e-15) (* x y) t_1))))))))
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 (z <= -2.6e+85) {
tmp = t_1;
} else if (z <= -5e-105) {
tmp = x * y;
} else if (z <= -3e-125) {
tmp = c;
} else if (z <= -1.7e-205) {
tmp = x * y;
} else if (z <= -8.2e-269) {
tmp = c;
} else if (z <= 8.6e-15) {
tmp = x * y;
} 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.0625d0 * (z * t)
if (z <= (-2.6d+85)) then
tmp = t_1
else if (z <= (-5d-105)) then
tmp = x * y
else if (z <= (-3d-125)) then
tmp = c
else if (z <= (-1.7d-205)) then
tmp = x * y
else if (z <= (-8.2d-269)) then
tmp = c
else if (z <= 8.6d-15) then
tmp = x * y
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.0625 * (z * t);
double tmp;
if (z <= -2.6e+85) {
tmp = t_1;
} else if (z <= -5e-105) {
tmp = x * y;
} else if (z <= -3e-125) {
tmp = c;
} else if (z <= -1.7e-205) {
tmp = x * y;
} else if (z <= -8.2e-269) {
tmp = c;
} else if (z <= 8.6e-15) {
tmp = x * y;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = 0.0625 * (z * t) tmp = 0 if z <= -2.6e+85: tmp = t_1 elif z <= -5e-105: tmp = x * y elif z <= -3e-125: tmp = c elif z <= -1.7e-205: tmp = x * y elif z <= -8.2e-269: tmp = c elif z <= 8.6e-15: tmp = x * y else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(0.0625 * Float64(z * t)) tmp = 0.0 if (z <= -2.6e+85) tmp = t_1; elseif (z <= -5e-105) tmp = Float64(x * y); elseif (z <= -3e-125) tmp = c; elseif (z <= -1.7e-205) tmp = Float64(x * y); elseif (z <= -8.2e-269) tmp = c; elseif (z <= 8.6e-15) tmp = Float64(x * y); else tmp = t_1; 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 (z <= -2.6e+85) tmp = t_1; elseif (z <= -5e-105) tmp = x * y; elseif (z <= -3e-125) tmp = c; elseif (z <= -1.7e-205) tmp = x * y; elseif (z <= -8.2e-269) tmp = c; elseif (z <= 8.6e-15) tmp = x * y; else tmp = t_1; 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[LessEqual[z, -2.6e+85], t$95$1, If[LessEqual[z, -5e-105], N[(x * y), $MachinePrecision], If[LessEqual[z, -3e-125], c, If[LessEqual[z, -1.7e-205], N[(x * y), $MachinePrecision], If[LessEqual[z, -8.2e-269], c, If[LessEqual[z, 8.6e-15], N[(x * y), $MachinePrecision], t$95$1]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 0.0625 \cdot \left(z \cdot t\right)\\
\mathbf{if}\;z \leq -2.6 \cdot 10^{+85}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -5 \cdot 10^{-105}:\\
\;\;\;\;x \cdot y\\
\mathbf{elif}\;z \leq -3 \cdot 10^{-125}:\\
\;\;\;\;c\\
\mathbf{elif}\;z \leq -1.7 \cdot 10^{-205}:\\
\;\;\;\;x \cdot y\\
\mathbf{elif}\;z \leq -8.2 \cdot 10^{-269}:\\
\;\;\;\;c\\
\mathbf{elif}\;z \leq 8.6 \cdot 10^{-15}:\\
\;\;\;\;x \cdot y\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
(FPCore (x y z t a b c) :precision binary64 (+ c (- (+ (/ z (/ 16.0 t)) (* x y)) (/ (* a b) 4.0))))
double code(double x, double y, double z, double t, double a, double b, double c) {
return c + (((z / (16.0 / t)) + (x * y)) - ((a * b) / 4.0));
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
code = c + (((z / (16.0d0 / t)) + (x * y)) - ((a * b) / 4.0d0))
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
return c + (((z / (16.0 / t)) + (x * y)) - ((a * b) / 4.0));
}
def code(x, y, z, t, a, b, c): return c + (((z / (16.0 / t)) + (x * y)) - ((a * b) / 4.0))
function code(x, y, z, t, a, b, c) return Float64(c + Float64(Float64(Float64(z / Float64(16.0 / t)) + Float64(x * y)) - Float64(Float64(a * b) / 4.0))) end
function tmp = code(x, y, z, t, a, b, c) tmp = c + (((z / (16.0 / t)) + (x * y)) - ((a * b) / 4.0)); end
code[x_, y_, z_, t_, a_, b_, c_] := N[(c + N[(N[(N[(z / N[(16.0 / t), $MachinePrecision]), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision] - N[(N[(a * b), $MachinePrecision] / 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
c + \left(\left(\frac{z}{\frac{16}{t}} + x \cdot y\right) - \frac{a \cdot b}{4}\right)
\end{array}
(FPCore (x y z t a b c) :precision binary64 (+ c (- (+ (* x y) (/ (* z t) 16.0)) (/ (* a b) 4.0))))
double code(double x, double y, double z, double t, double a, double b, double c) {
return c + (((x * y) + ((z * t) / 16.0)) - ((a * b) / 4.0));
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
code = c + (((x * y) + ((z * t) / 16.0d0)) - ((a * b) / 4.0d0))
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
return c + (((x * y) + ((z * t) / 16.0)) - ((a * b) / 4.0));
}
def code(x, y, z, t, a, b, c): return c + (((x * y) + ((z * t) / 16.0)) - ((a * b) / 4.0))
function code(x, y, z, t, a, b, c) return Float64(c + Float64(Float64(Float64(x * y) + Float64(Float64(z * t) / 16.0)) - Float64(Float64(a * b) / 4.0))) end
function tmp = code(x, y, z, t, a, b, c) tmp = c + (((x * y) + ((z * t) / 16.0)) - ((a * b) / 4.0)); end
code[x_, y_, z_, t_, a_, b_, c_] := N[(c + N[(N[(N[(x * y), $MachinePrecision] + N[(N[(z * t), $MachinePrecision] / 16.0), $MachinePrecision]), $MachinePrecision] - N[(N[(a * b), $MachinePrecision] / 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
c + \left(\left(x \cdot y + \frac{z \cdot t}{16}\right) - \frac{a \cdot b}{4}\right)
\end{array}
(FPCore (x y z t a b c) :precision binary64 (if (or (<= (* x y) -6.2e+15) (not (<= (* x y) 7e+125))) (+ 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) <= -6.2e+15) || !((x * y) <= 7e+125)) {
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) <= (-6.2d+15)) .or. (.not. ((x * y) <= 7d+125))) 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) <= -6.2e+15) || !((x * y) <= 7e+125)) {
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) <= -6.2e+15) or not ((x * y) <= 7e+125): 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) <= -6.2e+15) || !(Float64(x * y) <= 7e+125)) 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) <= -6.2e+15) || ~(((x * y) <= 7e+125))) 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], -6.2e+15], N[Not[LessEqual[N[(x * y), $MachinePrecision], 7e+125]], $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 -6.2 \cdot 10^{+15} \lor \neg \left(x \cdot y \leq 7 \cdot 10^{+125}\right):\\
\;\;\;\;c + x \cdot y\\
\mathbf{else}:\\
\;\;\;\;c + 0.0625 \cdot \left(z \cdot t\right)\\
\end{array}
\end{array}
(FPCore (x y z t a b c) :precision binary64 (if (or (<= b -11000000000.0) (not (<= b 3.7e+211))) (+ 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 <= -11000000000.0) || !(b <= 3.7e+211)) {
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 <= (-11000000000.0d0)) .or. (.not. (b <= 3.7d+211))) 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 <= -11000000000.0) || !(b <= 3.7e+211)) {
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 <= -11000000000.0) or not (b <= 3.7e+211): 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 <= -11000000000.0) || !(b <= 3.7e+211)) 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 <= -11000000000.0) || ~((b <= 3.7e+211))) 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, -11000000000.0], N[Not[LessEqual[b, 3.7e+211]], $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 -11000000000 \lor \neg \left(b \leq 3.7 \cdot 10^{+211}\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}
(FPCore (x y z t a b c) :precision binary64 (if (or (<= (* x y) -7.2e-62) (not (<= (* x y) 3.7e+37))) (* x y) c))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (((x * y) <= -7.2e-62) || !((x * y) <= 3.7e+37)) {
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) <= (-7.2d-62)) .or. (.not. ((x * y) <= 3.7d+37))) 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) <= -7.2e-62) || !((x * y) <= 3.7e+37)) {
tmp = x * y;
} else {
tmp = c;
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if ((x * y) <= -7.2e-62) or not ((x * y) <= 3.7e+37): tmp = x * y else: tmp = c return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if ((Float64(x * y) <= -7.2e-62) || !(Float64(x * y) <= 3.7e+37)) 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) <= -7.2e-62) || ~(((x * y) <= 3.7e+37))) 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], -7.2e-62], N[Not[LessEqual[N[(x * y), $MachinePrecision], 3.7e+37]], $MachinePrecision]], N[(x * y), $MachinePrecision], c]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \cdot y \leq -7.2 \cdot 10^{-62} \lor \neg \left(x \cdot y \leq 3.7 \cdot 10^{+37}\right):\\
\;\;\;\;x \cdot y\\
\mathbf{else}:\\
\;\;\;\;c\\
\end{array}
\end{array}
(FPCore (x y z t a b c) :precision binary64 (if (or (<= t -5.6e+20) (not (<= t 5.5e+199))) (* 0.0625 (* z t)) (+ c (* x y))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((t <= -5.6e+20) || !(t <= 5.5e+199)) {
tmp = 0.0625 * (z * t);
} 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 <= (-5.6d+20)) .or. (.not. (t <= 5.5d+199))) then
tmp = 0.0625d0 * (z * t)
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 <= -5.6e+20) || !(t <= 5.5e+199)) {
tmp = 0.0625 * (z * t);
} else {
tmp = c + (x * y);
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if (t <= -5.6e+20) or not (t <= 5.5e+199): tmp = 0.0625 * (z * t) else: tmp = c + (x * y) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if ((t <= -5.6e+20) || !(t <= 5.5e+199)) tmp = Float64(0.0625 * Float64(z * t)); 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 <= -5.6e+20) || ~((t <= 5.5e+199))) tmp = 0.0625 * (z * t); else tmp = c + (x * y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[t, -5.6e+20], N[Not[LessEqual[t, 5.5e+199]], $MachinePrecision]], N[(0.0625 * N[(z * t), $MachinePrecision]), $MachinePrecision], N[(c + N[(x * y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -5.6 \cdot 10^{+20} \lor \neg \left(t \leq 5.5 \cdot 10^{+199}\right):\\
\;\;\;\;0.0625 \cdot \left(z \cdot t\right)\\
\mathbf{else}:\\
\;\;\;\;c + x \cdot y\\
\end{array}
\end{array}
(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}
herbie shell --seed 2024008
(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))