
(FPCore (J K U) :precision binary64 (let* ((t_0 (cos (/ K 2.0)))) (* (* (* -2.0 J) t_0) (sqrt (+ 1.0 (pow (/ U (* (* 2.0 J) t_0)) 2.0))))))
double code(double J, double K, double U) {
double t_0 = cos((K / 2.0));
return ((-2.0 * J) * t_0) * sqrt((1.0 + pow((U / ((2.0 * J) * t_0)), 2.0)));
}
real(8) function code(j, k, u)
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8), intent (in) :: u
real(8) :: t_0
t_0 = cos((k / 2.0d0))
code = (((-2.0d0) * j) * t_0) * sqrt((1.0d0 + ((u / ((2.0d0 * j) * t_0)) ** 2.0d0)))
end function
public static double code(double J, double K, double U) {
double t_0 = Math.cos((K / 2.0));
return ((-2.0 * J) * t_0) * Math.sqrt((1.0 + Math.pow((U / ((2.0 * J) * t_0)), 2.0)));
}
def code(J, K, U): t_0 = math.cos((K / 2.0)) return ((-2.0 * J) * t_0) * math.sqrt((1.0 + math.pow((U / ((2.0 * J) * t_0)), 2.0)))
function code(J, K, U) t_0 = cos(Float64(K / 2.0)) return Float64(Float64(Float64(-2.0 * J) * t_0) * sqrt(Float64(1.0 + (Float64(U / Float64(Float64(2.0 * J) * t_0)) ^ 2.0)))) end
function tmp = code(J, K, U) t_0 = cos((K / 2.0)); tmp = ((-2.0 * J) * t_0) * sqrt((1.0 + ((U / ((2.0 * J) * t_0)) ^ 2.0))); end
code[J_, K_, U_] := Block[{t$95$0 = N[Cos[N[(K / 2.0), $MachinePrecision]], $MachinePrecision]}, N[(N[(N[(-2.0 * J), $MachinePrecision] * t$95$0), $MachinePrecision] * N[Sqrt[N[(1.0 + N[Power[N[(U / N[(N[(2.0 * J), $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \cos \left(\frac{K}{2}\right)\\
\left(\left(-2 \cdot J\right) \cdot t_0\right) \cdot \sqrt{1 + {\left(\frac{U}{\left(2 \cdot J\right) \cdot t_0}\right)}^{2}}
\end{array}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 9 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (J K U) :precision binary64 (let* ((t_0 (cos (/ K 2.0)))) (* (* (* -2.0 J) t_0) (sqrt (+ 1.0 (pow (/ U (* (* 2.0 J) t_0)) 2.0))))))
double code(double J, double K, double U) {
double t_0 = cos((K / 2.0));
return ((-2.0 * J) * t_0) * sqrt((1.0 + pow((U / ((2.0 * J) * t_0)), 2.0)));
}
real(8) function code(j, k, u)
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8), intent (in) :: u
real(8) :: t_0
t_0 = cos((k / 2.0d0))
code = (((-2.0d0) * j) * t_0) * sqrt((1.0d0 + ((u / ((2.0d0 * j) * t_0)) ** 2.0d0)))
end function
public static double code(double J, double K, double U) {
double t_0 = Math.cos((K / 2.0));
return ((-2.0 * J) * t_0) * Math.sqrt((1.0 + Math.pow((U / ((2.0 * J) * t_0)), 2.0)));
}
def code(J, K, U): t_0 = math.cos((K / 2.0)) return ((-2.0 * J) * t_0) * math.sqrt((1.0 + math.pow((U / ((2.0 * J) * t_0)), 2.0)))
function code(J, K, U) t_0 = cos(Float64(K / 2.0)) return Float64(Float64(Float64(-2.0 * J) * t_0) * sqrt(Float64(1.0 + (Float64(U / Float64(Float64(2.0 * J) * t_0)) ^ 2.0)))) end
function tmp = code(J, K, U) t_0 = cos((K / 2.0)); tmp = ((-2.0 * J) * t_0) * sqrt((1.0 + ((U / ((2.0 * J) * t_0)) ^ 2.0))); end
code[J_, K_, U_] := Block[{t$95$0 = N[Cos[N[(K / 2.0), $MachinePrecision]], $MachinePrecision]}, N[(N[(N[(-2.0 * J), $MachinePrecision] * t$95$0), $MachinePrecision] * N[Sqrt[N[(1.0 + N[Power[N[(U / N[(N[(2.0 * J), $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \cos \left(\frac{K}{2}\right)\\
\left(\left(-2 \cdot J\right) \cdot t_0\right) \cdot \sqrt{1 + {\left(\frac{U}{\left(2 \cdot J\right) \cdot t_0}\right)}^{2}}
\end{array}
\end{array}
NOTE: U should be positive before calling this function
(FPCore (J K U)
:precision binary64
(let* ((t_0 (cos (/ K 2.0)))
(t_1
(*
(* (* -2.0 J) t_0)
(sqrt (+ 1.0 (pow (/ U (* t_0 (* J 2.0))) 2.0))))))
(if (<= t_1 (- INFINITY))
(- U)
(if (<= t_1 5e+303)
(* (* J (* -2.0 t_0)) (hypot 1.0 (/ U (* J (* 2.0 t_0)))))
U))))U = abs(U);
double code(double J, double K, double U) {
double t_0 = cos((K / 2.0));
double t_1 = ((-2.0 * J) * t_0) * sqrt((1.0 + pow((U / (t_0 * (J * 2.0))), 2.0)));
double tmp;
if (t_1 <= -((double) INFINITY)) {
tmp = -U;
} else if (t_1 <= 5e+303) {
tmp = (J * (-2.0 * t_0)) * hypot(1.0, (U / (J * (2.0 * t_0))));
} else {
tmp = U;
}
return tmp;
}
U = Math.abs(U);
public static double code(double J, double K, double U) {
double t_0 = Math.cos((K / 2.0));
double t_1 = ((-2.0 * J) * t_0) * Math.sqrt((1.0 + Math.pow((U / (t_0 * (J * 2.0))), 2.0)));
double tmp;
if (t_1 <= -Double.POSITIVE_INFINITY) {
tmp = -U;
} else if (t_1 <= 5e+303) {
tmp = (J * (-2.0 * t_0)) * Math.hypot(1.0, (U / (J * (2.0 * t_0))));
} else {
tmp = U;
}
return tmp;
}
U = abs(U) def code(J, K, U): t_0 = math.cos((K / 2.0)) t_1 = ((-2.0 * J) * t_0) * math.sqrt((1.0 + math.pow((U / (t_0 * (J * 2.0))), 2.0))) tmp = 0 if t_1 <= -math.inf: tmp = -U elif t_1 <= 5e+303: tmp = (J * (-2.0 * t_0)) * math.hypot(1.0, (U / (J * (2.0 * t_0)))) else: tmp = U return tmp
U = abs(U) function code(J, K, U) t_0 = cos(Float64(K / 2.0)) t_1 = Float64(Float64(Float64(-2.0 * J) * t_0) * sqrt(Float64(1.0 + (Float64(U / Float64(t_0 * Float64(J * 2.0))) ^ 2.0)))) tmp = 0.0 if (t_1 <= Float64(-Inf)) tmp = Float64(-U); elseif (t_1 <= 5e+303) tmp = Float64(Float64(J * Float64(-2.0 * t_0)) * hypot(1.0, Float64(U / Float64(J * Float64(2.0 * t_0))))); else tmp = U; end return tmp end
U = abs(U) function tmp_2 = code(J, K, U) t_0 = cos((K / 2.0)); t_1 = ((-2.0 * J) * t_0) * sqrt((1.0 + ((U / (t_0 * (J * 2.0))) ^ 2.0))); tmp = 0.0; if (t_1 <= -Inf) tmp = -U; elseif (t_1 <= 5e+303) tmp = (J * (-2.0 * t_0)) * hypot(1.0, (U / (J * (2.0 * t_0)))); else tmp = U; end tmp_2 = tmp; end
NOTE: U should be positive before calling this function
code[J_, K_, U_] := Block[{t$95$0 = N[Cos[N[(K / 2.0), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(N[(N[(-2.0 * J), $MachinePrecision] * t$95$0), $MachinePrecision] * N[Sqrt[N[(1.0 + N[Power[N[(U / N[(t$95$0 * N[(J * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], (-U), If[LessEqual[t$95$1, 5e+303], N[(N[(J * N[(-2.0 * t$95$0), $MachinePrecision]), $MachinePrecision] * N[Sqrt[1.0 ^ 2 + N[(U / N[(J * N[(2.0 * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision], U]]]]
\begin{array}{l}
U = |U|\\
\\
\begin{array}{l}
t_0 := \cos \left(\frac{K}{2}\right)\\
t_1 := \left(\left(-2 \cdot J\right) \cdot t_0\right) \cdot \sqrt{1 + {\left(\frac{U}{t_0 \cdot \left(J \cdot 2\right)}\right)}^{2}}\\
\mathbf{if}\;t_1 \leq -\infty:\\
\;\;\;\;-U\\
\mathbf{elif}\;t_1 \leq 5 \cdot 10^{+303}:\\
\;\;\;\;\left(J \cdot \left(-2 \cdot t_0\right)\right) \cdot \mathsf{hypot}\left(1, \frac{U}{J \cdot \left(2 \cdot t_0\right)}\right)\\
\mathbf{else}:\\
\;\;\;\;U\\
\end{array}
\end{array}
if (*.f64 (*.f64 (*.f64 -2 J) (cos.f64 (/.f64 K 2))) (sqrt.f64 (+.f64 1 (pow.f64 (/.f64 U (*.f64 (*.f64 2 J) (cos.f64 (/.f64 K 2)))) 2)))) < -inf.0Initial program 5.8%
*-commutative5.8%
associate-*l*5.8%
associate-*r*5.8%
*-commutative5.8%
associate-*l*5.8%
*-commutative5.8%
unpow25.8%
hypot-1-def74.6%
*-commutative74.6%
associate-*l*74.6%
Simplified74.6%
Taylor expanded in J around 0 51.9%
neg-mul-151.9%
Simplified51.9%
if -inf.0 < (*.f64 (*.f64 (*.f64 -2 J) (cos.f64 (/.f64 K 2))) (sqrt.f64 (+.f64 1 (pow.f64 (/.f64 U (*.f64 (*.f64 2 J) (cos.f64 (/.f64 K 2)))) 2)))) < 4.9999999999999997e303Initial program 99.8%
*-commutative99.8%
associate-*l*99.8%
unpow299.8%
hypot-1-def99.8%
*-commutative99.8%
associate-*l*99.8%
Simplified99.8%
if 4.9999999999999997e303 < (*.f64 (*.f64 (*.f64 -2 J) (cos.f64 (/.f64 K 2))) (sqrt.f64 (+.f64 1 (pow.f64 (/.f64 U (*.f64 (*.f64 2 J) (cos.f64 (/.f64 K 2)))) 2)))) Initial program 5.5%
*-commutative5.5%
associate-*l*5.5%
associate-*r*5.5%
*-commutative5.5%
associate-*l*5.5%
*-commutative5.5%
unpow25.5%
hypot-1-def43.2%
*-commutative43.2%
associate-*l*43.2%
Simplified43.2%
Taylor expanded in U around -inf 37.6%
Final simplification85.1%
NOTE: U should be positive before calling this function (FPCore (J K U) :precision binary64 (let* ((t_0 (cos (/ K 2.0)))) (* J (* t_0 (* -2.0 (hypot 1.0 (/ U (* J (* 2.0 t_0)))))))))
U = abs(U);
double code(double J, double K, double U) {
double t_0 = cos((K / 2.0));
return J * (t_0 * (-2.0 * hypot(1.0, (U / (J * (2.0 * t_0))))));
}
U = Math.abs(U);
public static double code(double J, double K, double U) {
double t_0 = Math.cos((K / 2.0));
return J * (t_0 * (-2.0 * Math.hypot(1.0, (U / (J * (2.0 * t_0))))));
}
U = abs(U) def code(J, K, U): t_0 = math.cos((K / 2.0)) return J * (t_0 * (-2.0 * math.hypot(1.0, (U / (J * (2.0 * t_0))))))
U = abs(U) function code(J, K, U) t_0 = cos(Float64(K / 2.0)) return Float64(J * Float64(t_0 * Float64(-2.0 * hypot(1.0, Float64(U / Float64(J * Float64(2.0 * t_0))))))) end
U = abs(U) function tmp = code(J, K, U) t_0 = cos((K / 2.0)); tmp = J * (t_0 * (-2.0 * hypot(1.0, (U / (J * (2.0 * t_0)))))); end
NOTE: U should be positive before calling this function
code[J_, K_, U_] := Block[{t$95$0 = N[Cos[N[(K / 2.0), $MachinePrecision]], $MachinePrecision]}, N[(J * N[(t$95$0 * N[(-2.0 * N[Sqrt[1.0 ^ 2 + N[(U / N[(J * N[(2.0 * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
U = |U|\\
\\
\begin{array}{l}
t_0 := \cos \left(\frac{K}{2}\right)\\
J \cdot \left(t_0 \cdot \left(-2 \cdot \mathsf{hypot}\left(1, \frac{U}{J \cdot \left(2 \cdot t_0\right)}\right)\right)\right)
\end{array}
\end{array}
Initial program 74.8%
*-commutative74.8%
associate-*l*74.8%
associate-*r*74.8%
*-commutative74.8%
associate-*l*74.7%
*-commutative74.7%
unpow274.7%
hypot-1-def88.7%
*-commutative88.7%
associate-*l*88.7%
Simplified88.7%
Final simplification88.7%
NOTE: U should be positive before calling this function
(FPCore (J K U)
:precision binary64
(let* ((t_0 (* (* J (* -2.0 (cos (/ K 2.0)))) (hypot 1.0 (/ U (* J 2.0))))))
(if (<= J -2.3e-179)
t_0
(if (<= J 6.2e-297) U (if (<= J 6.8e-187) (- U) t_0)))))U = abs(U);
double code(double J, double K, double U) {
double t_0 = (J * (-2.0 * cos((K / 2.0)))) * hypot(1.0, (U / (J * 2.0)));
double tmp;
if (J <= -2.3e-179) {
tmp = t_0;
} else if (J <= 6.2e-297) {
tmp = U;
} else if (J <= 6.8e-187) {
tmp = -U;
} else {
tmp = t_0;
}
return tmp;
}
U = Math.abs(U);
public static double code(double J, double K, double U) {
double t_0 = (J * (-2.0 * Math.cos((K / 2.0)))) * Math.hypot(1.0, (U / (J * 2.0)));
double tmp;
if (J <= -2.3e-179) {
tmp = t_0;
} else if (J <= 6.2e-297) {
tmp = U;
} else if (J <= 6.8e-187) {
tmp = -U;
} else {
tmp = t_0;
}
return tmp;
}
U = abs(U) def code(J, K, U): t_0 = (J * (-2.0 * math.cos((K / 2.0)))) * math.hypot(1.0, (U / (J * 2.0))) tmp = 0 if J <= -2.3e-179: tmp = t_0 elif J <= 6.2e-297: tmp = U elif J <= 6.8e-187: tmp = -U else: tmp = t_0 return tmp
U = abs(U) function code(J, K, U) t_0 = Float64(Float64(J * Float64(-2.0 * cos(Float64(K / 2.0)))) * hypot(1.0, Float64(U / Float64(J * 2.0)))) tmp = 0.0 if (J <= -2.3e-179) tmp = t_0; elseif (J <= 6.2e-297) tmp = U; elseif (J <= 6.8e-187) tmp = Float64(-U); else tmp = t_0; end return tmp end
U = abs(U) function tmp_2 = code(J, K, U) t_0 = (J * (-2.0 * cos((K / 2.0)))) * hypot(1.0, (U / (J * 2.0))); tmp = 0.0; if (J <= -2.3e-179) tmp = t_0; elseif (J <= 6.2e-297) tmp = U; elseif (J <= 6.8e-187) tmp = -U; else tmp = t_0; end tmp_2 = tmp; end
NOTE: U should be positive before calling this function
code[J_, K_, U_] := Block[{t$95$0 = N[(N[(J * N[(-2.0 * N[Cos[N[(K / 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sqrt[1.0 ^ 2 + N[(U / N[(J * 2.0), $MachinePrecision]), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[J, -2.3e-179], t$95$0, If[LessEqual[J, 6.2e-297], U, If[LessEqual[J, 6.8e-187], (-U), t$95$0]]]]
\begin{array}{l}
U = |U|\\
\\
\begin{array}{l}
t_0 := \left(J \cdot \left(-2 \cdot \cos \left(\frac{K}{2}\right)\right)\right) \cdot \mathsf{hypot}\left(1, \frac{U}{J \cdot 2}\right)\\
\mathbf{if}\;J \leq -2.3 \cdot 10^{-179}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;J \leq 6.2 \cdot 10^{-297}:\\
\;\;\;\;U\\
\mathbf{elif}\;J \leq 6.8 \cdot 10^{-187}:\\
\;\;\;\;-U\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\end{array}
if J < -2.29999999999999988e-179 or 6.8000000000000003e-187 < J Initial program 87.3%
*-commutative87.3%
associate-*l*87.3%
unpow287.3%
hypot-1-def96.9%
*-commutative96.9%
associate-*l*96.9%
Simplified96.9%
Taylor expanded in K around 0 81.3%
if -2.29999999999999988e-179 < J < 6.1999999999999993e-297Initial program 28.3%
*-commutative28.3%
associate-*l*28.3%
associate-*r*28.3%
*-commutative28.3%
associate-*l*28.3%
*-commutative28.3%
unpow228.3%
hypot-1-def58.3%
*-commutative58.3%
associate-*l*58.3%
Simplified58.3%
Taylor expanded in U around -inf 36.0%
if 6.1999999999999993e-297 < J < 6.8000000000000003e-187Initial program 43.1%
*-commutative43.1%
associate-*l*43.1%
associate-*r*43.1%
*-commutative43.1%
associate-*l*42.9%
*-commutative42.9%
unpow242.9%
hypot-1-def68.5%
*-commutative68.5%
associate-*l*68.5%
Simplified68.5%
Taylor expanded in J around 0 50.9%
neg-mul-150.9%
Simplified50.9%
Final simplification72.1%
NOTE: U should be positive before calling this function
(FPCore (J K U)
:precision binary64
(let* ((t_0 (* J (* -2.0 (cos (* K 0.5))))))
(if (<= J -2.05e-55)
t_0
(if (<= J 6.2e-297)
U
(if (<= J 6e-54)
(- U)
(if (or (<= J 122000000.0) (not (<= J 1.6e+33)))
t_0
(- (/ (* -2.0 (* J J)) U) U)))))))U = abs(U);
double code(double J, double K, double U) {
double t_0 = J * (-2.0 * cos((K * 0.5)));
double tmp;
if (J <= -2.05e-55) {
tmp = t_0;
} else if (J <= 6.2e-297) {
tmp = U;
} else if (J <= 6e-54) {
tmp = -U;
} else if ((J <= 122000000.0) || !(J <= 1.6e+33)) {
tmp = t_0;
} else {
tmp = ((-2.0 * (J * J)) / U) - U;
}
return tmp;
}
NOTE: U should be positive before calling this function
real(8) function code(j, k, u)
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8), intent (in) :: u
real(8) :: t_0
real(8) :: tmp
t_0 = j * ((-2.0d0) * cos((k * 0.5d0)))
if (j <= (-2.05d-55)) then
tmp = t_0
else if (j <= 6.2d-297) then
tmp = u
else if (j <= 6d-54) then
tmp = -u
else if ((j <= 122000000.0d0) .or. (.not. (j <= 1.6d+33))) then
tmp = t_0
else
tmp = (((-2.0d0) * (j * j)) / u) - u
end if
code = tmp
end function
U = Math.abs(U);
public static double code(double J, double K, double U) {
double t_0 = J * (-2.0 * Math.cos((K * 0.5)));
double tmp;
if (J <= -2.05e-55) {
tmp = t_0;
} else if (J <= 6.2e-297) {
tmp = U;
} else if (J <= 6e-54) {
tmp = -U;
} else if ((J <= 122000000.0) || !(J <= 1.6e+33)) {
tmp = t_0;
} else {
tmp = ((-2.0 * (J * J)) / U) - U;
}
return tmp;
}
U = abs(U) def code(J, K, U): t_0 = J * (-2.0 * math.cos((K * 0.5))) tmp = 0 if J <= -2.05e-55: tmp = t_0 elif J <= 6.2e-297: tmp = U elif J <= 6e-54: tmp = -U elif (J <= 122000000.0) or not (J <= 1.6e+33): tmp = t_0 else: tmp = ((-2.0 * (J * J)) / U) - U return tmp
U = abs(U) function code(J, K, U) t_0 = Float64(J * Float64(-2.0 * cos(Float64(K * 0.5)))) tmp = 0.0 if (J <= -2.05e-55) tmp = t_0; elseif (J <= 6.2e-297) tmp = U; elseif (J <= 6e-54) tmp = Float64(-U); elseif ((J <= 122000000.0) || !(J <= 1.6e+33)) tmp = t_0; else tmp = Float64(Float64(Float64(-2.0 * Float64(J * J)) / U) - U); end return tmp end
U = abs(U) function tmp_2 = code(J, K, U) t_0 = J * (-2.0 * cos((K * 0.5))); tmp = 0.0; if (J <= -2.05e-55) tmp = t_0; elseif (J <= 6.2e-297) tmp = U; elseif (J <= 6e-54) tmp = -U; elseif ((J <= 122000000.0) || ~((J <= 1.6e+33))) tmp = t_0; else tmp = ((-2.0 * (J * J)) / U) - U; end tmp_2 = tmp; end
NOTE: U should be positive before calling this function
code[J_, K_, U_] := Block[{t$95$0 = N[(J * N[(-2.0 * N[Cos[N[(K * 0.5), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[J, -2.05e-55], t$95$0, If[LessEqual[J, 6.2e-297], U, If[LessEqual[J, 6e-54], (-U), If[Or[LessEqual[J, 122000000.0], N[Not[LessEqual[J, 1.6e+33]], $MachinePrecision]], t$95$0, N[(N[(N[(-2.0 * N[(J * J), $MachinePrecision]), $MachinePrecision] / U), $MachinePrecision] - U), $MachinePrecision]]]]]]
\begin{array}{l}
U = |U|\\
\\
\begin{array}{l}
t_0 := J \cdot \left(-2 \cdot \cos \left(K \cdot 0.5\right)\right)\\
\mathbf{if}\;J \leq -2.05 \cdot 10^{-55}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;J \leq 6.2 \cdot 10^{-297}:\\
\;\;\;\;U\\
\mathbf{elif}\;J \leq 6 \cdot 10^{-54}:\\
\;\;\;\;-U\\
\mathbf{elif}\;J \leq 122000000 \lor \neg \left(J \leq 1.6 \cdot 10^{+33}\right):\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{-2 \cdot \left(J \cdot J\right)}{U} - U\\
\end{array}
\end{array}
if J < -2.0499999999999999e-55 or 6.00000000000000018e-54 < J < 1.22e8 or 1.60000000000000009e33 < J Initial program 93.6%
*-commutative93.6%
associate-*l*93.6%
associate-*r*93.6%
*-commutative93.6%
associate-*l*93.6%
*-commutative93.6%
unpow293.6%
hypot-1-def99.2%
*-commutative99.2%
associate-*l*99.2%
Simplified99.2%
Taylor expanded in U around 0 76.0%
if -2.0499999999999999e-55 < J < 6.1999999999999993e-297Initial program 39.9%
*-commutative39.9%
associate-*l*39.9%
associate-*r*39.9%
*-commutative39.9%
associate-*l*39.8%
*-commutative39.8%
unpow239.8%
hypot-1-def64.8%
*-commutative64.8%
associate-*l*64.8%
Simplified64.8%
Taylor expanded in U around -inf 30.1%
if 6.1999999999999993e-297 < J < 6.00000000000000018e-54Initial program 55.8%
*-commutative55.8%
associate-*l*55.8%
associate-*r*55.8%
*-commutative55.8%
associate-*l*55.7%
*-commutative55.7%
unpow255.7%
hypot-1-def79.7%
*-commutative79.7%
associate-*l*79.7%
Simplified79.7%
Taylor expanded in J around 0 44.4%
neg-mul-144.4%
Simplified44.4%
if 1.22e8 < J < 1.60000000000000009e33Initial program 54.7%
*-commutative54.7%
associate-*l*54.7%
associate-*r*54.7%
*-commutative54.7%
associate-*l*54.5%
*-commutative54.5%
unpow254.5%
hypot-1-def99.5%
*-commutative99.5%
associate-*l*99.5%
Simplified99.5%
Taylor expanded in J around 0 67.0%
neg-mul-167.0%
unsub-neg67.0%
associate-/l*67.0%
associate-*r/67.0%
unpow267.0%
Simplified67.0%
Taylor expanded in K around 0 67.0%
associate-*r/67.0%
unpow267.0%
Simplified67.0%
Final simplification60.6%
NOTE: U should be positive before calling this function
(FPCore (J K U)
:precision binary64
(if (<= K 26500.0)
(* J (* -2.0 (hypot 1.0 (* 0.5 (/ U J)))))
(if (or (<= K 5e+155) (not (<= K 8.5e+219)))
(* J (* -2.0 (cos (* K 0.5))))
(- U))))U = abs(U);
double code(double J, double K, double U) {
double tmp;
if (K <= 26500.0) {
tmp = J * (-2.0 * hypot(1.0, (0.5 * (U / J))));
} else if ((K <= 5e+155) || !(K <= 8.5e+219)) {
tmp = J * (-2.0 * cos((K * 0.5)));
} else {
tmp = -U;
}
return tmp;
}
U = Math.abs(U);
public static double code(double J, double K, double U) {
double tmp;
if (K <= 26500.0) {
tmp = J * (-2.0 * Math.hypot(1.0, (0.5 * (U / J))));
} else if ((K <= 5e+155) || !(K <= 8.5e+219)) {
tmp = J * (-2.0 * Math.cos((K * 0.5)));
} else {
tmp = -U;
}
return tmp;
}
U = abs(U) def code(J, K, U): tmp = 0 if K <= 26500.0: tmp = J * (-2.0 * math.hypot(1.0, (0.5 * (U / J)))) elif (K <= 5e+155) or not (K <= 8.5e+219): tmp = J * (-2.0 * math.cos((K * 0.5))) else: tmp = -U return tmp
U = abs(U) function code(J, K, U) tmp = 0.0 if (K <= 26500.0) tmp = Float64(J * Float64(-2.0 * hypot(1.0, Float64(0.5 * Float64(U / J))))); elseif ((K <= 5e+155) || !(K <= 8.5e+219)) tmp = Float64(J * Float64(-2.0 * cos(Float64(K * 0.5)))); else tmp = Float64(-U); end return tmp end
U = abs(U) function tmp_2 = code(J, K, U) tmp = 0.0; if (K <= 26500.0) tmp = J * (-2.0 * hypot(1.0, (0.5 * (U / J)))); elseif ((K <= 5e+155) || ~((K <= 8.5e+219))) tmp = J * (-2.0 * cos((K * 0.5))); else tmp = -U; end tmp_2 = tmp; end
NOTE: U should be positive before calling this function code[J_, K_, U_] := If[LessEqual[K, 26500.0], N[(J * N[(-2.0 * N[Sqrt[1.0 ^ 2 + N[(0.5 * N[(U / J), $MachinePrecision]), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[K, 5e+155], N[Not[LessEqual[K, 8.5e+219]], $MachinePrecision]], N[(J * N[(-2.0 * N[Cos[N[(K * 0.5), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], (-U)]]
\begin{array}{l}
U = |U|\\
\\
\begin{array}{l}
\mathbf{if}\;K \leq 26500:\\
\;\;\;\;J \cdot \left(-2 \cdot \mathsf{hypot}\left(1, 0.5 \cdot \frac{U}{J}\right)\right)\\
\mathbf{elif}\;K \leq 5 \cdot 10^{+155} \lor \neg \left(K \leq 8.5 \cdot 10^{+219}\right):\\
\;\;\;\;J \cdot \left(-2 \cdot \cos \left(K \cdot 0.5\right)\right)\\
\mathbf{else}:\\
\;\;\;\;-U\\
\end{array}
\end{array}
if K < 26500Initial program 77.0%
*-commutative77.0%
associate-*l*77.0%
associate-*r*77.0%
*-commutative77.0%
associate-*l*77.0%
*-commutative77.0%
unpow277.0%
hypot-1-def91.9%
*-commutative91.9%
associate-*l*91.9%
Simplified91.9%
log1p-expm1-u58.3%
associate-*r*58.3%
*-commutative58.3%
associate-*l*58.3%
div-inv58.3%
metadata-eval58.3%
*-commutative58.3%
*-commutative58.3%
associate-*l*58.3%
div-inv58.3%
metadata-eval58.3%
*-commutative58.3%
Applied egg-rr58.3%
log1p-expm1-u91.9%
add-log-exp58.2%
*-commutative58.2%
add-log-exp58.1%
exp-to-pow58.1%
add-log-exp58.1%
exp-to-pow58.1%
Applied egg-rr58.1%
log-pow58.1%
log-pow91.4%
*-lft-identity91.4%
associate-*r*91.4%
*-commutative91.4%
*-commutative91.4%
times-frac91.4%
metadata-eval91.4%
associate-*r/91.4%
times-frac91.4%
*-commutative91.4%
Simplified91.4%
Taylor expanded in K around 0 78.0%
Taylor expanded in K around 0 65.5%
if 26500 < K < 4.9999999999999999e155 or 8.5000000000000001e219 < K Initial program 69.4%
*-commutative69.4%
associate-*l*69.4%
associate-*r*69.4%
*-commutative69.4%
associate-*l*69.4%
*-commutative69.4%
unpow269.4%
hypot-1-def78.9%
*-commutative78.9%
associate-*l*78.9%
Simplified78.9%
Taylor expanded in U around 0 50.1%
if 4.9999999999999999e155 < K < 8.5000000000000001e219Initial program 64.4%
*-commutative64.4%
associate-*l*64.4%
associate-*r*64.4%
*-commutative64.4%
associate-*l*64.1%
*-commutative64.1%
unpow264.1%
hypot-1-def81.8%
*-commutative81.8%
associate-*l*81.8%
Simplified81.8%
Taylor expanded in J around 0 60.9%
neg-mul-160.9%
Simplified60.9%
Final simplification62.2%
NOTE: U should be positive before calling this function
(FPCore (J K U)
:precision binary64
(let* ((t_0 (* J (* -2.0 (+ 1.0 (* (* (/ U J) (/ U J)) 0.125))))))
(if (<= J -1.28e+179)
(* -2.0 J)
(if (<= J -1.7e+38)
U
(if (<= J -2.05e-55)
t_0
(if (<= J 6.2e-297) U (if (<= J 1.4e+53) (- U) t_0)))))))U = abs(U);
double code(double J, double K, double U) {
double t_0 = J * (-2.0 * (1.0 + (((U / J) * (U / J)) * 0.125)));
double tmp;
if (J <= -1.28e+179) {
tmp = -2.0 * J;
} else if (J <= -1.7e+38) {
tmp = U;
} else if (J <= -2.05e-55) {
tmp = t_0;
} else if (J <= 6.2e-297) {
tmp = U;
} else if (J <= 1.4e+53) {
tmp = -U;
} else {
tmp = t_0;
}
return tmp;
}
NOTE: U should be positive before calling this function
real(8) function code(j, k, u)
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8), intent (in) :: u
real(8) :: t_0
real(8) :: tmp
t_0 = j * ((-2.0d0) * (1.0d0 + (((u / j) * (u / j)) * 0.125d0)))
if (j <= (-1.28d+179)) then
tmp = (-2.0d0) * j
else if (j <= (-1.7d+38)) then
tmp = u
else if (j <= (-2.05d-55)) then
tmp = t_0
else if (j <= 6.2d-297) then
tmp = u
else if (j <= 1.4d+53) then
tmp = -u
else
tmp = t_0
end if
code = tmp
end function
U = Math.abs(U);
public static double code(double J, double K, double U) {
double t_0 = J * (-2.0 * (1.0 + (((U / J) * (U / J)) * 0.125)));
double tmp;
if (J <= -1.28e+179) {
tmp = -2.0 * J;
} else if (J <= -1.7e+38) {
tmp = U;
} else if (J <= -2.05e-55) {
tmp = t_0;
} else if (J <= 6.2e-297) {
tmp = U;
} else if (J <= 1.4e+53) {
tmp = -U;
} else {
tmp = t_0;
}
return tmp;
}
U = abs(U) def code(J, K, U): t_0 = J * (-2.0 * (1.0 + (((U / J) * (U / J)) * 0.125))) tmp = 0 if J <= -1.28e+179: tmp = -2.0 * J elif J <= -1.7e+38: tmp = U elif J <= -2.05e-55: tmp = t_0 elif J <= 6.2e-297: tmp = U elif J <= 1.4e+53: tmp = -U else: tmp = t_0 return tmp
U = abs(U) function code(J, K, U) t_0 = Float64(J * Float64(-2.0 * Float64(1.0 + Float64(Float64(Float64(U / J) * Float64(U / J)) * 0.125)))) tmp = 0.0 if (J <= -1.28e+179) tmp = Float64(-2.0 * J); elseif (J <= -1.7e+38) tmp = U; elseif (J <= -2.05e-55) tmp = t_0; elseif (J <= 6.2e-297) tmp = U; elseif (J <= 1.4e+53) tmp = Float64(-U); else tmp = t_0; end return tmp end
U = abs(U) function tmp_2 = code(J, K, U) t_0 = J * (-2.0 * (1.0 + (((U / J) * (U / J)) * 0.125))); tmp = 0.0; if (J <= -1.28e+179) tmp = -2.0 * J; elseif (J <= -1.7e+38) tmp = U; elseif (J <= -2.05e-55) tmp = t_0; elseif (J <= 6.2e-297) tmp = U; elseif (J <= 1.4e+53) tmp = -U; else tmp = t_0; end tmp_2 = tmp; end
NOTE: U should be positive before calling this function
code[J_, K_, U_] := Block[{t$95$0 = N[(J * N[(-2.0 * N[(1.0 + N[(N[(N[(U / J), $MachinePrecision] * N[(U / J), $MachinePrecision]), $MachinePrecision] * 0.125), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[J, -1.28e+179], N[(-2.0 * J), $MachinePrecision], If[LessEqual[J, -1.7e+38], U, If[LessEqual[J, -2.05e-55], t$95$0, If[LessEqual[J, 6.2e-297], U, If[LessEqual[J, 1.4e+53], (-U), t$95$0]]]]]]
\begin{array}{l}
U = |U|\\
\\
\begin{array}{l}
t_0 := J \cdot \left(-2 \cdot \left(1 + \left(\frac{U}{J} \cdot \frac{U}{J}\right) \cdot 0.125\right)\right)\\
\mathbf{if}\;J \leq -1.28 \cdot 10^{+179}:\\
\;\;\;\;-2 \cdot J\\
\mathbf{elif}\;J \leq -1.7 \cdot 10^{+38}:\\
\;\;\;\;U\\
\mathbf{elif}\;J \leq -2.05 \cdot 10^{-55}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;J \leq 6.2 \cdot 10^{-297}:\\
\;\;\;\;U\\
\mathbf{elif}\;J \leq 1.4 \cdot 10^{+53}:\\
\;\;\;\;-U\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\end{array}
if J < -1.28e179Initial program 99.7%
*-commutative99.7%
associate-*l*99.7%
associate-*r*99.7%
*-commutative99.7%
associate-*l*99.7%
*-commutative99.7%
unpow299.7%
hypot-1-def99.7%
*-commutative99.7%
associate-*l*99.7%
Simplified99.7%
Taylor expanded in K around 0 39.6%
associate-*r*39.6%
unpow239.6%
unpow239.6%
Simplified39.6%
Taylor expanded in U around 0 46.3%
if -1.28e179 < J < -1.69999999999999998e38 or -2.0499999999999999e-55 < J < 6.1999999999999993e-297Initial program 58.3%
*-commutative58.3%
associate-*l*58.3%
associate-*r*58.3%
*-commutative58.3%
associate-*l*58.3%
*-commutative58.3%
unpow258.3%
hypot-1-def77.7%
*-commutative77.7%
associate-*l*77.7%
Simplified77.7%
Taylor expanded in U around -inf 29.2%
if -1.69999999999999998e38 < J < -2.0499999999999999e-55 or 1.4e53 < J Initial program 97.2%
*-commutative97.2%
associate-*l*97.2%
associate-*r*97.2%
*-commutative97.2%
associate-*l*97.3%
*-commutative97.3%
unpow297.3%
hypot-1-def100.0%
*-commutative100.0%
associate-*l*100.0%
Simplified100.0%
Taylor expanded in K around 0 58.1%
associate-*r*58.1%
unpow258.1%
unpow258.1%
Simplified58.1%
Taylor expanded in U around 0 56.7%
*-commutative56.7%
unpow256.7%
unpow256.7%
Simplified56.7%
times-frac60.6%
Applied egg-rr60.6%
if 6.1999999999999993e-297 < J < 1.4e53Initial program 62.2%
*-commutative62.2%
associate-*l*62.2%
associate-*r*62.2%
*-commutative62.2%
associate-*l*62.1%
*-commutative62.1%
unpow262.1%
hypot-1-def85.4%
*-commutative85.4%
associate-*l*85.4%
Simplified85.4%
Taylor expanded in J around 0 38.1%
neg-mul-138.1%
Simplified38.1%
Final simplification42.5%
NOTE: U should be positive before calling this function
(FPCore (J K U)
:precision binary64
(if (<= J -6e+179)
(* -2.0 J)
(if (<= J -1.65e+38)
U
(if (<= J -2.65e-55)
(* -2.0 J)
(if (<= J 6.2e-297) U (if (<= J 2.9e+53) (- U) (* -2.0 J)))))))U = abs(U);
double code(double J, double K, double U) {
double tmp;
if (J <= -6e+179) {
tmp = -2.0 * J;
} else if (J <= -1.65e+38) {
tmp = U;
} else if (J <= -2.65e-55) {
tmp = -2.0 * J;
} else if (J <= 6.2e-297) {
tmp = U;
} else if (J <= 2.9e+53) {
tmp = -U;
} else {
tmp = -2.0 * J;
}
return tmp;
}
NOTE: U should be positive before calling this function
real(8) function code(j, k, u)
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8), intent (in) :: u
real(8) :: tmp
if (j <= (-6d+179)) then
tmp = (-2.0d0) * j
else if (j <= (-1.65d+38)) then
tmp = u
else if (j <= (-2.65d-55)) then
tmp = (-2.0d0) * j
else if (j <= 6.2d-297) then
tmp = u
else if (j <= 2.9d+53) then
tmp = -u
else
tmp = (-2.0d0) * j
end if
code = tmp
end function
U = Math.abs(U);
public static double code(double J, double K, double U) {
double tmp;
if (J <= -6e+179) {
tmp = -2.0 * J;
} else if (J <= -1.65e+38) {
tmp = U;
} else if (J <= -2.65e-55) {
tmp = -2.0 * J;
} else if (J <= 6.2e-297) {
tmp = U;
} else if (J <= 2.9e+53) {
tmp = -U;
} else {
tmp = -2.0 * J;
}
return tmp;
}
U = abs(U) def code(J, K, U): tmp = 0 if J <= -6e+179: tmp = -2.0 * J elif J <= -1.65e+38: tmp = U elif J <= -2.65e-55: tmp = -2.0 * J elif J <= 6.2e-297: tmp = U elif J <= 2.9e+53: tmp = -U else: tmp = -2.0 * J return tmp
U = abs(U) function code(J, K, U) tmp = 0.0 if (J <= -6e+179) tmp = Float64(-2.0 * J); elseif (J <= -1.65e+38) tmp = U; elseif (J <= -2.65e-55) tmp = Float64(-2.0 * J); elseif (J <= 6.2e-297) tmp = U; elseif (J <= 2.9e+53) tmp = Float64(-U); else tmp = Float64(-2.0 * J); end return tmp end
U = abs(U) function tmp_2 = code(J, K, U) tmp = 0.0; if (J <= -6e+179) tmp = -2.0 * J; elseif (J <= -1.65e+38) tmp = U; elseif (J <= -2.65e-55) tmp = -2.0 * J; elseif (J <= 6.2e-297) tmp = U; elseif (J <= 2.9e+53) tmp = -U; else tmp = -2.0 * J; end tmp_2 = tmp; end
NOTE: U should be positive before calling this function code[J_, K_, U_] := If[LessEqual[J, -6e+179], N[(-2.0 * J), $MachinePrecision], If[LessEqual[J, -1.65e+38], U, If[LessEqual[J, -2.65e-55], N[(-2.0 * J), $MachinePrecision], If[LessEqual[J, 6.2e-297], U, If[LessEqual[J, 2.9e+53], (-U), N[(-2.0 * J), $MachinePrecision]]]]]]
\begin{array}{l}
U = |U|\\
\\
\begin{array}{l}
\mathbf{if}\;J \leq -6 \cdot 10^{+179}:\\
\;\;\;\;-2 \cdot J\\
\mathbf{elif}\;J \leq -1.65 \cdot 10^{+38}:\\
\;\;\;\;U\\
\mathbf{elif}\;J \leq -2.65 \cdot 10^{-55}:\\
\;\;\;\;-2 \cdot J\\
\mathbf{elif}\;J \leq 6.2 \cdot 10^{-297}:\\
\;\;\;\;U\\
\mathbf{elif}\;J \leq 2.9 \cdot 10^{+53}:\\
\;\;\;\;-U\\
\mathbf{else}:\\
\;\;\;\;-2 \cdot J\\
\end{array}
\end{array}
if J < -5.9999999999999996e179 or -1.65e38 < J < -2.6500000000000001e-55 or 2.9000000000000002e53 < J Initial program 98.0%
*-commutative98.0%
associate-*l*98.0%
associate-*r*98.0%
*-commutative98.0%
associate-*l*98.0%
*-commutative98.0%
unpow298.0%
hypot-1-def99.9%
*-commutative99.9%
associate-*l*99.9%
Simplified99.9%
Taylor expanded in K around 0 52.4%
associate-*r*52.4%
unpow252.4%
unpow252.4%
Simplified52.4%
Taylor expanded in U around 0 55.9%
if -5.9999999999999996e179 < J < -1.65e38 or -2.6500000000000001e-55 < J < 6.1999999999999993e-297Initial program 58.3%
*-commutative58.3%
associate-*l*58.3%
associate-*r*58.3%
*-commutative58.3%
associate-*l*58.3%
*-commutative58.3%
unpow258.3%
hypot-1-def77.7%
*-commutative77.7%
associate-*l*77.7%
Simplified77.7%
Taylor expanded in U around -inf 29.2%
if 6.1999999999999993e-297 < J < 2.9000000000000002e53Initial program 62.2%
*-commutative62.2%
associate-*l*62.2%
associate-*r*62.2%
*-commutative62.2%
associate-*l*62.1%
*-commutative62.1%
unpow262.1%
hypot-1-def85.4%
*-commutative85.4%
associate-*l*85.4%
Simplified85.4%
Taylor expanded in J around 0 38.1%
neg-mul-138.1%
Simplified38.1%
Final simplification42.4%
NOTE: U should be positive before calling this function (FPCore (J K U) :precision binary64 (if (<= J 6.2e-297) U (- U)))
U = abs(U);
double code(double J, double K, double U) {
double tmp;
if (J <= 6.2e-297) {
tmp = U;
} else {
tmp = -U;
}
return tmp;
}
NOTE: U should be positive before calling this function
real(8) function code(j, k, u)
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8), intent (in) :: u
real(8) :: tmp
if (j <= 6.2d-297) then
tmp = u
else
tmp = -u
end if
code = tmp
end function
U = Math.abs(U);
public static double code(double J, double K, double U) {
double tmp;
if (J <= 6.2e-297) {
tmp = U;
} else {
tmp = -U;
}
return tmp;
}
U = abs(U) def code(J, K, U): tmp = 0 if J <= 6.2e-297: tmp = U else: tmp = -U return tmp
U = abs(U) function code(J, K, U) tmp = 0.0 if (J <= 6.2e-297) tmp = U; else tmp = Float64(-U); end return tmp end
U = abs(U) function tmp_2 = code(J, K, U) tmp = 0.0; if (J <= 6.2e-297) tmp = U; else tmp = -U; end tmp_2 = tmp; end
NOTE: U should be positive before calling this function code[J_, K_, U_] := If[LessEqual[J, 6.2e-297], U, (-U)]
\begin{array}{l}
U = |U|\\
\\
\begin{array}{l}
\mathbf{if}\;J \leq 6.2 \cdot 10^{-297}:\\
\;\;\;\;U\\
\mathbf{else}:\\
\;\;\;\;-U\\
\end{array}
\end{array}
if J < 6.1999999999999993e-297Initial program 73.6%
*-commutative73.6%
associate-*l*73.6%
associate-*r*73.6%
*-commutative73.6%
associate-*l*73.6%
*-commutative73.6%
unpow273.6%
hypot-1-def86.7%
*-commutative86.7%
associate-*l*86.7%
Simplified86.7%
Taylor expanded in U around -inf 20.6%
if 6.1999999999999993e-297 < J Initial program 75.8%
*-commutative75.8%
associate-*l*75.8%
associate-*r*75.8%
*-commutative75.8%
associate-*l*75.7%
*-commutative75.7%
unpow275.7%
hypot-1-def90.7%
*-commutative90.7%
associate-*l*90.7%
Simplified90.7%
Taylor expanded in J around 0 28.2%
neg-mul-128.2%
Simplified28.2%
Final simplification24.6%
NOTE: U should be positive before calling this function (FPCore (J K U) :precision binary64 U)
U = abs(U);
double code(double J, double K, double U) {
return U;
}
NOTE: U should be positive before calling this function
real(8) function code(j, k, u)
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8), intent (in) :: u
code = u
end function
U = Math.abs(U);
public static double code(double J, double K, double U) {
return U;
}
U = abs(U) def code(J, K, U): return U
U = abs(U) function code(J, K, U) return U end
U = abs(U) function tmp = code(J, K, U) tmp = U; end
NOTE: U should be positive before calling this function code[J_, K_, U_] := U
\begin{array}{l}
U = |U|\\
\\
U
\end{array}
Initial program 74.8%
*-commutative74.8%
associate-*l*74.8%
associate-*r*74.8%
*-commutative74.8%
associate-*l*74.7%
*-commutative74.7%
unpow274.7%
hypot-1-def88.7%
*-commutative88.7%
associate-*l*88.7%
Simplified88.7%
Taylor expanded in U around -inf 22.7%
Final simplification22.7%
herbie shell --seed 2023213
(FPCore (J K U)
:name "Maksimov and Kolovsky, Equation (3)"
:precision binary64
(* (* (* -2.0 J) (cos (/ K 2.0))) (sqrt (+ 1.0 (pow (/ U (* (* 2.0 J) (cos (/ K 2.0)))) 2.0)))))