
(FPCore (a k m) :precision binary64 (/ (* a (pow k m)) (+ (+ 1.0 (* 10.0 k)) (* k k))))
double code(double a, double k, double m) {
return (a * pow(k, m)) / ((1.0 + (10.0 * k)) + (k * k));
}
real(8) function code(a, k, m)
real(8), intent (in) :: a
real(8), intent (in) :: k
real(8), intent (in) :: m
code = (a * (k ** m)) / ((1.0d0 + (10.0d0 * k)) + (k * k))
end function
public static double code(double a, double k, double m) {
return (a * Math.pow(k, m)) / ((1.0 + (10.0 * k)) + (k * k));
}
def code(a, k, m): return (a * math.pow(k, m)) / ((1.0 + (10.0 * k)) + (k * k))
function code(a, k, m) return Float64(Float64(a * (k ^ m)) / Float64(Float64(1.0 + Float64(10.0 * k)) + Float64(k * k))) end
function tmp = code(a, k, m) tmp = (a * (k ^ m)) / ((1.0 + (10.0 * k)) + (k * k)); end
code[a_, k_, m_] := N[(N[(a * N[Power[k, m], $MachinePrecision]), $MachinePrecision] / N[(N[(1.0 + N[(10.0 * k), $MachinePrecision]), $MachinePrecision] + N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{a \cdot {k}^{m}}{\left(1 + 10 \cdot k\right) + k \cdot k}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 19 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (a k m) :precision binary64 (/ (* a (pow k m)) (+ (+ 1.0 (* 10.0 k)) (* k k))))
double code(double a, double k, double m) {
return (a * pow(k, m)) / ((1.0 + (10.0 * k)) + (k * k));
}
real(8) function code(a, k, m)
real(8), intent (in) :: a
real(8), intent (in) :: k
real(8), intent (in) :: m
code = (a * (k ** m)) / ((1.0d0 + (10.0d0 * k)) + (k * k))
end function
public static double code(double a, double k, double m) {
return (a * Math.pow(k, m)) / ((1.0 + (10.0 * k)) + (k * k));
}
def code(a, k, m): return (a * math.pow(k, m)) / ((1.0 + (10.0 * k)) + (k * k))
function code(a, k, m) return Float64(Float64(a * (k ^ m)) / Float64(Float64(1.0 + Float64(10.0 * k)) + Float64(k * k))) end
function tmp = code(a, k, m) tmp = (a * (k ^ m)) / ((1.0 + (10.0 * k)) + (k * k)); end
code[a_, k_, m_] := N[(N[(a * N[Power[k, m], $MachinePrecision]), $MachinePrecision] / N[(N[(1.0 + N[(10.0 * k), $MachinePrecision]), $MachinePrecision] + N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{a \cdot {k}^{m}}{\left(1 + 10 \cdot k\right) + k \cdot k}
\end{array}
(FPCore (a k m) :precision binary64 (/ (/ (* a (pow k m)) (hypot 1.0 k)) (hypot 1.0 k)))
double code(double a, double k, double m) {
return ((a * pow(k, m)) / hypot(1.0, k)) / hypot(1.0, k);
}
public static double code(double a, double k, double m) {
return ((a * Math.pow(k, m)) / Math.hypot(1.0, k)) / Math.hypot(1.0, k);
}
def code(a, k, m): return ((a * math.pow(k, m)) / math.hypot(1.0, k)) / math.hypot(1.0, k)
function code(a, k, m) return Float64(Float64(Float64(a * (k ^ m)) / hypot(1.0, k)) / hypot(1.0, k)) end
function tmp = code(a, k, m) tmp = ((a * (k ^ m)) / hypot(1.0, k)) / hypot(1.0, k); end
code[a_, k_, m_] := N[(N[(N[(a * N[Power[k, m], $MachinePrecision]), $MachinePrecision] / N[Sqrt[1.0 ^ 2 + k ^ 2], $MachinePrecision]), $MachinePrecision] / N[Sqrt[1.0 ^ 2 + k ^ 2], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\frac{a \cdot {k}^{m}}{\mathsf{hypot}\left(1, k\right)}}{\mathsf{hypot}\left(1, k\right)}
\end{array}
(FPCore (a k m)
:precision binary64
(let* ((t_0 (* a (pow k m))))
(if (<= (/ t_0 (+ (* k k) (+ 1.0 (* k 10.0)))) 2e+217)
(* (/ (pow k m) (hypot 1.0 k)) (/ a (hypot 1.0 k)))
t_0)))
double code(double a, double k, double m) {
double t_0 = a * pow(k, m);
double tmp;
if ((t_0 / ((k * k) + (1.0 + (k * 10.0)))) <= 2e+217) {
tmp = (pow(k, m) / hypot(1.0, k)) * (a / hypot(1.0, k));
} else {
tmp = t_0;
}
return tmp;
}
public static double code(double a, double k, double m) {
double t_0 = a * Math.pow(k, m);
double tmp;
if ((t_0 / ((k * k) + (1.0 + (k * 10.0)))) <= 2e+217) {
tmp = (Math.pow(k, m) / Math.hypot(1.0, k)) * (a / Math.hypot(1.0, k));
} else {
tmp = t_0;
}
return tmp;
}
def code(a, k, m): t_0 = a * math.pow(k, m) tmp = 0 if (t_0 / ((k * k) + (1.0 + (k * 10.0)))) <= 2e+217: tmp = (math.pow(k, m) / math.hypot(1.0, k)) * (a / math.hypot(1.0, k)) else: tmp = t_0 return tmp
function code(a, k, m) t_0 = Float64(a * (k ^ m)) tmp = 0.0 if (Float64(t_0 / Float64(Float64(k * k) + Float64(1.0 + Float64(k * 10.0)))) <= 2e+217) tmp = Float64(Float64((k ^ m) / hypot(1.0, k)) * Float64(a / hypot(1.0, k))); else tmp = t_0; end return tmp end
function tmp_2 = code(a, k, m) t_0 = a * (k ^ m); tmp = 0.0; if ((t_0 / ((k * k) + (1.0 + (k * 10.0)))) <= 2e+217) tmp = ((k ^ m) / hypot(1.0, k)) * (a / hypot(1.0, k)); else tmp = t_0; end tmp_2 = tmp; end
code[a_, k_, m_] := Block[{t$95$0 = N[(a * N[Power[k, m], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(t$95$0 / N[(N[(k * k), $MachinePrecision] + N[(1.0 + N[(k * 10.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2e+217], N[(N[(N[Power[k, m], $MachinePrecision] / N[Sqrt[1.0 ^ 2 + k ^ 2], $MachinePrecision]), $MachinePrecision] * N[(a / N[Sqrt[1.0 ^ 2 + k ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := a \cdot {k}^{m}\\
\mathbf{if}\;\frac{t_0}{k \cdot k + \left(1 + k \cdot 10\right)} \leq 2 \cdot 10^{+217}:\\
\;\;\;\;\frac{{k}^{m}}{\mathsf{hypot}\left(1, k\right)} \cdot \frac{a}{\mathsf{hypot}\left(1, k\right)}\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\end{array}
(FPCore (a k m)
:precision binary64
(let* ((t_0 (* a (pow k m))))
(if (<= m -3.6e-35)
(/ t_0 (+ 1.0 (* k k)))
(if (<= m 1.65e-8) (pow (/ (sqrt a) (hypot 1.0 k)) 2.0) t_0))))
double code(double a, double k, double m) {
double t_0 = a * pow(k, m);
double tmp;
if (m <= -3.6e-35) {
tmp = t_0 / (1.0 + (k * k));
} else if (m <= 1.65e-8) {
tmp = pow((sqrt(a) / hypot(1.0, k)), 2.0);
} else {
tmp = t_0;
}
return tmp;
}
public static double code(double a, double k, double m) {
double t_0 = a * Math.pow(k, m);
double tmp;
if (m <= -3.6e-35) {
tmp = t_0 / (1.0 + (k * k));
} else if (m <= 1.65e-8) {
tmp = Math.pow((Math.sqrt(a) / Math.hypot(1.0, k)), 2.0);
} else {
tmp = t_0;
}
return tmp;
}
def code(a, k, m): t_0 = a * math.pow(k, m) tmp = 0 if m <= -3.6e-35: tmp = t_0 / (1.0 + (k * k)) elif m <= 1.65e-8: tmp = math.pow((math.sqrt(a) / math.hypot(1.0, k)), 2.0) else: tmp = t_0 return tmp
function code(a, k, m) t_0 = Float64(a * (k ^ m)) tmp = 0.0 if (m <= -3.6e-35) tmp = Float64(t_0 / Float64(1.0 + Float64(k * k))); elseif (m <= 1.65e-8) tmp = Float64(sqrt(a) / hypot(1.0, k)) ^ 2.0; else tmp = t_0; end return tmp end
function tmp_2 = code(a, k, m) t_0 = a * (k ^ m); tmp = 0.0; if (m <= -3.6e-35) tmp = t_0 / (1.0 + (k * k)); elseif (m <= 1.65e-8) tmp = (sqrt(a) / hypot(1.0, k)) ^ 2.0; else tmp = t_0; end tmp_2 = tmp; end
code[a_, k_, m_] := Block[{t$95$0 = N[(a * N[Power[k, m], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[m, -3.6e-35], N[(t$95$0 / N[(1.0 + N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[m, 1.65e-8], N[Power[N[(N[Sqrt[a], $MachinePrecision] / N[Sqrt[1.0 ^ 2 + k ^ 2], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := a \cdot {k}^{m}\\
\mathbf{if}\;m \leq -3.6 \cdot 10^{-35}:\\
\;\;\;\;\frac{t_0}{1 + k \cdot k}\\
\mathbf{elif}\;m \leq 1.65 \cdot 10^{-8}:\\
\;\;\;\;{\left(\frac{\sqrt{a}}{\mathsf{hypot}\left(1, k\right)}\right)}^{2}\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\end{array}
(FPCore (a k m) :precision binary64 (/ (* a (/ (pow k m) (hypot 1.0 k))) (hypot 1.0 k)))
double code(double a, double k, double m) {
return (a * (pow(k, m) / hypot(1.0, k))) / hypot(1.0, k);
}
public static double code(double a, double k, double m) {
return (a * (Math.pow(k, m) / Math.hypot(1.0, k))) / Math.hypot(1.0, k);
}
def code(a, k, m): return (a * (math.pow(k, m) / math.hypot(1.0, k))) / math.hypot(1.0, k)
function code(a, k, m) return Float64(Float64(a * Float64((k ^ m) / hypot(1.0, k))) / hypot(1.0, k)) end
function tmp = code(a, k, m) tmp = (a * ((k ^ m) / hypot(1.0, k))) / hypot(1.0, k); end
code[a_, k_, m_] := N[(N[(a * N[(N[Power[k, m], $MachinePrecision] / N[Sqrt[1.0 ^ 2 + k ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sqrt[1.0 ^ 2 + k ^ 2], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{a \cdot \frac{{k}^{m}}{\mathsf{hypot}\left(1, k\right)}}{\mathsf{hypot}\left(1, k\right)}
\end{array}
(FPCore (a k m) :precision binary64 (let* ((t_0 (* a (pow k m))) (t_1 (/ t_0 (+ (* k k) (+ 1.0 (* k 10.0)))))) (if (<= t_1 2e+217) t_1 t_0)))
double code(double a, double k, double m) {
double t_0 = a * pow(k, m);
double t_1 = t_0 / ((k * k) + (1.0 + (k * 10.0)));
double tmp;
if (t_1 <= 2e+217) {
tmp = t_1;
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(a, k, m)
real(8), intent (in) :: a
real(8), intent (in) :: k
real(8), intent (in) :: m
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = a * (k ** m)
t_1 = t_0 / ((k * k) + (1.0d0 + (k * 10.0d0)))
if (t_1 <= 2d+217) then
tmp = t_1
else
tmp = t_0
end if
code = tmp
end function
public static double code(double a, double k, double m) {
double t_0 = a * Math.pow(k, m);
double t_1 = t_0 / ((k * k) + (1.0 + (k * 10.0)));
double tmp;
if (t_1 <= 2e+217) {
tmp = t_1;
} else {
tmp = t_0;
}
return tmp;
}
def code(a, k, m): t_0 = a * math.pow(k, m) t_1 = t_0 / ((k * k) + (1.0 + (k * 10.0))) tmp = 0 if t_1 <= 2e+217: tmp = t_1 else: tmp = t_0 return tmp
function code(a, k, m) t_0 = Float64(a * (k ^ m)) t_1 = Float64(t_0 / Float64(Float64(k * k) + Float64(1.0 + Float64(k * 10.0)))) tmp = 0.0 if (t_1 <= 2e+217) tmp = t_1; else tmp = t_0; end return tmp end
function tmp_2 = code(a, k, m) t_0 = a * (k ^ m); t_1 = t_0 / ((k * k) + (1.0 + (k * 10.0))); tmp = 0.0; if (t_1 <= 2e+217) tmp = t_1; else tmp = t_0; end tmp_2 = tmp; end
code[a_, k_, m_] := Block[{t$95$0 = N[(a * N[Power[k, m], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(t$95$0 / N[(N[(k * k), $MachinePrecision] + N[(1.0 + N[(k * 10.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, 2e+217], t$95$1, t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := a \cdot {k}^{m}\\
t_1 := \frac{t_0}{k \cdot k + \left(1 + k \cdot 10\right)}\\
\mathbf{if}\;t_1 \leq 2 \cdot 10^{+217}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\end{array}
(FPCore (a k m) :precision binary64 (if (<= k 4.2e-9) (* a (pow k m)) (* (/ (pow k m) (hypot 1.0 k)) (/ a k))))
double code(double a, double k, double m) {
double tmp;
if (k <= 4.2e-9) {
tmp = a * pow(k, m);
} else {
tmp = (pow(k, m) / hypot(1.0, k)) * (a / k);
}
return tmp;
}
public static double code(double a, double k, double m) {
double tmp;
if (k <= 4.2e-9) {
tmp = a * Math.pow(k, m);
} else {
tmp = (Math.pow(k, m) / Math.hypot(1.0, k)) * (a / k);
}
return tmp;
}
def code(a, k, m): tmp = 0 if k <= 4.2e-9: tmp = a * math.pow(k, m) else: tmp = (math.pow(k, m) / math.hypot(1.0, k)) * (a / k) return tmp
function code(a, k, m) tmp = 0.0 if (k <= 4.2e-9) tmp = Float64(a * (k ^ m)); else tmp = Float64(Float64((k ^ m) / hypot(1.0, k)) * Float64(a / k)); end return tmp end
function tmp_2 = code(a, k, m) tmp = 0.0; if (k <= 4.2e-9) tmp = a * (k ^ m); else tmp = ((k ^ m) / hypot(1.0, k)) * (a / k); end tmp_2 = tmp; end
code[a_, k_, m_] := If[LessEqual[k, 4.2e-9], N[(a * N[Power[k, m], $MachinePrecision]), $MachinePrecision], N[(N[(N[Power[k, m], $MachinePrecision] / N[Sqrt[1.0 ^ 2 + k ^ 2], $MachinePrecision]), $MachinePrecision] * N[(a / k), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;k \leq 4.2 \cdot 10^{-9}:\\
\;\;\;\;a \cdot {k}^{m}\\
\mathbf{else}:\\
\;\;\;\;\frac{{k}^{m}}{\mathsf{hypot}\left(1, k\right)} \cdot \frac{a}{k}\\
\end{array}
\end{array}
(FPCore (a k m) :precision binary64 (if (<= m 6.5e-5) (* (pow k m) (/ a (+ 1.0 (* k (+ k 10.0))))) (* a (pow k m))))
double code(double a, double k, double m) {
double tmp;
if (m <= 6.5e-5) {
tmp = pow(k, m) * (a / (1.0 + (k * (k + 10.0))));
} else {
tmp = a * pow(k, m);
}
return tmp;
}
real(8) function code(a, k, m)
real(8), intent (in) :: a
real(8), intent (in) :: k
real(8), intent (in) :: m
real(8) :: tmp
if (m <= 6.5d-5) then
tmp = (k ** m) * (a / (1.0d0 + (k * (k + 10.0d0))))
else
tmp = a * (k ** m)
end if
code = tmp
end function
public static double code(double a, double k, double m) {
double tmp;
if (m <= 6.5e-5) {
tmp = Math.pow(k, m) * (a / (1.0 + (k * (k + 10.0))));
} else {
tmp = a * Math.pow(k, m);
}
return tmp;
}
def code(a, k, m): tmp = 0 if m <= 6.5e-5: tmp = math.pow(k, m) * (a / (1.0 + (k * (k + 10.0)))) else: tmp = a * math.pow(k, m) return tmp
function code(a, k, m) tmp = 0.0 if (m <= 6.5e-5) tmp = Float64((k ^ m) * Float64(a / Float64(1.0 + Float64(k * Float64(k + 10.0))))); else tmp = Float64(a * (k ^ m)); end return tmp end
function tmp_2 = code(a, k, m) tmp = 0.0; if (m <= 6.5e-5) tmp = (k ^ m) * (a / (1.0 + (k * (k + 10.0)))); else tmp = a * (k ^ m); end tmp_2 = tmp; end
code[a_, k_, m_] := If[LessEqual[m, 6.5e-5], N[(N[Power[k, m], $MachinePrecision] * N[(a / N[(1.0 + N[(k * N[(k + 10.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * N[Power[k, m], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;m \leq 6.5 \cdot 10^{-5}:\\
\;\;\;\;{k}^{m} \cdot \frac{a}{1 + k \cdot \left(k + 10\right)}\\
\mathbf{else}:\\
\;\;\;\;a \cdot {k}^{m}\\
\end{array}
\end{array}
(FPCore (a k m) :precision binary64 (let* ((t_0 (* a (pow k m)))) (if (<= m 6.5e-5) (/ t_0 (+ 1.0 (* k k))) t_0)))
double code(double a, double k, double m) {
double t_0 = a * pow(k, m);
double tmp;
if (m <= 6.5e-5) {
tmp = t_0 / (1.0 + (k * k));
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(a, k, m)
real(8), intent (in) :: a
real(8), intent (in) :: k
real(8), intent (in) :: m
real(8) :: t_0
real(8) :: tmp
t_0 = a * (k ** m)
if (m <= 6.5d-5) then
tmp = t_0 / (1.0d0 + (k * k))
else
tmp = t_0
end if
code = tmp
end function
public static double code(double a, double k, double m) {
double t_0 = a * Math.pow(k, m);
double tmp;
if (m <= 6.5e-5) {
tmp = t_0 / (1.0 + (k * k));
} else {
tmp = t_0;
}
return tmp;
}
def code(a, k, m): t_0 = a * math.pow(k, m) tmp = 0 if m <= 6.5e-5: tmp = t_0 / (1.0 + (k * k)) else: tmp = t_0 return tmp
function code(a, k, m) t_0 = Float64(a * (k ^ m)) tmp = 0.0 if (m <= 6.5e-5) tmp = Float64(t_0 / Float64(1.0 + Float64(k * k))); else tmp = t_0; end return tmp end
function tmp_2 = code(a, k, m) t_0 = a * (k ^ m); tmp = 0.0; if (m <= 6.5e-5) tmp = t_0 / (1.0 + (k * k)); else tmp = t_0; end tmp_2 = tmp; end
code[a_, k_, m_] := Block[{t$95$0 = N[(a * N[Power[k, m], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[m, 6.5e-5], N[(t$95$0 / N[(1.0 + N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := a \cdot {k}^{m}\\
\mathbf{if}\;m \leq 6.5 \cdot 10^{-5}:\\
\;\;\;\;\frac{t_0}{1 + k \cdot k}\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\end{array}
(FPCore (a k m) :precision binary64 (if (or (<= m -5e-9) (not (<= m 2.45e-5))) (* a (pow k m)) (/ a (+ (* k k) (+ 1.0 (* k 10.0))))))
double code(double a, double k, double m) {
double tmp;
if ((m <= -5e-9) || !(m <= 2.45e-5)) {
tmp = a * pow(k, m);
} else {
tmp = a / ((k * k) + (1.0 + (k * 10.0)));
}
return tmp;
}
real(8) function code(a, k, m)
real(8), intent (in) :: a
real(8), intent (in) :: k
real(8), intent (in) :: m
real(8) :: tmp
if ((m <= (-5d-9)) .or. (.not. (m <= 2.45d-5))) then
tmp = a * (k ** m)
else
tmp = a / ((k * k) + (1.0d0 + (k * 10.0d0)))
end if
code = tmp
end function
public static double code(double a, double k, double m) {
double tmp;
if ((m <= -5e-9) || !(m <= 2.45e-5)) {
tmp = a * Math.pow(k, m);
} else {
tmp = a / ((k * k) + (1.0 + (k * 10.0)));
}
return tmp;
}
def code(a, k, m): tmp = 0 if (m <= -5e-9) or not (m <= 2.45e-5): tmp = a * math.pow(k, m) else: tmp = a / ((k * k) + (1.0 + (k * 10.0))) return tmp
function code(a, k, m) tmp = 0.0 if ((m <= -5e-9) || !(m <= 2.45e-5)) tmp = Float64(a * (k ^ m)); else tmp = Float64(a / Float64(Float64(k * k) + Float64(1.0 + Float64(k * 10.0)))); end return tmp end
function tmp_2 = code(a, k, m) tmp = 0.0; if ((m <= -5e-9) || ~((m <= 2.45e-5))) tmp = a * (k ^ m); else tmp = a / ((k * k) + (1.0 + (k * 10.0))); end tmp_2 = tmp; end
code[a_, k_, m_] := If[Or[LessEqual[m, -5e-9], N[Not[LessEqual[m, 2.45e-5]], $MachinePrecision]], N[(a * N[Power[k, m], $MachinePrecision]), $MachinePrecision], N[(a / N[(N[(k * k), $MachinePrecision] + N[(1.0 + N[(k * 10.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;m \leq -5 \cdot 10^{-9} \lor \neg \left(m \leq 2.45 \cdot 10^{-5}\right):\\
\;\;\;\;a \cdot {k}^{m}\\
\mathbf{else}:\\
\;\;\;\;\frac{a}{k \cdot k + \left(1 + k \cdot 10\right)}\\
\end{array}
\end{array}
(FPCore (a k m)
:precision binary64
(let* ((t_0 (* k (+ k 10.0))))
(if (<= m -50.0)
(* (/ a (- 1.0 (* t_0 t_0))) (- 1.0 (* k 10.0)))
(/ a (+ (* k k) (+ 1.0 (* k 10.0)))))))
double code(double a, double k, double m) {
double t_0 = k * (k + 10.0);
double tmp;
if (m <= -50.0) {
tmp = (a / (1.0 - (t_0 * t_0))) * (1.0 - (k * 10.0));
} else {
tmp = a / ((k * k) + (1.0 + (k * 10.0)));
}
return tmp;
}
real(8) function code(a, k, m)
real(8), intent (in) :: a
real(8), intent (in) :: k
real(8), intent (in) :: m
real(8) :: t_0
real(8) :: tmp
t_0 = k * (k + 10.0d0)
if (m <= (-50.0d0)) then
tmp = (a / (1.0d0 - (t_0 * t_0))) * (1.0d0 - (k * 10.0d0))
else
tmp = a / ((k * k) + (1.0d0 + (k * 10.0d0)))
end if
code = tmp
end function
public static double code(double a, double k, double m) {
double t_0 = k * (k + 10.0);
double tmp;
if (m <= -50.0) {
tmp = (a / (1.0 - (t_0 * t_0))) * (1.0 - (k * 10.0));
} else {
tmp = a / ((k * k) + (1.0 + (k * 10.0)));
}
return tmp;
}
def code(a, k, m): t_0 = k * (k + 10.0) tmp = 0 if m <= -50.0: tmp = (a / (1.0 - (t_0 * t_0))) * (1.0 - (k * 10.0)) else: tmp = a / ((k * k) + (1.0 + (k * 10.0))) return tmp
function code(a, k, m) t_0 = Float64(k * Float64(k + 10.0)) tmp = 0.0 if (m <= -50.0) tmp = Float64(Float64(a / Float64(1.0 - Float64(t_0 * t_0))) * Float64(1.0 - Float64(k * 10.0))); else tmp = Float64(a / Float64(Float64(k * k) + Float64(1.0 + Float64(k * 10.0)))); end return tmp end
function tmp_2 = code(a, k, m) t_0 = k * (k + 10.0); tmp = 0.0; if (m <= -50.0) tmp = (a / (1.0 - (t_0 * t_0))) * (1.0 - (k * 10.0)); else tmp = a / ((k * k) + (1.0 + (k * 10.0))); end tmp_2 = tmp; end
code[a_, k_, m_] := Block[{t$95$0 = N[(k * N[(k + 10.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[m, -50.0], N[(N[(a / N[(1.0 - N[(t$95$0 * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(1.0 - N[(k * 10.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a / N[(N[(k * k), $MachinePrecision] + N[(1.0 + N[(k * 10.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := k \cdot \left(k + 10\right)\\
\mathbf{if}\;m \leq -50:\\
\;\;\;\;\frac{a}{1 - t_0 \cdot t_0} \cdot \left(1 - k \cdot 10\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{a}{k \cdot k + \left(1 + k \cdot 10\right)}\\
\end{array}
\end{array}
(FPCore (a k m) :precision binary64 (if (<= k -5e-311) (/ a (/ (- k) 0.1)) (if (<= k 4.2e-9) (+ a (* -10.0 (* a k))) (/ 0.1 (/ k a)))))
double code(double a, double k, double m) {
double tmp;
if (k <= -5e-311) {
tmp = a / (-k / 0.1);
} else if (k <= 4.2e-9) {
tmp = a + (-10.0 * (a * k));
} else {
tmp = 0.1 / (k / a);
}
return tmp;
}
real(8) function code(a, k, m)
real(8), intent (in) :: a
real(8), intent (in) :: k
real(8), intent (in) :: m
real(8) :: tmp
if (k <= (-5d-311)) then
tmp = a / (-k / 0.1d0)
else if (k <= 4.2d-9) then
tmp = a + ((-10.0d0) * (a * k))
else
tmp = 0.1d0 / (k / a)
end if
code = tmp
end function
public static double code(double a, double k, double m) {
double tmp;
if (k <= -5e-311) {
tmp = a / (-k / 0.1);
} else if (k <= 4.2e-9) {
tmp = a + (-10.0 * (a * k));
} else {
tmp = 0.1 / (k / a);
}
return tmp;
}
def code(a, k, m): tmp = 0 if k <= -5e-311: tmp = a / (-k / 0.1) elif k <= 4.2e-9: tmp = a + (-10.0 * (a * k)) else: tmp = 0.1 / (k / a) return tmp
function code(a, k, m) tmp = 0.0 if (k <= -5e-311) tmp = Float64(a / Float64(Float64(-k) / 0.1)); elseif (k <= 4.2e-9) tmp = Float64(a + Float64(-10.0 * Float64(a * k))); else tmp = Float64(0.1 / Float64(k / a)); end return tmp end
function tmp_2 = code(a, k, m) tmp = 0.0; if (k <= -5e-311) tmp = a / (-k / 0.1); elseif (k <= 4.2e-9) tmp = a + (-10.0 * (a * k)); else tmp = 0.1 / (k / a); end tmp_2 = tmp; end
code[a_, k_, m_] := If[LessEqual[k, -5e-311], N[(a / N[((-k) / 0.1), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 4.2e-9], N[(a + N[(-10.0 * N[(a * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.1 / N[(k / a), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;k \leq -5 \cdot 10^{-311}:\\
\;\;\;\;\frac{a}{\frac{-k}{0.1}}\\
\mathbf{elif}\;k \leq 4.2 \cdot 10^{-9}:\\
\;\;\;\;a + -10 \cdot \left(a \cdot k\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{0.1}{\frac{k}{a}}\\
\end{array}
\end{array}
(FPCore (a k m) :precision binary64 (if (or (<= k 2.7e-303) (not (<= k 59000000000.0))) (* (/ a k) 0.1) a))
double code(double a, double k, double m) {
double tmp;
if ((k <= 2.7e-303) || !(k <= 59000000000.0)) {
tmp = (a / k) * 0.1;
} else {
tmp = a;
}
return tmp;
}
real(8) function code(a, k, m)
real(8), intent (in) :: a
real(8), intent (in) :: k
real(8), intent (in) :: m
real(8) :: tmp
if ((k <= 2.7d-303) .or. (.not. (k <= 59000000000.0d0))) then
tmp = (a / k) * 0.1d0
else
tmp = a
end if
code = tmp
end function
public static double code(double a, double k, double m) {
double tmp;
if ((k <= 2.7e-303) || !(k <= 59000000000.0)) {
tmp = (a / k) * 0.1;
} else {
tmp = a;
}
return tmp;
}
def code(a, k, m): tmp = 0 if (k <= 2.7e-303) or not (k <= 59000000000.0): tmp = (a / k) * 0.1 else: tmp = a return tmp
function code(a, k, m) tmp = 0.0 if ((k <= 2.7e-303) || !(k <= 59000000000.0)) tmp = Float64(Float64(a / k) * 0.1); else tmp = a; end return tmp end
function tmp_2 = code(a, k, m) tmp = 0.0; if ((k <= 2.7e-303) || ~((k <= 59000000000.0))) tmp = (a / k) * 0.1; else tmp = a; end tmp_2 = tmp; end
code[a_, k_, m_] := If[Or[LessEqual[k, 2.7e-303], N[Not[LessEqual[k, 59000000000.0]], $MachinePrecision]], N[(N[(a / k), $MachinePrecision] * 0.1), $MachinePrecision], a]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;k \leq 2.7 \cdot 10^{-303} \lor \neg \left(k \leq 59000000000\right):\\
\;\;\;\;\frac{a}{k} \cdot 0.1\\
\mathbf{else}:\\
\;\;\;\;a\\
\end{array}
\end{array}
(FPCore (a k m) :precision binary64 (if (<= k 2.7e-303) (* (/ a k) 0.1) (if (<= k 59000000000.0) a (/ 0.1 (/ k a)))))
double code(double a, double k, double m) {
double tmp;
if (k <= 2.7e-303) {
tmp = (a / k) * 0.1;
} else if (k <= 59000000000.0) {
tmp = a;
} else {
tmp = 0.1 / (k / a);
}
return tmp;
}
real(8) function code(a, k, m)
real(8), intent (in) :: a
real(8), intent (in) :: k
real(8), intent (in) :: m
real(8) :: tmp
if (k <= 2.7d-303) then
tmp = (a / k) * 0.1d0
else if (k <= 59000000000.0d0) then
tmp = a
else
tmp = 0.1d0 / (k / a)
end if
code = tmp
end function
public static double code(double a, double k, double m) {
double tmp;
if (k <= 2.7e-303) {
tmp = (a / k) * 0.1;
} else if (k <= 59000000000.0) {
tmp = a;
} else {
tmp = 0.1 / (k / a);
}
return tmp;
}
def code(a, k, m): tmp = 0 if k <= 2.7e-303: tmp = (a / k) * 0.1 elif k <= 59000000000.0: tmp = a else: tmp = 0.1 / (k / a) return tmp
function code(a, k, m) tmp = 0.0 if (k <= 2.7e-303) tmp = Float64(Float64(a / k) * 0.1); elseif (k <= 59000000000.0) tmp = a; else tmp = Float64(0.1 / Float64(k / a)); end return tmp end
function tmp_2 = code(a, k, m) tmp = 0.0; if (k <= 2.7e-303) tmp = (a / k) * 0.1; elseif (k <= 59000000000.0) tmp = a; else tmp = 0.1 / (k / a); end tmp_2 = tmp; end
code[a_, k_, m_] := If[LessEqual[k, 2.7e-303], N[(N[(a / k), $MachinePrecision] * 0.1), $MachinePrecision], If[LessEqual[k, 59000000000.0], a, N[(0.1 / N[(k / a), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;k \leq 2.7 \cdot 10^{-303}:\\
\;\;\;\;\frac{a}{k} \cdot 0.1\\
\mathbf{elif}\;k \leq 59000000000:\\
\;\;\;\;a\\
\mathbf{else}:\\
\;\;\;\;\frac{0.1}{\frac{k}{a}}\\
\end{array}
\end{array}
(FPCore (a k m) :precision binary64 (if (<= k -5e-311) (/ a (/ (- k) 0.1)) (if (<= k 59000000000.0) a (/ 0.1 (/ k a)))))
double code(double a, double k, double m) {
double tmp;
if (k <= -5e-311) {
tmp = a / (-k / 0.1);
} else if (k <= 59000000000.0) {
tmp = a;
} else {
tmp = 0.1 / (k / a);
}
return tmp;
}
real(8) function code(a, k, m)
real(8), intent (in) :: a
real(8), intent (in) :: k
real(8), intent (in) :: m
real(8) :: tmp
if (k <= (-5d-311)) then
tmp = a / (-k / 0.1d0)
else if (k <= 59000000000.0d0) then
tmp = a
else
tmp = 0.1d0 / (k / a)
end if
code = tmp
end function
public static double code(double a, double k, double m) {
double tmp;
if (k <= -5e-311) {
tmp = a / (-k / 0.1);
} else if (k <= 59000000000.0) {
tmp = a;
} else {
tmp = 0.1 / (k / a);
}
return tmp;
}
def code(a, k, m): tmp = 0 if k <= -5e-311: tmp = a / (-k / 0.1) elif k <= 59000000000.0: tmp = a else: tmp = 0.1 / (k / a) return tmp
function code(a, k, m) tmp = 0.0 if (k <= -5e-311) tmp = Float64(a / Float64(Float64(-k) / 0.1)); elseif (k <= 59000000000.0) tmp = a; else tmp = Float64(0.1 / Float64(k / a)); end return tmp end
function tmp_2 = code(a, k, m) tmp = 0.0; if (k <= -5e-311) tmp = a / (-k / 0.1); elseif (k <= 59000000000.0) tmp = a; else tmp = 0.1 / (k / a); end tmp_2 = tmp; end
code[a_, k_, m_] := If[LessEqual[k, -5e-311], N[(a / N[((-k) / 0.1), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 59000000000.0], a, N[(0.1 / N[(k / a), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;k \leq -5 \cdot 10^{-311}:\\
\;\;\;\;\frac{a}{\frac{-k}{0.1}}\\
\mathbf{elif}\;k \leq 59000000000:\\
\;\;\;\;a\\
\mathbf{else}:\\
\;\;\;\;\frac{0.1}{\frac{k}{a}}\\
\end{array}
\end{array}
(FPCore (a k m) :precision binary64 (if (<= m -2.25e+51) (* (/ a k) 0.1) (/ a (+ 1.0 (* k 10.0)))))
double code(double a, double k, double m) {
double tmp;
if (m <= -2.25e+51) {
tmp = (a / k) * 0.1;
} else {
tmp = a / (1.0 + (k * 10.0));
}
return tmp;
}
real(8) function code(a, k, m)
real(8), intent (in) :: a
real(8), intent (in) :: k
real(8), intent (in) :: m
real(8) :: tmp
if (m <= (-2.25d+51)) then
tmp = (a / k) * 0.1d0
else
tmp = a / (1.0d0 + (k * 10.0d0))
end if
code = tmp
end function
public static double code(double a, double k, double m) {
double tmp;
if (m <= -2.25e+51) {
tmp = (a / k) * 0.1;
} else {
tmp = a / (1.0 + (k * 10.0));
}
return tmp;
}
def code(a, k, m): tmp = 0 if m <= -2.25e+51: tmp = (a / k) * 0.1 else: tmp = a / (1.0 + (k * 10.0)) return tmp
function code(a, k, m) tmp = 0.0 if (m <= -2.25e+51) tmp = Float64(Float64(a / k) * 0.1); else tmp = Float64(a / Float64(1.0 + Float64(k * 10.0))); end return tmp end
function tmp_2 = code(a, k, m) tmp = 0.0; if (m <= -2.25e+51) tmp = (a / k) * 0.1; else tmp = a / (1.0 + (k * 10.0)); end tmp_2 = tmp; end
code[a_, k_, m_] := If[LessEqual[m, -2.25e+51], N[(N[(a / k), $MachinePrecision] * 0.1), $MachinePrecision], N[(a / N[(1.0 + N[(k * 10.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;m \leq -2.25 \cdot 10^{+51}:\\
\;\;\;\;\frac{a}{k} \cdot 0.1\\
\mathbf{else}:\\
\;\;\;\;\frac{a}{1 + k \cdot 10}\\
\end{array}
\end{array}
(FPCore (a k m) :precision binary64 (/ a (+ (* k k) (+ 1.0 (* k 10.0)))))
double code(double a, double k, double m) {
return a / ((k * k) + (1.0 + (k * 10.0)));
}
real(8) function code(a, k, m)
real(8), intent (in) :: a
real(8), intent (in) :: k
real(8), intent (in) :: m
code = a / ((k * k) + (1.0d0 + (k * 10.0d0)))
end function
public static double code(double a, double k, double m) {
return a / ((k * k) + (1.0 + (k * 10.0)));
}
def code(a, k, m): return a / ((k * k) + (1.0 + (k * 10.0)))
function code(a, k, m) return Float64(a / Float64(Float64(k * k) + Float64(1.0 + Float64(k * 10.0)))) end
function tmp = code(a, k, m) tmp = a / ((k * k) + (1.0 + (k * 10.0))); end
code[a_, k_, m_] := N[(a / N[(N[(k * k), $MachinePrecision] + N[(1.0 + N[(k * 10.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{a}{k \cdot k + \left(1 + k \cdot 10\right)}
\end{array}
(FPCore (a k m) :precision binary64 (/ a (+ 1.0 (* k (+ k 10.0)))))
double code(double a, double k, double m) {
return a / (1.0 + (k * (k + 10.0)));
}
real(8) function code(a, k, m)
real(8), intent (in) :: a
real(8), intent (in) :: k
real(8), intent (in) :: m
code = a / (1.0d0 + (k * (k + 10.0d0)))
end function
public static double code(double a, double k, double m) {
return a / (1.0 + (k * (k + 10.0)));
}
def code(a, k, m): return a / (1.0 + (k * (k + 10.0)))
function code(a, k, m) return Float64(a / Float64(1.0 + Float64(k * Float64(k + 10.0)))) end
function tmp = code(a, k, m) tmp = a / (1.0 + (k * (k + 10.0))); end
code[a_, k_, m_] := N[(a / N[(1.0 + N[(k * N[(k + 10.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{a}{1 + k \cdot \left(k + 10\right)}
\end{array}
(FPCore (a k m) :precision binary64 (/ a (+ 1.0 (* k k))))
double code(double a, double k, double m) {
return a / (1.0 + (k * k));
}
real(8) function code(a, k, m)
real(8), intent (in) :: a
real(8), intent (in) :: k
real(8), intent (in) :: m
code = a / (1.0d0 + (k * k))
end function
public static double code(double a, double k, double m) {
return a / (1.0 + (k * k));
}
def code(a, k, m): return a / (1.0 + (k * k))
function code(a, k, m) return Float64(a / Float64(1.0 + Float64(k * k))) end
function tmp = code(a, k, m) tmp = a / (1.0 + (k * k)); end
code[a_, k_, m_] := N[(a / N[(1.0 + N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{a}{1 + k \cdot k}
\end{array}
(FPCore (a k m) :precision binary64 a)
double code(double a, double k, double m) {
return a;
}
real(8) function code(a, k, m)
real(8), intent (in) :: a
real(8), intent (in) :: k
real(8), intent (in) :: m
code = a
end function
public static double code(double a, double k, double m) {
return a;
}
def code(a, k, m): return a
function code(a, k, m) return a end
function tmp = code(a, k, m) tmp = a; end
code[a_, k_, m_] := a
\begin{array}{l}
\\
a
\end{array}
herbie shell --seed 2024006
(FPCore (a k m)
:name "Falkner and Boettcher, Appendix A"
:precision binary64
(/ (* a (pow k m)) (+ (+ 1.0 (* 10.0 k)) (* k k))))