
(FPCore (J l K U) :precision binary64 (+ (* (* J (- (exp l) (exp (- l)))) (cos (/ K 2.0))) U))
double code(double J, double l, double K, double U) {
return ((J * (exp(l) - exp(-l))) * cos((K / 2.0))) + U;
}
real(8) function code(j, l, k, u)
real(8), intent (in) :: j
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8), intent (in) :: u
code = ((j * (exp(l) - exp(-l))) * cos((k / 2.0d0))) + u
end function
public static double code(double J, double l, double K, double U) {
return ((J * (Math.exp(l) - Math.exp(-l))) * Math.cos((K / 2.0))) + U;
}
def code(J, l, K, U): return ((J * (math.exp(l) - math.exp(-l))) * math.cos((K / 2.0))) + U
function code(J, l, K, U) return Float64(Float64(Float64(J * Float64(exp(l) - exp(Float64(-l)))) * cos(Float64(K / 2.0))) + U) end
function tmp = code(J, l, K, U) tmp = ((J * (exp(l) - exp(-l))) * cos((K / 2.0))) + U; end
code[J_, l_, K_, U_] := N[(N[(N[(J * N[(N[Exp[l], $MachinePrecision] - N[Exp[(-l)], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Cos[N[(K / 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] + U), $MachinePrecision]
\begin{array}{l}
\\
\left(J \cdot \left(e^{\ell} - e^{-\ell}\right)\right) \cdot \cos \left(\frac{K}{2}\right) + U
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 11 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (J l K U) :precision binary64 (+ (* (* J (- (exp l) (exp (- l)))) (cos (/ K 2.0))) U))
double code(double J, double l, double K, double U) {
return ((J * (exp(l) - exp(-l))) * cos((K / 2.0))) + U;
}
real(8) function code(j, l, k, u)
real(8), intent (in) :: j
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8), intent (in) :: u
code = ((j * (exp(l) - exp(-l))) * cos((k / 2.0d0))) + u
end function
public static double code(double J, double l, double K, double U) {
return ((J * (Math.exp(l) - Math.exp(-l))) * Math.cos((K / 2.0))) + U;
}
def code(J, l, K, U): return ((J * (math.exp(l) - math.exp(-l))) * math.cos((K / 2.0))) + U
function code(J, l, K, U) return Float64(Float64(Float64(J * Float64(exp(l) - exp(Float64(-l)))) * cos(Float64(K / 2.0))) + U) end
function tmp = code(J, l, K, U) tmp = ((J * (exp(l) - exp(-l))) * cos((K / 2.0))) + U; end
code[J_, l_, K_, U_] := N[(N[(N[(J * N[(N[Exp[l], $MachinePrecision] - N[Exp[(-l)], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Cos[N[(K / 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] + U), $MachinePrecision]
\begin{array}{l}
\\
\left(J \cdot \left(e^{\ell} - e^{-\ell}\right)\right) \cdot \cos \left(\frac{K}{2}\right) + U
\end{array}
(FPCore (J l K U)
:precision binary64
(let* ((t_0 (- (exp l) (exp (- l)))))
(if (or (<= t_0 (- INFINITY)) (not (<= t_0 0.0)))
(+ (* (cos (* 0.5 K)) (* J (* 2.0 (log (exp l))))) U)
(+
U
(*
(*
J
(+
(* 0.016666666666666666 (pow l 5.0))
(+ (* 0.3333333333333333 (pow l 3.0)) (* l 2.0))))
(cos (/ K 2.0)))))))
double code(double J, double l, double K, double U) {
double t_0 = exp(l) - exp(-l);
double tmp;
if ((t_0 <= -((double) INFINITY)) || !(t_0 <= 0.0)) {
tmp = (cos((0.5 * K)) * (J * (2.0 * log(exp(l))))) + U;
} else {
tmp = U + ((J * ((0.016666666666666666 * pow(l, 5.0)) + ((0.3333333333333333 * pow(l, 3.0)) + (l * 2.0)))) * cos((K / 2.0)));
}
return tmp;
}
public static double code(double J, double l, double K, double U) {
double t_0 = Math.exp(l) - Math.exp(-l);
double tmp;
if ((t_0 <= -Double.POSITIVE_INFINITY) || !(t_0 <= 0.0)) {
tmp = (Math.cos((0.5 * K)) * (J * (2.0 * Math.log(Math.exp(l))))) + U;
} else {
tmp = U + ((J * ((0.016666666666666666 * Math.pow(l, 5.0)) + ((0.3333333333333333 * Math.pow(l, 3.0)) + (l * 2.0)))) * Math.cos((K / 2.0)));
}
return tmp;
}
def code(J, l, K, U): t_0 = math.exp(l) - math.exp(-l) tmp = 0 if (t_0 <= -math.inf) or not (t_0 <= 0.0): tmp = (math.cos((0.5 * K)) * (J * (2.0 * math.log(math.exp(l))))) + U else: tmp = U + ((J * ((0.016666666666666666 * math.pow(l, 5.0)) + ((0.3333333333333333 * math.pow(l, 3.0)) + (l * 2.0)))) * math.cos((K / 2.0))) return tmp
function code(J, l, K, U) t_0 = Float64(exp(l) - exp(Float64(-l))) tmp = 0.0 if ((t_0 <= Float64(-Inf)) || !(t_0 <= 0.0)) tmp = Float64(Float64(cos(Float64(0.5 * K)) * Float64(J * Float64(2.0 * log(exp(l))))) + U); else tmp = Float64(U + Float64(Float64(J * Float64(Float64(0.016666666666666666 * (l ^ 5.0)) + Float64(Float64(0.3333333333333333 * (l ^ 3.0)) + Float64(l * 2.0)))) * cos(Float64(K / 2.0)))); end return tmp end
function tmp_2 = code(J, l, K, U) t_0 = exp(l) - exp(-l); tmp = 0.0; if ((t_0 <= -Inf) || ~((t_0 <= 0.0))) tmp = (cos((0.5 * K)) * (J * (2.0 * log(exp(l))))) + U; else tmp = U + ((J * ((0.016666666666666666 * (l ^ 5.0)) + ((0.3333333333333333 * (l ^ 3.0)) + (l * 2.0)))) * cos((K / 2.0))); end tmp_2 = tmp; end
code[J_, l_, K_, U_] := Block[{t$95$0 = N[(N[Exp[l], $MachinePrecision] - N[Exp[(-l)], $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$0, (-Infinity)], N[Not[LessEqual[t$95$0, 0.0]], $MachinePrecision]], N[(N[(N[Cos[N[(0.5 * K), $MachinePrecision]], $MachinePrecision] * N[(J * N[(2.0 * N[Log[N[Exp[l], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + U), $MachinePrecision], N[(U + N[(N[(J * N[(N[(0.016666666666666666 * N[Power[l, 5.0], $MachinePrecision]), $MachinePrecision] + N[(N[(0.3333333333333333 * N[Power[l, 3.0], $MachinePrecision]), $MachinePrecision] + N[(l * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Cos[N[(K / 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := e^{\ell} - e^{-\ell}\\
\mathbf{if}\;t_0 \leq -\infty \lor \neg \left(t_0 \leq 0\right):\\
\;\;\;\;\cos \left(0.5 \cdot K\right) \cdot \left(J \cdot \left(2 \cdot \log \left(e^{\ell}\right)\right)\right) + U\\
\mathbf{else}:\\
\;\;\;\;U + \left(J \cdot \left(0.016666666666666666 \cdot {\ell}^{5} + \left(0.3333333333333333 \cdot {\ell}^{3} + \ell \cdot 2\right)\right)\right) \cdot \cos \left(\frac{K}{2}\right)\\
\end{array}
\end{array}
(FPCore (J l K U)
:precision binary64
(let* ((t_0 (- (exp l) (exp (- l)))))
(if (or (<= t_0 (- INFINITY)) (not (<= t_0 0.0)))
(+ (* (cos (* 0.5 K)) (* J (* 2.0 (log (exp l))))) U)
(+
U
(*
(cos (/ K 2.0))
(* J (+ (* 0.3333333333333333 (pow l 3.0)) (* l 2.0))))))))
double code(double J, double l, double K, double U) {
double t_0 = exp(l) - exp(-l);
double tmp;
if ((t_0 <= -((double) INFINITY)) || !(t_0 <= 0.0)) {
tmp = (cos((0.5 * K)) * (J * (2.0 * log(exp(l))))) + U;
} else {
tmp = U + (cos((K / 2.0)) * (J * ((0.3333333333333333 * pow(l, 3.0)) + (l * 2.0))));
}
return tmp;
}
public static double code(double J, double l, double K, double U) {
double t_0 = Math.exp(l) - Math.exp(-l);
double tmp;
if ((t_0 <= -Double.POSITIVE_INFINITY) || !(t_0 <= 0.0)) {
tmp = (Math.cos((0.5 * K)) * (J * (2.0 * Math.log(Math.exp(l))))) + U;
} else {
tmp = U + (Math.cos((K / 2.0)) * (J * ((0.3333333333333333 * Math.pow(l, 3.0)) + (l * 2.0))));
}
return tmp;
}
def code(J, l, K, U): t_0 = math.exp(l) - math.exp(-l) tmp = 0 if (t_0 <= -math.inf) or not (t_0 <= 0.0): tmp = (math.cos((0.5 * K)) * (J * (2.0 * math.log(math.exp(l))))) + U else: tmp = U + (math.cos((K / 2.0)) * (J * ((0.3333333333333333 * math.pow(l, 3.0)) + (l * 2.0)))) return tmp
function code(J, l, K, U) t_0 = Float64(exp(l) - exp(Float64(-l))) tmp = 0.0 if ((t_0 <= Float64(-Inf)) || !(t_0 <= 0.0)) tmp = Float64(Float64(cos(Float64(0.5 * K)) * Float64(J * Float64(2.0 * log(exp(l))))) + U); else tmp = Float64(U + Float64(cos(Float64(K / 2.0)) * Float64(J * Float64(Float64(0.3333333333333333 * (l ^ 3.0)) + Float64(l * 2.0))))); end return tmp end
function tmp_2 = code(J, l, K, U) t_0 = exp(l) - exp(-l); tmp = 0.0; if ((t_0 <= -Inf) || ~((t_0 <= 0.0))) tmp = (cos((0.5 * K)) * (J * (2.0 * log(exp(l))))) + U; else tmp = U + (cos((K / 2.0)) * (J * ((0.3333333333333333 * (l ^ 3.0)) + (l * 2.0)))); end tmp_2 = tmp; end
code[J_, l_, K_, U_] := Block[{t$95$0 = N[(N[Exp[l], $MachinePrecision] - N[Exp[(-l)], $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$0, (-Infinity)], N[Not[LessEqual[t$95$0, 0.0]], $MachinePrecision]], N[(N[(N[Cos[N[(0.5 * K), $MachinePrecision]], $MachinePrecision] * N[(J * N[(2.0 * N[Log[N[Exp[l], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + U), $MachinePrecision], N[(U + N[(N[Cos[N[(K / 2.0), $MachinePrecision]], $MachinePrecision] * N[(J * N[(N[(0.3333333333333333 * N[Power[l, 3.0], $MachinePrecision]), $MachinePrecision] + N[(l * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := e^{\ell} - e^{-\ell}\\
\mathbf{if}\;t_0 \leq -\infty \lor \neg \left(t_0 \leq 0\right):\\
\;\;\;\;\cos \left(0.5 \cdot K\right) \cdot \left(J \cdot \left(2 \cdot \log \left(e^{\ell}\right)\right)\right) + U\\
\mathbf{else}:\\
\;\;\;\;U + \cos \left(\frac{K}{2}\right) \cdot \left(J \cdot \left(0.3333333333333333 \cdot {\ell}^{3} + \ell \cdot 2\right)\right)\\
\end{array}
\end{array}
(FPCore (J l K U)
:precision binary64
(let* ((t_0 (- (exp l) (exp (- l)))) (t_1 (cos (/ K 2.0))))
(if (<= t_0 -0.002)
(+ U (* t_1 (* t_0 J)))
(if (<= t_0 0.0)
(+ U (* t_1 (* J (+ (* 0.3333333333333333 (pow l 3.0)) (* l 2.0)))))
(+ (* (cos (* 0.5 K)) (* J (* 2.0 (log (exp l))))) U)))))
double code(double J, double l, double K, double U) {
double t_0 = exp(l) - exp(-l);
double t_1 = cos((K / 2.0));
double tmp;
if (t_0 <= -0.002) {
tmp = U + (t_1 * (t_0 * J));
} else if (t_0 <= 0.0) {
tmp = U + (t_1 * (J * ((0.3333333333333333 * pow(l, 3.0)) + (l * 2.0))));
} else {
tmp = (cos((0.5 * K)) * (J * (2.0 * log(exp(l))))) + U;
}
return tmp;
}
real(8) function code(j, l, k, u)
real(8), intent (in) :: j
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8), intent (in) :: u
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = exp(l) - exp(-l)
t_1 = cos((k / 2.0d0))
if (t_0 <= (-0.002d0)) then
tmp = u + (t_1 * (t_0 * j))
else if (t_0 <= 0.0d0) then
tmp = u + (t_1 * (j * ((0.3333333333333333d0 * (l ** 3.0d0)) + (l * 2.0d0))))
else
tmp = (cos((0.5d0 * k)) * (j * (2.0d0 * log(exp(l))))) + u
end if
code = tmp
end function
public static double code(double J, double l, double K, double U) {
double t_0 = Math.exp(l) - Math.exp(-l);
double t_1 = Math.cos((K / 2.0));
double tmp;
if (t_0 <= -0.002) {
tmp = U + (t_1 * (t_0 * J));
} else if (t_0 <= 0.0) {
tmp = U + (t_1 * (J * ((0.3333333333333333 * Math.pow(l, 3.0)) + (l * 2.0))));
} else {
tmp = (Math.cos((0.5 * K)) * (J * (2.0 * Math.log(Math.exp(l))))) + U;
}
return tmp;
}
def code(J, l, K, U): t_0 = math.exp(l) - math.exp(-l) t_1 = math.cos((K / 2.0)) tmp = 0 if t_0 <= -0.002: tmp = U + (t_1 * (t_0 * J)) elif t_0 <= 0.0: tmp = U + (t_1 * (J * ((0.3333333333333333 * math.pow(l, 3.0)) + (l * 2.0)))) else: tmp = (math.cos((0.5 * K)) * (J * (2.0 * math.log(math.exp(l))))) + U return tmp
function code(J, l, K, U) t_0 = Float64(exp(l) - exp(Float64(-l))) t_1 = cos(Float64(K / 2.0)) tmp = 0.0 if (t_0 <= -0.002) tmp = Float64(U + Float64(t_1 * Float64(t_0 * J))); elseif (t_0 <= 0.0) tmp = Float64(U + Float64(t_1 * Float64(J * Float64(Float64(0.3333333333333333 * (l ^ 3.0)) + Float64(l * 2.0))))); else tmp = Float64(Float64(cos(Float64(0.5 * K)) * Float64(J * Float64(2.0 * log(exp(l))))) + U); end return tmp end
function tmp_2 = code(J, l, K, U) t_0 = exp(l) - exp(-l); t_1 = cos((K / 2.0)); tmp = 0.0; if (t_0 <= -0.002) tmp = U + (t_1 * (t_0 * J)); elseif (t_0 <= 0.0) tmp = U + (t_1 * (J * ((0.3333333333333333 * (l ^ 3.0)) + (l * 2.0)))); else tmp = (cos((0.5 * K)) * (J * (2.0 * log(exp(l))))) + U; end tmp_2 = tmp; end
code[J_, l_, K_, U_] := Block[{t$95$0 = N[(N[Exp[l], $MachinePrecision] - N[Exp[(-l)], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Cos[N[(K / 2.0), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$0, -0.002], N[(U + N[(t$95$1 * N[(t$95$0 * J), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 0.0], N[(U + N[(t$95$1 * N[(J * N[(N[(0.3333333333333333 * N[Power[l, 3.0], $MachinePrecision]), $MachinePrecision] + N[(l * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[Cos[N[(0.5 * K), $MachinePrecision]], $MachinePrecision] * N[(J * N[(2.0 * N[Log[N[Exp[l], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + U), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := e^{\ell} - e^{-\ell}\\
t_1 := \cos \left(\frac{K}{2}\right)\\
\mathbf{if}\;t_0 \leq -0.002:\\
\;\;\;\;U + t_1 \cdot \left(t_0 \cdot J\right)\\
\mathbf{elif}\;t_0 \leq 0:\\
\;\;\;\;U + t_1 \cdot \left(J \cdot \left(0.3333333333333333 \cdot {\ell}^{3} + \ell \cdot 2\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\cos \left(0.5 \cdot K\right) \cdot \left(J \cdot \left(2 \cdot \log \left(e^{\ell}\right)\right)\right) + U\\
\end{array}
\end{array}
(FPCore (J l K U)
:precision binary64
(let* ((t_0
(+ U (* 0.016666666666666666 (* J (* (cos (* 0.5 K)) (pow l 5.0))))))
(t_1 (+ U (* (- (exp l) (exp (- l))) J))))
(if (<= l -6.2e+47)
t_0
(if (<= l -0.42)
t_1
(if (<= l 1000000.0)
(+
U
(*
(cos (/ K 2.0))
(* J (+ (* 0.3333333333333333 (pow l 3.0)) (* l 2.0)))))
(if (<= l 1.95e+53) t_1 t_0))))))
double code(double J, double l, double K, double U) {
double t_0 = U + (0.016666666666666666 * (J * (cos((0.5 * K)) * pow(l, 5.0))));
double t_1 = U + ((exp(l) - exp(-l)) * J);
double tmp;
if (l <= -6.2e+47) {
tmp = t_0;
} else if (l <= -0.42) {
tmp = t_1;
} else if (l <= 1000000.0) {
tmp = U + (cos((K / 2.0)) * (J * ((0.3333333333333333 * pow(l, 3.0)) + (l * 2.0))));
} else if (l <= 1.95e+53) {
tmp = t_1;
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(j, l, k, u)
real(8), intent (in) :: j
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8), intent (in) :: u
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = u + (0.016666666666666666d0 * (j * (cos((0.5d0 * k)) * (l ** 5.0d0))))
t_1 = u + ((exp(l) - exp(-l)) * j)
if (l <= (-6.2d+47)) then
tmp = t_0
else if (l <= (-0.42d0)) then
tmp = t_1
else if (l <= 1000000.0d0) then
tmp = u + (cos((k / 2.0d0)) * (j * ((0.3333333333333333d0 * (l ** 3.0d0)) + (l * 2.0d0))))
else if (l <= 1.95d+53) then
tmp = t_1
else
tmp = t_0
end if
code = tmp
end function
public static double code(double J, double l, double K, double U) {
double t_0 = U + (0.016666666666666666 * (J * (Math.cos((0.5 * K)) * Math.pow(l, 5.0))));
double t_1 = U + ((Math.exp(l) - Math.exp(-l)) * J);
double tmp;
if (l <= -6.2e+47) {
tmp = t_0;
} else if (l <= -0.42) {
tmp = t_1;
} else if (l <= 1000000.0) {
tmp = U + (Math.cos((K / 2.0)) * (J * ((0.3333333333333333 * Math.pow(l, 3.0)) + (l * 2.0))));
} else if (l <= 1.95e+53) {
tmp = t_1;
} else {
tmp = t_0;
}
return tmp;
}
def code(J, l, K, U): t_0 = U + (0.016666666666666666 * (J * (math.cos((0.5 * K)) * math.pow(l, 5.0)))) t_1 = U + ((math.exp(l) - math.exp(-l)) * J) tmp = 0 if l <= -6.2e+47: tmp = t_0 elif l <= -0.42: tmp = t_1 elif l <= 1000000.0: tmp = U + (math.cos((K / 2.0)) * (J * ((0.3333333333333333 * math.pow(l, 3.0)) + (l * 2.0)))) elif l <= 1.95e+53: tmp = t_1 else: tmp = t_0 return tmp
function code(J, l, K, U) t_0 = Float64(U + Float64(0.016666666666666666 * Float64(J * Float64(cos(Float64(0.5 * K)) * (l ^ 5.0))))) t_1 = Float64(U + Float64(Float64(exp(l) - exp(Float64(-l))) * J)) tmp = 0.0 if (l <= -6.2e+47) tmp = t_0; elseif (l <= -0.42) tmp = t_1; elseif (l <= 1000000.0) tmp = Float64(U + Float64(cos(Float64(K / 2.0)) * Float64(J * Float64(Float64(0.3333333333333333 * (l ^ 3.0)) + Float64(l * 2.0))))); elseif (l <= 1.95e+53) tmp = t_1; else tmp = t_0; end return tmp end
function tmp_2 = code(J, l, K, U) t_0 = U + (0.016666666666666666 * (J * (cos((0.5 * K)) * (l ^ 5.0)))); t_1 = U + ((exp(l) - exp(-l)) * J); tmp = 0.0; if (l <= -6.2e+47) tmp = t_0; elseif (l <= -0.42) tmp = t_1; elseif (l <= 1000000.0) tmp = U + (cos((K / 2.0)) * (J * ((0.3333333333333333 * (l ^ 3.0)) + (l * 2.0)))); elseif (l <= 1.95e+53) tmp = t_1; else tmp = t_0; end tmp_2 = tmp; end
code[J_, l_, K_, U_] := Block[{t$95$0 = N[(U + N[(0.016666666666666666 * N[(J * N[(N[Cos[N[(0.5 * K), $MachinePrecision]], $MachinePrecision] * N[Power[l, 5.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(U + N[(N[(N[Exp[l], $MachinePrecision] - N[Exp[(-l)], $MachinePrecision]), $MachinePrecision] * J), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[l, -6.2e+47], t$95$0, If[LessEqual[l, -0.42], t$95$1, If[LessEqual[l, 1000000.0], N[(U + N[(N[Cos[N[(K / 2.0), $MachinePrecision]], $MachinePrecision] * N[(J * N[(N[(0.3333333333333333 * N[Power[l, 3.0], $MachinePrecision]), $MachinePrecision] + N[(l * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[l, 1.95e+53], t$95$1, t$95$0]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := U + 0.016666666666666666 \cdot \left(J \cdot \left(\cos \left(0.5 \cdot K\right) \cdot {\ell}^{5}\right)\right)\\
t_1 := U + \left(e^{\ell} - e^{-\ell}\right) \cdot J\\
\mathbf{if}\;\ell \leq -6.2 \cdot 10^{+47}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;\ell \leq -0.42:\\
\;\;\;\;t_1\\
\mathbf{elif}\;\ell \leq 1000000:\\
\;\;\;\;U + \cos \left(\frac{K}{2}\right) \cdot \left(J \cdot \left(0.3333333333333333 \cdot {\ell}^{3} + \ell \cdot 2\right)\right)\\
\mathbf{elif}\;\ell \leq 1.95 \cdot 10^{+53}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\end{array}
(FPCore (J l K U)
:precision binary64
(let* ((t_0 (cos (* 0.5 K)))
(t_1 (+ U (* 0.016666666666666666 (* J (* t_0 (pow l 5.0))))))
(t_2 (+ U (* (- (exp l) (exp (- l))) J))))
(if (<= l -6.2e+47)
t_1
(if (<= l -0.0095)
t_2
(if (<= l 1000000.0)
(+ U (* 2.0 (* J (* l t_0))))
(if (<= l 1.95e+53) t_2 t_1))))))
double code(double J, double l, double K, double U) {
double t_0 = cos((0.5 * K));
double t_1 = U + (0.016666666666666666 * (J * (t_0 * pow(l, 5.0))));
double t_2 = U + ((exp(l) - exp(-l)) * J);
double tmp;
if (l <= -6.2e+47) {
tmp = t_1;
} else if (l <= -0.0095) {
tmp = t_2;
} else if (l <= 1000000.0) {
tmp = U + (2.0 * (J * (l * t_0)));
} else if (l <= 1.95e+53) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(j, l, k, u)
real(8), intent (in) :: j
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8), intent (in) :: u
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_0 = cos((0.5d0 * k))
t_1 = u + (0.016666666666666666d0 * (j * (t_0 * (l ** 5.0d0))))
t_2 = u + ((exp(l) - exp(-l)) * j)
if (l <= (-6.2d+47)) then
tmp = t_1
else if (l <= (-0.0095d0)) then
tmp = t_2
else if (l <= 1000000.0d0) then
tmp = u + (2.0d0 * (j * (l * t_0)))
else if (l <= 1.95d+53) then
tmp = t_2
else
tmp = t_1
end if
code = tmp
end function
public static double code(double J, double l, double K, double U) {
double t_0 = Math.cos((0.5 * K));
double t_1 = U + (0.016666666666666666 * (J * (t_0 * Math.pow(l, 5.0))));
double t_2 = U + ((Math.exp(l) - Math.exp(-l)) * J);
double tmp;
if (l <= -6.2e+47) {
tmp = t_1;
} else if (l <= -0.0095) {
tmp = t_2;
} else if (l <= 1000000.0) {
tmp = U + (2.0 * (J * (l * t_0)));
} else if (l <= 1.95e+53) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
def code(J, l, K, U): t_0 = math.cos((0.5 * K)) t_1 = U + (0.016666666666666666 * (J * (t_0 * math.pow(l, 5.0)))) t_2 = U + ((math.exp(l) - math.exp(-l)) * J) tmp = 0 if l <= -6.2e+47: tmp = t_1 elif l <= -0.0095: tmp = t_2 elif l <= 1000000.0: tmp = U + (2.0 * (J * (l * t_0))) elif l <= 1.95e+53: tmp = t_2 else: tmp = t_1 return tmp
function code(J, l, K, U) t_0 = cos(Float64(0.5 * K)) t_1 = Float64(U + Float64(0.016666666666666666 * Float64(J * Float64(t_0 * (l ^ 5.0))))) t_2 = Float64(U + Float64(Float64(exp(l) - exp(Float64(-l))) * J)) tmp = 0.0 if (l <= -6.2e+47) tmp = t_1; elseif (l <= -0.0095) tmp = t_2; elseif (l <= 1000000.0) tmp = Float64(U + Float64(2.0 * Float64(J * Float64(l * t_0)))); elseif (l <= 1.95e+53) tmp = t_2; else tmp = t_1; end return tmp end
function tmp_2 = code(J, l, K, U) t_0 = cos((0.5 * K)); t_1 = U + (0.016666666666666666 * (J * (t_0 * (l ^ 5.0)))); t_2 = U + ((exp(l) - exp(-l)) * J); tmp = 0.0; if (l <= -6.2e+47) tmp = t_1; elseif (l <= -0.0095) tmp = t_2; elseif (l <= 1000000.0) tmp = U + (2.0 * (J * (l * t_0))); elseif (l <= 1.95e+53) tmp = t_2; else tmp = t_1; end tmp_2 = tmp; end
code[J_, l_, K_, U_] := Block[{t$95$0 = N[Cos[N[(0.5 * K), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(U + N[(0.016666666666666666 * N[(J * N[(t$95$0 * N[Power[l, 5.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(U + N[(N[(N[Exp[l], $MachinePrecision] - N[Exp[(-l)], $MachinePrecision]), $MachinePrecision] * J), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[l, -6.2e+47], t$95$1, If[LessEqual[l, -0.0095], t$95$2, If[LessEqual[l, 1000000.0], N[(U + N[(2.0 * N[(J * N[(l * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[l, 1.95e+53], t$95$2, t$95$1]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \cos \left(0.5 \cdot K\right)\\
t_1 := U + 0.016666666666666666 \cdot \left(J \cdot \left(t_0 \cdot {\ell}^{5}\right)\right)\\
t_2 := U + \left(e^{\ell} - e^{-\ell}\right) \cdot J\\
\mathbf{if}\;\ell \leq -6.2 \cdot 10^{+47}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;\ell \leq -0.0095:\\
\;\;\;\;t_2\\
\mathbf{elif}\;\ell \leq 1000000:\\
\;\;\;\;U + 2 \cdot \left(J \cdot \left(\ell \cdot t_0\right)\right)\\
\mathbf{elif}\;\ell \leq 1.95 \cdot 10^{+53}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
(FPCore (J l K U)
:precision binary64
(let* ((t_0 (+ U (* (- (exp l) (exp (- l))) J))))
(if (<= l -0.0029)
t_0
(if (<= l 1000000.0)
(+ U (* 2.0 (* J (* l (cos (* 0.5 K))))))
(if (<= l 1.55e+255)
t_0
(+ U (* l (* 2.0 (+ J (* -0.125 (* J (pow K 2.0))))))))))))
double code(double J, double l, double K, double U) {
double t_0 = U + ((exp(l) - exp(-l)) * J);
double tmp;
if (l <= -0.0029) {
tmp = t_0;
} else if (l <= 1000000.0) {
tmp = U + (2.0 * (J * (l * cos((0.5 * K)))));
} else if (l <= 1.55e+255) {
tmp = t_0;
} else {
tmp = U + (l * (2.0 * (J + (-0.125 * (J * pow(K, 2.0))))));
}
return tmp;
}
real(8) function code(j, l, k, u)
real(8), intent (in) :: j
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8), intent (in) :: u
real(8) :: t_0
real(8) :: tmp
t_0 = u + ((exp(l) - exp(-l)) * j)
if (l <= (-0.0029d0)) then
tmp = t_0
else if (l <= 1000000.0d0) then
tmp = u + (2.0d0 * (j * (l * cos((0.5d0 * k)))))
else if (l <= 1.55d+255) then
tmp = t_0
else
tmp = u + (l * (2.0d0 * (j + ((-0.125d0) * (j * (k ** 2.0d0))))))
end if
code = tmp
end function
public static double code(double J, double l, double K, double U) {
double t_0 = U + ((Math.exp(l) - Math.exp(-l)) * J);
double tmp;
if (l <= -0.0029) {
tmp = t_0;
} else if (l <= 1000000.0) {
tmp = U + (2.0 * (J * (l * Math.cos((0.5 * K)))));
} else if (l <= 1.55e+255) {
tmp = t_0;
} else {
tmp = U + (l * (2.0 * (J + (-0.125 * (J * Math.pow(K, 2.0))))));
}
return tmp;
}
def code(J, l, K, U): t_0 = U + ((math.exp(l) - math.exp(-l)) * J) tmp = 0 if l <= -0.0029: tmp = t_0 elif l <= 1000000.0: tmp = U + (2.0 * (J * (l * math.cos((0.5 * K))))) elif l <= 1.55e+255: tmp = t_0 else: tmp = U + (l * (2.0 * (J + (-0.125 * (J * math.pow(K, 2.0)))))) return tmp
function code(J, l, K, U) t_0 = Float64(U + Float64(Float64(exp(l) - exp(Float64(-l))) * J)) tmp = 0.0 if (l <= -0.0029) tmp = t_0; elseif (l <= 1000000.0) tmp = Float64(U + Float64(2.0 * Float64(J * Float64(l * cos(Float64(0.5 * K)))))); elseif (l <= 1.55e+255) tmp = t_0; else tmp = Float64(U + Float64(l * Float64(2.0 * Float64(J + Float64(-0.125 * Float64(J * (K ^ 2.0))))))); end return tmp end
function tmp_2 = code(J, l, K, U) t_0 = U + ((exp(l) - exp(-l)) * J); tmp = 0.0; if (l <= -0.0029) tmp = t_0; elseif (l <= 1000000.0) tmp = U + (2.0 * (J * (l * cos((0.5 * K))))); elseif (l <= 1.55e+255) tmp = t_0; else tmp = U + (l * (2.0 * (J + (-0.125 * (J * (K ^ 2.0)))))); end tmp_2 = tmp; end
code[J_, l_, K_, U_] := Block[{t$95$0 = N[(U + N[(N[(N[Exp[l], $MachinePrecision] - N[Exp[(-l)], $MachinePrecision]), $MachinePrecision] * J), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[l, -0.0029], t$95$0, If[LessEqual[l, 1000000.0], N[(U + N[(2.0 * N[(J * N[(l * N[Cos[N[(0.5 * K), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[l, 1.55e+255], t$95$0, N[(U + N[(l * N[(2.0 * N[(J + N[(-0.125 * N[(J * N[Power[K, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := U + \left(e^{\ell} - e^{-\ell}\right) \cdot J\\
\mathbf{if}\;\ell \leq -0.0029:\\
\;\;\;\;t_0\\
\mathbf{elif}\;\ell \leq 1000000:\\
\;\;\;\;U + 2 \cdot \left(J \cdot \left(\ell \cdot \cos \left(0.5 \cdot K\right)\right)\right)\\
\mathbf{elif}\;\ell \leq 1.55 \cdot 10^{+255}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;U + \ell \cdot \left(2 \cdot \left(J + -0.125 \cdot \left(J \cdot {K}^{2}\right)\right)\right)\\
\end{array}
\end{array}
(FPCore (J l K U)
:precision binary64
(let* ((t_0 (+ U (* 0.016666666666666666 (* J (pow l 5.0))))))
(if (<= l -620000000.0)
t_0
(if (<= l 5800000.0)
(+ U (* 2.0 (* J (* l (cos (* 0.5 K))))))
(if (<= l 1.4e+252)
t_0
(+ U (* l (* 2.0 (+ J (* -0.125 (* J (pow K 2.0))))))))))))
double code(double J, double l, double K, double U) {
double t_0 = U + (0.016666666666666666 * (J * pow(l, 5.0)));
double tmp;
if (l <= -620000000.0) {
tmp = t_0;
} else if (l <= 5800000.0) {
tmp = U + (2.0 * (J * (l * cos((0.5 * K)))));
} else if (l <= 1.4e+252) {
tmp = t_0;
} else {
tmp = U + (l * (2.0 * (J + (-0.125 * (J * pow(K, 2.0))))));
}
return tmp;
}
real(8) function code(j, l, k, u)
real(8), intent (in) :: j
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8), intent (in) :: u
real(8) :: t_0
real(8) :: tmp
t_0 = u + (0.016666666666666666d0 * (j * (l ** 5.0d0)))
if (l <= (-620000000.0d0)) then
tmp = t_0
else if (l <= 5800000.0d0) then
tmp = u + (2.0d0 * (j * (l * cos((0.5d0 * k)))))
else if (l <= 1.4d+252) then
tmp = t_0
else
tmp = u + (l * (2.0d0 * (j + ((-0.125d0) * (j * (k ** 2.0d0))))))
end if
code = tmp
end function
public static double code(double J, double l, double K, double U) {
double t_0 = U + (0.016666666666666666 * (J * Math.pow(l, 5.0)));
double tmp;
if (l <= -620000000.0) {
tmp = t_0;
} else if (l <= 5800000.0) {
tmp = U + (2.0 * (J * (l * Math.cos((0.5 * K)))));
} else if (l <= 1.4e+252) {
tmp = t_0;
} else {
tmp = U + (l * (2.0 * (J + (-0.125 * (J * Math.pow(K, 2.0))))));
}
return tmp;
}
def code(J, l, K, U): t_0 = U + (0.016666666666666666 * (J * math.pow(l, 5.0))) tmp = 0 if l <= -620000000.0: tmp = t_0 elif l <= 5800000.0: tmp = U + (2.0 * (J * (l * math.cos((0.5 * K))))) elif l <= 1.4e+252: tmp = t_0 else: tmp = U + (l * (2.0 * (J + (-0.125 * (J * math.pow(K, 2.0)))))) return tmp
function code(J, l, K, U) t_0 = Float64(U + Float64(0.016666666666666666 * Float64(J * (l ^ 5.0)))) tmp = 0.0 if (l <= -620000000.0) tmp = t_0; elseif (l <= 5800000.0) tmp = Float64(U + Float64(2.0 * Float64(J * Float64(l * cos(Float64(0.5 * K)))))); elseif (l <= 1.4e+252) tmp = t_0; else tmp = Float64(U + Float64(l * Float64(2.0 * Float64(J + Float64(-0.125 * Float64(J * (K ^ 2.0))))))); end return tmp end
function tmp_2 = code(J, l, K, U) t_0 = U + (0.016666666666666666 * (J * (l ^ 5.0))); tmp = 0.0; if (l <= -620000000.0) tmp = t_0; elseif (l <= 5800000.0) tmp = U + (2.0 * (J * (l * cos((0.5 * K))))); elseif (l <= 1.4e+252) tmp = t_0; else tmp = U + (l * (2.0 * (J + (-0.125 * (J * (K ^ 2.0)))))); end tmp_2 = tmp; end
code[J_, l_, K_, U_] := Block[{t$95$0 = N[(U + N[(0.016666666666666666 * N[(J * N[Power[l, 5.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[l, -620000000.0], t$95$0, If[LessEqual[l, 5800000.0], N[(U + N[(2.0 * N[(J * N[(l * N[Cos[N[(0.5 * K), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[l, 1.4e+252], t$95$0, N[(U + N[(l * N[(2.0 * N[(J + N[(-0.125 * N[(J * N[Power[K, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := U + 0.016666666666666666 \cdot \left(J \cdot {\ell}^{5}\right)\\
\mathbf{if}\;\ell \leq -620000000:\\
\;\;\;\;t_0\\
\mathbf{elif}\;\ell \leq 5800000:\\
\;\;\;\;U + 2 \cdot \left(J \cdot \left(\ell \cdot \cos \left(0.5 \cdot K\right)\right)\right)\\
\mathbf{elif}\;\ell \leq 1.4 \cdot 10^{+252}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;U + \ell \cdot \left(2 \cdot \left(J + -0.125 \cdot \left(J \cdot {K}^{2}\right)\right)\right)\\
\end{array}
\end{array}
(FPCore (J l K U) :precision binary64 (if (or (<= l -1460000.0) (not (<= l 5800000.0))) (+ U (* 0.016666666666666666 (* J (pow l 5.0)))) (+ U (* 2.0 (* J (* l (cos (* 0.5 K))))))))
double code(double J, double l, double K, double U) {
double tmp;
if ((l <= -1460000.0) || !(l <= 5800000.0)) {
tmp = U + (0.016666666666666666 * (J * pow(l, 5.0)));
} else {
tmp = U + (2.0 * (J * (l * cos((0.5 * K)))));
}
return tmp;
}
real(8) function code(j, l, k, u)
real(8), intent (in) :: j
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8), intent (in) :: u
real(8) :: tmp
if ((l <= (-1460000.0d0)) .or. (.not. (l <= 5800000.0d0))) then
tmp = u + (0.016666666666666666d0 * (j * (l ** 5.0d0)))
else
tmp = u + (2.0d0 * (j * (l * cos((0.5d0 * k)))))
end if
code = tmp
end function
public static double code(double J, double l, double K, double U) {
double tmp;
if ((l <= -1460000.0) || !(l <= 5800000.0)) {
tmp = U + (0.016666666666666666 * (J * Math.pow(l, 5.0)));
} else {
tmp = U + (2.0 * (J * (l * Math.cos((0.5 * K)))));
}
return tmp;
}
def code(J, l, K, U): tmp = 0 if (l <= -1460000.0) or not (l <= 5800000.0): tmp = U + (0.016666666666666666 * (J * math.pow(l, 5.0))) else: tmp = U + (2.0 * (J * (l * math.cos((0.5 * K))))) return tmp
function code(J, l, K, U) tmp = 0.0 if ((l <= -1460000.0) || !(l <= 5800000.0)) tmp = Float64(U + Float64(0.016666666666666666 * Float64(J * (l ^ 5.0)))); else tmp = Float64(U + Float64(2.0 * Float64(J * Float64(l * cos(Float64(0.5 * K)))))); end return tmp end
function tmp_2 = code(J, l, K, U) tmp = 0.0; if ((l <= -1460000.0) || ~((l <= 5800000.0))) tmp = U + (0.016666666666666666 * (J * (l ^ 5.0))); else tmp = U + (2.0 * (J * (l * cos((0.5 * K))))); end tmp_2 = tmp; end
code[J_, l_, K_, U_] := If[Or[LessEqual[l, -1460000.0], N[Not[LessEqual[l, 5800000.0]], $MachinePrecision]], N[(U + N[(0.016666666666666666 * N[(J * N[Power[l, 5.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(U + N[(2.0 * N[(J * N[(l * N[Cos[N[(0.5 * K), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq -1460000 \lor \neg \left(\ell \leq 5800000\right):\\
\;\;\;\;U + 0.016666666666666666 \cdot \left(J \cdot {\ell}^{5}\right)\\
\mathbf{else}:\\
\;\;\;\;U + 2 \cdot \left(J \cdot \left(\ell \cdot \cos \left(0.5 \cdot K\right)\right)\right)\\
\end{array}
\end{array}
(FPCore (J l K U) :precision binary64 (if (or (<= l -0.0019) (not (<= l 1000000.0))) (+ U (* 0.016666666666666666 (* J (pow l 5.0)))) (+ U (* l (* J 2.0)))))
double code(double J, double l, double K, double U) {
double tmp;
if ((l <= -0.0019) || !(l <= 1000000.0)) {
tmp = U + (0.016666666666666666 * (J * pow(l, 5.0)));
} else {
tmp = U + (l * (J * 2.0));
}
return tmp;
}
real(8) function code(j, l, k, u)
real(8), intent (in) :: j
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8), intent (in) :: u
real(8) :: tmp
if ((l <= (-0.0019d0)) .or. (.not. (l <= 1000000.0d0))) then
tmp = u + (0.016666666666666666d0 * (j * (l ** 5.0d0)))
else
tmp = u + (l * (j * 2.0d0))
end if
code = tmp
end function
public static double code(double J, double l, double K, double U) {
double tmp;
if ((l <= -0.0019) || !(l <= 1000000.0)) {
tmp = U + (0.016666666666666666 * (J * Math.pow(l, 5.0)));
} else {
tmp = U + (l * (J * 2.0));
}
return tmp;
}
def code(J, l, K, U): tmp = 0 if (l <= -0.0019) or not (l <= 1000000.0): tmp = U + (0.016666666666666666 * (J * math.pow(l, 5.0))) else: tmp = U + (l * (J * 2.0)) return tmp
function code(J, l, K, U) tmp = 0.0 if ((l <= -0.0019) || !(l <= 1000000.0)) tmp = Float64(U + Float64(0.016666666666666666 * Float64(J * (l ^ 5.0)))); else tmp = Float64(U + Float64(l * Float64(J * 2.0))); end return tmp end
function tmp_2 = code(J, l, K, U) tmp = 0.0; if ((l <= -0.0019) || ~((l <= 1000000.0))) tmp = U + (0.016666666666666666 * (J * (l ^ 5.0))); else tmp = U + (l * (J * 2.0)); end tmp_2 = tmp; end
code[J_, l_, K_, U_] := If[Or[LessEqual[l, -0.0019], N[Not[LessEqual[l, 1000000.0]], $MachinePrecision]], N[(U + N[(0.016666666666666666 * N[(J * N[Power[l, 5.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(U + N[(l * N[(J * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq -0.0019 \lor \neg \left(\ell \leq 1000000\right):\\
\;\;\;\;U + 0.016666666666666666 \cdot \left(J \cdot {\ell}^{5}\right)\\
\mathbf{else}:\\
\;\;\;\;U + \ell \cdot \left(J \cdot 2\right)\\
\end{array}
\end{array}
(FPCore (J l K U) :precision binary64 (+ U (* l (* J 2.0))))
double code(double J, double l, double K, double U) {
return U + (l * (J * 2.0));
}
real(8) function code(j, l, k, u)
real(8), intent (in) :: j
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8), intent (in) :: u
code = u + (l * (j * 2.0d0))
end function
public static double code(double J, double l, double K, double U) {
return U + (l * (J * 2.0));
}
def code(J, l, K, U): return U + (l * (J * 2.0))
function code(J, l, K, U) return Float64(U + Float64(l * Float64(J * 2.0))) end
function tmp = code(J, l, K, U) tmp = U + (l * (J * 2.0)); end
code[J_, l_, K_, U_] := N[(U + N[(l * N[(J * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
U + \ell \cdot \left(J \cdot 2\right)
\end{array}
(FPCore (J l K U) :precision binary64 U)
double code(double J, double l, double K, double U) {
return U;
}
real(8) function code(j, l, k, u)
real(8), intent (in) :: j
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8), intent (in) :: u
code = u
end function
public static double code(double J, double l, double K, double U) {
return U;
}
def code(J, l, K, U): return U
function code(J, l, K, U) return U end
function tmp = code(J, l, K, U) tmp = U; end
code[J_, l_, K_, U_] := U
\begin{array}{l}
\\
U
\end{array}
herbie shell --seed 2024010
(FPCore (J l K U)
:name "Maksimov and Kolovsky, Equation (4)"
:precision binary64
(+ (* (* J (- (exp l) (exp (- l)))) (cos (/ K 2.0))) U))