
(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 13 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
(let* ((t_0 (* a (pow k m))))
(if (<= (/ t_0 (+ (+ 1.0 (* k 10.0)) (* k k))) 1e+149)
(* (/ (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 / ((1.0 + (k * 10.0)) + (k * k))) <= 1e+149) {
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 / ((1.0 + (k * 10.0)) + (k * k))) <= 1e+149) {
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 / ((1.0 + (k * 10.0)) + (k * k))) <= 1e+149: 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(1.0 + Float64(k * 10.0)) + Float64(k * k))) <= 1e+149) 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 / ((1.0 + (k * 10.0)) + (k * k))) <= 1e+149) 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[(1.0 + N[(k * 10.0), $MachinePrecision]), $MachinePrecision] + N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1e+149], 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}{\left(1 + k \cdot 10\right) + k \cdot k} \leq 10^{+149}:\\
\;\;\;\;\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 (pow (/ (sqrt (* a (pow k m))) (hypot 1.0 k)) 2.0))
double code(double a, double k, double m) {
return pow((sqrt((a * pow(k, m))) / hypot(1.0, k)), 2.0);
}
public static double code(double a, double k, double m) {
return Math.pow((Math.sqrt((a * Math.pow(k, m))) / Math.hypot(1.0, k)), 2.0);
}
def code(a, k, m): return math.pow((math.sqrt((a * math.pow(k, m))) / math.hypot(1.0, k)), 2.0)
function code(a, k, m) return Float64(sqrt(Float64(a * (k ^ m))) / hypot(1.0, k)) ^ 2.0 end
function tmp = code(a, k, m) tmp = (sqrt((a * (k ^ m))) / hypot(1.0, k)) ^ 2.0; end
code[a_, k_, m_] := N[Power[N[(N[Sqrt[N[(a * N[Power[k, m], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[Sqrt[1.0 ^ 2 + k ^ 2], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]
\begin{array}{l}
\\
{\left(\frac{\sqrt{a \cdot {k}^{m}}}{\mathsf{hypot}\left(1, k\right)}\right)}^{2}
\end{array}
(FPCore (a k m)
:precision binary64
(let* ((t_0 (* a (pow k m))))
(if (<= (/ t_0 (+ (+ 1.0 (* k 10.0)) (* k k))) 5e+306)
(/ a (/ (+ 1.0 (* k (+ k 10.0))) (pow k m)))
t_0)))
double code(double a, double k, double m) {
double t_0 = a * pow(k, m);
double tmp;
if ((t_0 / ((1.0 + (k * 10.0)) + (k * k))) <= 5e+306) {
tmp = a / ((1.0 + (k * (k + 10.0))) / pow(k, m));
} 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 ((t_0 / ((1.0d0 + (k * 10.0d0)) + (k * k))) <= 5d+306) then
tmp = a / ((1.0d0 + (k * (k + 10.0d0))) / (k ** m))
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 ((t_0 / ((1.0 + (k * 10.0)) + (k * k))) <= 5e+306) {
tmp = a / ((1.0 + (k * (k + 10.0))) / Math.pow(k, m));
} else {
tmp = t_0;
}
return tmp;
}
def code(a, k, m): t_0 = a * math.pow(k, m) tmp = 0 if (t_0 / ((1.0 + (k * 10.0)) + (k * k))) <= 5e+306: tmp = a / ((1.0 + (k * (k + 10.0))) / math.pow(k, m)) 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(1.0 + Float64(k * 10.0)) + Float64(k * k))) <= 5e+306) tmp = Float64(a / Float64(Float64(1.0 + Float64(k * Float64(k + 10.0))) / (k ^ m))); 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 / ((1.0 + (k * 10.0)) + (k * k))) <= 5e+306) tmp = a / ((1.0 + (k * (k + 10.0))) / (k ^ m)); 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[(1.0 + N[(k * 10.0), $MachinePrecision]), $MachinePrecision] + N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 5e+306], N[(a / N[(N[(1.0 + N[(k * N[(k + 10.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Power[k, m], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := a \cdot {k}^{m}\\
\mathbf{if}\;\frac{t_0}{\left(1 + k \cdot 10\right) + k \cdot k} \leq 5 \cdot 10^{+306}:\\
\;\;\;\;\frac{a}{\frac{1 + k \cdot \left(k + 10\right)}{{k}^{m}}}\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\end{array}
(FPCore (a k m) :precision binary64 (let* ((t_0 (* a (pow k m)))) (if (<= m 3.1) (/ 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 <= 3.1) {
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 <= 3.1d0) 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 <= 3.1) {
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 <= 3.1: 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 <= 3.1) 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 <= 3.1) 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, 3.1], 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 3.1:\\
\;\;\;\;\frac{t_0}{1 + k \cdot k}\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\end{array}
(FPCore (a k m) :precision binary64 (if (or (<= m -0.00135) (not (<= m 9.5e-12))) (* a (pow k m)) (/ a (+ 1.0 (* k (+ k 10.0))))))
double code(double a, double k, double m) {
double tmp;
if ((m <= -0.00135) || !(m <= 9.5e-12)) {
tmp = a * pow(k, m);
} else {
tmp = a / (1.0 + (k * (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 <= (-0.00135d0)) .or. (.not. (m <= 9.5d-12))) then
tmp = a * (k ** m)
else
tmp = a / (1.0d0 + (k * (k + 10.0d0)))
end if
code = tmp
end function
public static double code(double a, double k, double m) {
double tmp;
if ((m <= -0.00135) || !(m <= 9.5e-12)) {
tmp = a * Math.pow(k, m);
} else {
tmp = a / (1.0 + (k * (k + 10.0)));
}
return tmp;
}
def code(a, k, m): tmp = 0 if (m <= -0.00135) or not (m <= 9.5e-12): tmp = a * math.pow(k, m) else: tmp = a / (1.0 + (k * (k + 10.0))) return tmp
function code(a, k, m) tmp = 0.0 if ((m <= -0.00135) || !(m <= 9.5e-12)) tmp = Float64(a * (k ^ m)); else tmp = Float64(a / Float64(1.0 + Float64(k * Float64(k + 10.0)))); end return tmp end
function tmp_2 = code(a, k, m) tmp = 0.0; if ((m <= -0.00135) || ~((m <= 9.5e-12))) tmp = a * (k ^ m); else tmp = a / (1.0 + (k * (k + 10.0))); end tmp_2 = tmp; end
code[a_, k_, m_] := If[Or[LessEqual[m, -0.00135], N[Not[LessEqual[m, 9.5e-12]], $MachinePrecision]], N[(a * N[Power[k, m], $MachinePrecision]), $MachinePrecision], N[(a / N[(1.0 + N[(k * N[(k + 10.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;m \leq -0.00135 \lor \neg \left(m \leq 9.5 \cdot 10^{-12}\right):\\
\;\;\;\;a \cdot {k}^{m}\\
\mathbf{else}:\\
\;\;\;\;\frac{a}{1 + k \cdot \left(k + 10\right)}\\
\end{array}
\end{array}
(FPCore (a k m) :precision binary64 (if (<= m -4.4e+91) (* (/ a k) 0.1) (if (<= m 2950000.0) (/ a (+ 1.0 (* k 10.0))) (* a (* k -10.0)))))
double code(double a, double k, double m) {
double tmp;
if (m <= -4.4e+91) {
tmp = (a / k) * 0.1;
} else if (m <= 2950000.0) {
tmp = a / (1.0 + (k * 10.0));
} else {
tmp = a * (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 <= (-4.4d+91)) then
tmp = (a / k) * 0.1d0
else if (m <= 2950000.0d0) then
tmp = a / (1.0d0 + (k * 10.0d0))
else
tmp = a * (k * (-10.0d0))
end if
code = tmp
end function
public static double code(double a, double k, double m) {
double tmp;
if (m <= -4.4e+91) {
tmp = (a / k) * 0.1;
} else if (m <= 2950000.0) {
tmp = a / (1.0 + (k * 10.0));
} else {
tmp = a * (k * -10.0);
}
return tmp;
}
def code(a, k, m): tmp = 0 if m <= -4.4e+91: tmp = (a / k) * 0.1 elif m <= 2950000.0: tmp = a / (1.0 + (k * 10.0)) else: tmp = a * (k * -10.0) return tmp
function code(a, k, m) tmp = 0.0 if (m <= -4.4e+91) tmp = Float64(Float64(a / k) * 0.1); elseif (m <= 2950000.0) tmp = Float64(a / Float64(1.0 + Float64(k * 10.0))); else tmp = Float64(a * Float64(k * -10.0)); end return tmp end
function tmp_2 = code(a, k, m) tmp = 0.0; if (m <= -4.4e+91) tmp = (a / k) * 0.1; elseif (m <= 2950000.0) tmp = a / (1.0 + (k * 10.0)); else tmp = a * (k * -10.0); end tmp_2 = tmp; end
code[a_, k_, m_] := If[LessEqual[m, -4.4e+91], N[(N[(a / k), $MachinePrecision] * 0.1), $MachinePrecision], If[LessEqual[m, 2950000.0], N[(a / N[(1.0 + N[(k * 10.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * N[(k * -10.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;m \leq -4.4 \cdot 10^{+91}:\\
\;\;\;\;\frac{a}{k} \cdot 0.1\\
\mathbf{elif}\;m \leq 2950000:\\
\;\;\;\;\frac{a}{1 + k \cdot 10}\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(k \cdot -10\right)\\
\end{array}
\end{array}
(FPCore (a k m) :precision binary64 (if (<= m 245000.0) (/ a (+ 1.0 (* k (+ k 10.0)))) (* a (* k -10.0))))
double code(double a, double k, double m) {
double tmp;
if (m <= 245000.0) {
tmp = a / (1.0 + (k * (k + 10.0)));
} else {
tmp = a * (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 <= 245000.0d0) then
tmp = a / (1.0d0 + (k * (k + 10.0d0)))
else
tmp = a * (k * (-10.0d0))
end if
code = tmp
end function
public static double code(double a, double k, double m) {
double tmp;
if (m <= 245000.0) {
tmp = a / (1.0 + (k * (k + 10.0)));
} else {
tmp = a * (k * -10.0);
}
return tmp;
}
def code(a, k, m): tmp = 0 if m <= 245000.0: tmp = a / (1.0 + (k * (k + 10.0))) else: tmp = a * (k * -10.0) return tmp
function code(a, k, m) tmp = 0.0 if (m <= 245000.0) tmp = Float64(a / Float64(1.0 + Float64(k * Float64(k + 10.0)))); else tmp = Float64(a * Float64(k * -10.0)); end return tmp end
function tmp_2 = code(a, k, m) tmp = 0.0; if (m <= 245000.0) tmp = a / (1.0 + (k * (k + 10.0))); else tmp = a * (k * -10.0); end tmp_2 = tmp; end
code[a_, k_, m_] := If[LessEqual[m, 245000.0], N[(a / N[(1.0 + N[(k * N[(k + 10.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * N[(k * -10.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;m \leq 245000:\\
\;\;\;\;\frac{a}{1 + k \cdot \left(k + 10\right)}\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(k \cdot -10\right)\\
\end{array}
\end{array}
(FPCore (a k m) :precision binary64 (if (<= m -1.4e-30) (* (/ a k) 0.1) (if (<= m 108000.0) a (* a (* k -10.0)))))
double code(double a, double k, double m) {
double tmp;
if (m <= -1.4e-30) {
tmp = (a / k) * 0.1;
} else if (m <= 108000.0) {
tmp = a;
} else {
tmp = a * (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 <= (-1.4d-30)) then
tmp = (a / k) * 0.1d0
else if (m <= 108000.0d0) then
tmp = a
else
tmp = a * (k * (-10.0d0))
end if
code = tmp
end function
public static double code(double a, double k, double m) {
double tmp;
if (m <= -1.4e-30) {
tmp = (a / k) * 0.1;
} else if (m <= 108000.0) {
tmp = a;
} else {
tmp = a * (k * -10.0);
}
return tmp;
}
def code(a, k, m): tmp = 0 if m <= -1.4e-30: tmp = (a / k) * 0.1 elif m <= 108000.0: tmp = a else: tmp = a * (k * -10.0) return tmp
function code(a, k, m) tmp = 0.0 if (m <= -1.4e-30) tmp = Float64(Float64(a / k) * 0.1); elseif (m <= 108000.0) tmp = a; else tmp = Float64(a * Float64(k * -10.0)); end return tmp end
function tmp_2 = code(a, k, m) tmp = 0.0; if (m <= -1.4e-30) tmp = (a / k) * 0.1; elseif (m <= 108000.0) tmp = a; else tmp = a * (k * -10.0); end tmp_2 = tmp; end
code[a_, k_, m_] := If[LessEqual[m, -1.4e-30], N[(N[(a / k), $MachinePrecision] * 0.1), $MachinePrecision], If[LessEqual[m, 108000.0], a, N[(a * N[(k * -10.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;m \leq -1.4 \cdot 10^{-30}:\\
\;\;\;\;\frac{a}{k} \cdot 0.1\\
\mathbf{elif}\;m \leq 108000:\\
\;\;\;\;a\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(k \cdot -10\right)\\
\end{array}
\end{array}
(FPCore (a k m) :precision binary64 (if (<= m -1.4e-30) (* (/ a k) 0.1) (if (<= m 235000.0) (/ -1.0 (/ -1.0 a)) (* a (* k -10.0)))))
double code(double a, double k, double m) {
double tmp;
if (m <= -1.4e-30) {
tmp = (a / k) * 0.1;
} else if (m <= 235000.0) {
tmp = -1.0 / (-1.0 / a);
} else {
tmp = a * (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 <= (-1.4d-30)) then
tmp = (a / k) * 0.1d0
else if (m <= 235000.0d0) then
tmp = (-1.0d0) / ((-1.0d0) / a)
else
tmp = a * (k * (-10.0d0))
end if
code = tmp
end function
public static double code(double a, double k, double m) {
double tmp;
if (m <= -1.4e-30) {
tmp = (a / k) * 0.1;
} else if (m <= 235000.0) {
tmp = -1.0 / (-1.0 / a);
} else {
tmp = a * (k * -10.0);
}
return tmp;
}
def code(a, k, m): tmp = 0 if m <= -1.4e-30: tmp = (a / k) * 0.1 elif m <= 235000.0: tmp = -1.0 / (-1.0 / a) else: tmp = a * (k * -10.0) return tmp
function code(a, k, m) tmp = 0.0 if (m <= -1.4e-30) tmp = Float64(Float64(a / k) * 0.1); elseif (m <= 235000.0) tmp = Float64(-1.0 / Float64(-1.0 / a)); else tmp = Float64(a * Float64(k * -10.0)); end return tmp end
function tmp_2 = code(a, k, m) tmp = 0.0; if (m <= -1.4e-30) tmp = (a / k) * 0.1; elseif (m <= 235000.0) tmp = -1.0 / (-1.0 / a); else tmp = a * (k * -10.0); end tmp_2 = tmp; end
code[a_, k_, m_] := If[LessEqual[m, -1.4e-30], N[(N[(a / k), $MachinePrecision] * 0.1), $MachinePrecision], If[LessEqual[m, 235000.0], N[(-1.0 / N[(-1.0 / a), $MachinePrecision]), $MachinePrecision], N[(a * N[(k * -10.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;m \leq -1.4 \cdot 10^{-30}:\\
\;\;\;\;\frac{a}{k} \cdot 0.1\\
\mathbf{elif}\;m \leq 235000:\\
\;\;\;\;\frac{-1}{\frac{-1}{a}}\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(k \cdot -10\right)\\
\end{array}
\end{array}
(FPCore (a k m) :precision binary64 (if (<= m 48000.0) (/ a (+ 1.0 (* k k))) (* a (* k -10.0))))
double code(double a, double k, double m) {
double tmp;
if (m <= 48000.0) {
tmp = a / (1.0 + (k * k));
} else {
tmp = a * (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 <= 48000.0d0) then
tmp = a / (1.0d0 + (k * k))
else
tmp = a * (k * (-10.0d0))
end if
code = tmp
end function
public static double code(double a, double k, double m) {
double tmp;
if (m <= 48000.0) {
tmp = a / (1.0 + (k * k));
} else {
tmp = a * (k * -10.0);
}
return tmp;
}
def code(a, k, m): tmp = 0 if m <= 48000.0: tmp = a / (1.0 + (k * k)) else: tmp = a * (k * -10.0) return tmp
function code(a, k, m) tmp = 0.0 if (m <= 48000.0) tmp = Float64(a / Float64(1.0 + Float64(k * k))); else tmp = Float64(a * Float64(k * -10.0)); end return tmp end
function tmp_2 = code(a, k, m) tmp = 0.0; if (m <= 48000.0) tmp = a / (1.0 + (k * k)); else tmp = a * (k * -10.0); end tmp_2 = tmp; end
code[a_, k_, m_] := If[LessEqual[m, 48000.0], N[(a / N[(1.0 + N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * N[(k * -10.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;m \leq 48000:\\
\;\;\;\;\frac{a}{1 + k \cdot k}\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(k \cdot -10\right)\\
\end{array}
\end{array}
(FPCore (a k m) :precision binary64 (if (<= m 176000.0) a (* -10.0 (* a k))))
double code(double a, double k, double m) {
double tmp;
if (m <= 176000.0) {
tmp = a;
} else {
tmp = -10.0 * (a * k);
}
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 <= 176000.0d0) then
tmp = a
else
tmp = (-10.0d0) * (a * k)
end if
code = tmp
end function
public static double code(double a, double k, double m) {
double tmp;
if (m <= 176000.0) {
tmp = a;
} else {
tmp = -10.0 * (a * k);
}
return tmp;
}
def code(a, k, m): tmp = 0 if m <= 176000.0: tmp = a else: tmp = -10.0 * (a * k) return tmp
function code(a, k, m) tmp = 0.0 if (m <= 176000.0) tmp = a; else tmp = Float64(-10.0 * Float64(a * k)); end return tmp end
function tmp_2 = code(a, k, m) tmp = 0.0; if (m <= 176000.0) tmp = a; else tmp = -10.0 * (a * k); end tmp_2 = tmp; end
code[a_, k_, m_] := If[LessEqual[m, 176000.0], a, N[(-10.0 * N[(a * k), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;m \leq 176000:\\
\;\;\;\;a\\
\mathbf{else}:\\
\;\;\;\;-10 \cdot \left(a \cdot k\right)\\
\end{array}
\end{array}
(FPCore (a k m) :precision binary64 (if (<= m 51000.0) a (* a (* k -10.0))))
double code(double a, double k, double m) {
double tmp;
if (m <= 51000.0) {
tmp = a;
} else {
tmp = a * (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 <= 51000.0d0) then
tmp = a
else
tmp = a * (k * (-10.0d0))
end if
code = tmp
end function
public static double code(double a, double k, double m) {
double tmp;
if (m <= 51000.0) {
tmp = a;
} else {
tmp = a * (k * -10.0);
}
return tmp;
}
def code(a, k, m): tmp = 0 if m <= 51000.0: tmp = a else: tmp = a * (k * -10.0) return tmp
function code(a, k, m) tmp = 0.0 if (m <= 51000.0) tmp = a; else tmp = Float64(a * Float64(k * -10.0)); end return tmp end
function tmp_2 = code(a, k, m) tmp = 0.0; if (m <= 51000.0) tmp = a; else tmp = a * (k * -10.0); end tmp_2 = tmp; end
code[a_, k_, m_] := If[LessEqual[m, 51000.0], a, N[(a * N[(k * -10.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;m \leq 51000:\\
\;\;\;\;a\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(k \cdot -10\right)\\
\end{array}
\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 2023364
(FPCore (a k m)
:name "Falkner and Boettcher, Appendix A"
:precision binary64
(/ (* a (pow k m)) (+ (+ 1.0 (* 10.0 k)) (* k k))))