?

Average Accuracy: 73.9% → 85.6%
Time: 23.1s
Precision: binary64
Cost: 20616

?

\[\left(\left(-2 \cdot J\right) \cdot \cos \left(\frac{K}{2}\right)\right) \cdot \sqrt{1 + {\left(\frac{U}{\left(2 \cdot J\right) \cdot \cos \left(\frac{K}{2}\right)}\right)}^{2}} \]
\[\begin{array}{l} t_0 := \cos \left(\frac{K}{2}\right)\\ \mathbf{if}\;U \leq -2 \cdot 10^{+202}:\\ \;\;\;\;-2 \cdot \frac{J}{\frac{U}{J}} - U\\ \mathbf{elif}\;U \leq 2.1 \cdot 10^{+238}:\\ \;\;\;\;\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} \]
(FPCore (J K U)
 :precision binary64
 (*
  (* (* -2.0 J) (cos (/ K 2.0)))
  (sqrt (+ 1.0 (pow (/ U (* (* 2.0 J) (cos (/ K 2.0)))) 2.0)))))
(FPCore (J K U)
 :precision binary64
 (let* ((t_0 (cos (/ K 2.0))))
   (if (<= U -2e+202)
     (- (* -2.0 (/ J (/ U J))) U)
     (if (<= U 2.1e+238)
       (* (* J (* -2.0 t_0)) (hypot 1.0 (/ U (* J (* 2.0 t_0)))))
       (- U)))))
double code(double J, double K, double U) {
	return ((-2.0 * J) * cos((K / 2.0))) * sqrt((1.0 + pow((U / ((2.0 * J) * cos((K / 2.0)))), 2.0)));
}
double code(double J, double K, double U) {
	double t_0 = cos((K / 2.0));
	double tmp;
	if (U <= -2e+202) {
		tmp = (-2.0 * (J / (U / J))) - U;
	} else if (U <= 2.1e+238) {
		tmp = (J * (-2.0 * t_0)) * hypot(1.0, (U / (J * (2.0 * t_0))));
	} else {
		tmp = -U;
	}
	return tmp;
}
public static double code(double J, double K, double U) {
	return ((-2.0 * J) * Math.cos((K / 2.0))) * Math.sqrt((1.0 + Math.pow((U / ((2.0 * J) * Math.cos((K / 2.0)))), 2.0)));
}
public static double code(double J, double K, double U) {
	double t_0 = Math.cos((K / 2.0));
	double tmp;
	if (U <= -2e+202) {
		tmp = (-2.0 * (J / (U / J))) - U;
	} else if (U <= 2.1e+238) {
		tmp = (J * (-2.0 * t_0)) * Math.hypot(1.0, (U / (J * (2.0 * t_0))));
	} else {
		tmp = -U;
	}
	return tmp;
}
def code(J, K, U):
	return ((-2.0 * J) * math.cos((K / 2.0))) * math.sqrt((1.0 + math.pow((U / ((2.0 * J) * math.cos((K / 2.0)))), 2.0)))
def code(J, K, U):
	t_0 = math.cos((K / 2.0))
	tmp = 0
	if U <= -2e+202:
		tmp = (-2.0 * (J / (U / J))) - U
	elif U <= 2.1e+238:
		tmp = (J * (-2.0 * t_0)) * math.hypot(1.0, (U / (J * (2.0 * t_0))))
	else:
		tmp = -U
	return tmp
function code(J, K, U)
	return Float64(Float64(Float64(-2.0 * J) * cos(Float64(K / 2.0))) * sqrt(Float64(1.0 + (Float64(U / Float64(Float64(2.0 * J) * cos(Float64(K / 2.0)))) ^ 2.0))))
end
function code(J, K, U)
	t_0 = cos(Float64(K / 2.0))
	tmp = 0.0
	if (U <= -2e+202)
		tmp = Float64(Float64(-2.0 * Float64(J / Float64(U / J))) - U);
	elseif (U <= 2.1e+238)
		tmp = Float64(Float64(J * Float64(-2.0 * t_0)) * hypot(1.0, Float64(U / Float64(J * Float64(2.0 * t_0)))));
	else
		tmp = Float64(-U);
	end
	return tmp
end
function tmp = code(J, K, U)
	tmp = ((-2.0 * J) * cos((K / 2.0))) * sqrt((1.0 + ((U / ((2.0 * J) * cos((K / 2.0)))) ^ 2.0)));
end
function tmp_2 = code(J, K, U)
	t_0 = cos((K / 2.0));
	tmp = 0.0;
	if (U <= -2e+202)
		tmp = (-2.0 * (J / (U / J))) - U;
	elseif (U <= 2.1e+238)
		tmp = (J * (-2.0 * t_0)) * hypot(1.0, (U / (J * (2.0 * t_0))));
	else
		tmp = -U;
	end
	tmp_2 = tmp;
end
code[J_, K_, U_] := N[(N[(N[(-2.0 * J), $MachinePrecision] * N[Cos[N[(K / 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(1.0 + N[Power[N[(U / N[(N[(2.0 * J), $MachinePrecision] * N[Cos[N[(K / 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
code[J_, K_, U_] := Block[{t$95$0 = N[Cos[N[(K / 2.0), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[U, -2e+202], N[(N[(-2.0 * N[(J / N[(U / J), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - U), $MachinePrecision], If[LessEqual[U, 2.1e+238], 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)]]]
\left(\left(-2 \cdot J\right) \cdot \cos \left(\frac{K}{2}\right)\right) \cdot \sqrt{1 + {\left(\frac{U}{\left(2 \cdot J\right) \cdot \cos \left(\frac{K}{2}\right)}\right)}^{2}}
\begin{array}{l}
t_0 := \cos \left(\frac{K}{2}\right)\\
\mathbf{if}\;U \leq -2 \cdot 10^{+202}:\\
\;\;\;\;-2 \cdot \frac{J}{\frac{U}{J}} - U\\

\mathbf{elif}\;U \leq 2.1 \cdot 10^{+238}:\\
\;\;\;\;\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}

Error?

Bogosity?

Bogosity

Try it out?

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation?

  1. Split input into 3 regimes
  2. if U < -1.9999999999999998e202

    1. Initial program 31.3%

      \[\left(\left(-2 \cdot J\right) \cdot \cos \left(\frac{K}{2}\right)\right) \cdot \sqrt{1 + {\left(\frac{U}{\left(2 \cdot J\right) \cdot \cos \left(\frac{K}{2}\right)}\right)}^{2}} \]
    2. Simplified42.6%

      \[\leadsto \color{blue}{\left(J \cdot \left(-2 \cdot \cos \left(\frac{K}{2}\right)\right)\right) \cdot \mathsf{hypot}\left(1, \frac{U}{J \cdot \left(2 \cdot \cos \left(\frac{K}{2}\right)\right)}\right)} \]
      Proof

      [Start]31.3

      \[ \left(\left(-2 \cdot J\right) \cdot \cos \left(\frac{K}{2}\right)\right) \cdot \sqrt{1 + {\left(\frac{U}{\left(2 \cdot J\right) \cdot \cos \left(\frac{K}{2}\right)}\right)}^{2}} \]

      *-commutative [=>]31.3

      \[ \left(\color{blue}{\left(J \cdot -2\right)} \cdot \cos \left(\frac{K}{2}\right)\right) \cdot \sqrt{1 + {\left(\frac{U}{\left(2 \cdot J\right) \cdot \cos \left(\frac{K}{2}\right)}\right)}^{2}} \]

      associate-*l* [=>]31.3

      \[ \color{blue}{\left(J \cdot \left(-2 \cdot \cos \left(\frac{K}{2}\right)\right)\right)} \cdot \sqrt{1 + {\left(\frac{U}{\left(2 \cdot J\right) \cdot \cos \left(\frac{K}{2}\right)}\right)}^{2}} \]

      unpow2 [=>]31.3

      \[ \left(J \cdot \left(-2 \cdot \cos \left(\frac{K}{2}\right)\right)\right) \cdot \sqrt{1 + \color{blue}{\frac{U}{\left(2 \cdot J\right) \cdot \cos \left(\frac{K}{2}\right)} \cdot \frac{U}{\left(2 \cdot J\right) \cdot \cos \left(\frac{K}{2}\right)}}} \]

      hypot-1-def [=>]42.6

      \[ \left(J \cdot \left(-2 \cdot \cos \left(\frac{K}{2}\right)\right)\right) \cdot \color{blue}{\mathsf{hypot}\left(1, \frac{U}{\left(2 \cdot J\right) \cdot \cos \left(\frac{K}{2}\right)}\right)} \]

      *-commutative [=>]42.6

      \[ \left(J \cdot \left(-2 \cdot \cos \left(\frac{K}{2}\right)\right)\right) \cdot \mathsf{hypot}\left(1, \frac{U}{\color{blue}{\left(J \cdot 2\right)} \cdot \cos \left(\frac{K}{2}\right)}\right) \]

      associate-*l* [=>]42.6

      \[ \left(J \cdot \left(-2 \cdot \cos \left(\frac{K}{2}\right)\right)\right) \cdot \mathsf{hypot}\left(1, \frac{U}{\color{blue}{J \cdot \left(2 \cdot \cos \left(\frac{K}{2}\right)\right)}}\right) \]
    3. Taylor expanded in K around 0 24.6%

      \[\leadsto \left(J \cdot \left(-2 \cdot \cos \left(\frac{K}{2}\right)\right)\right) \cdot \mathsf{hypot}\left(1, \frac{U}{\color{blue}{2 \cdot J}}\right) \]
    4. Taylor expanded in K around 0 16.2%

      \[\leadsto \color{blue}{\left(-2 \cdot J\right)} \cdot \mathsf{hypot}\left(1, \frac{U}{2 \cdot J}\right) \]
    5. Taylor expanded in J around 0 59.5%

      \[\leadsto \color{blue}{-2 \cdot \frac{{J}^{2}}{U} + -1 \cdot U} \]
    6. Simplified67.2%

      \[\leadsto \color{blue}{-2 \cdot \frac{J}{\frac{U}{J}} - U} \]
      Proof

      [Start]59.5

      \[ -2 \cdot \frac{{J}^{2}}{U} + -1 \cdot U \]

      mul-1-neg [=>]59.5

      \[ -2 \cdot \frac{{J}^{2}}{U} + \color{blue}{\left(-U\right)} \]

      unsub-neg [=>]59.5

      \[ \color{blue}{-2 \cdot \frac{{J}^{2}}{U} - U} \]

      unpow2 [=>]59.5

      \[ -2 \cdot \frac{\color{blue}{J \cdot J}}{U} - U \]

      associate-/l* [=>]67.2

      \[ -2 \cdot \color{blue}{\frac{J}{\frac{U}{J}}} - U \]

    if -1.9999999999999998e202 < U < 2.10000000000000007e238

    1. Initial program 74.7%

      \[\left(\left(-2 \cdot J\right) \cdot \cos \left(\frac{K}{2}\right)\right) \cdot \sqrt{1 + {\left(\frac{U}{\left(2 \cdot J\right) \cdot \cos \left(\frac{K}{2}\right)}\right)}^{2}} \]
    2. Simplified93.8%

      \[\leadsto \color{blue}{\left(J \cdot \left(-2 \cdot \cos \left(\frac{K}{2}\right)\right)\right) \cdot \mathsf{hypot}\left(1, \frac{U}{J \cdot \left(2 \cdot \cos \left(\frac{K}{2}\right)\right)}\right)} \]
      Proof

      [Start]74.7

      \[ \left(\left(-2 \cdot J\right) \cdot \cos \left(\frac{K}{2}\right)\right) \cdot \sqrt{1 + {\left(\frac{U}{\left(2 \cdot J\right) \cdot \cos \left(\frac{K}{2}\right)}\right)}^{2}} \]

      *-commutative [=>]74.7

      \[ \left(\color{blue}{\left(J \cdot -2\right)} \cdot \cos \left(\frac{K}{2}\right)\right) \cdot \sqrt{1 + {\left(\frac{U}{\left(2 \cdot J\right) \cdot \cos \left(\frac{K}{2}\right)}\right)}^{2}} \]

      associate-*l* [=>]74.7

      \[ \color{blue}{\left(J \cdot \left(-2 \cdot \cos \left(\frac{K}{2}\right)\right)\right)} \cdot \sqrt{1 + {\left(\frac{U}{\left(2 \cdot J\right) \cdot \cos \left(\frac{K}{2}\right)}\right)}^{2}} \]

      unpow2 [=>]74.7

      \[ \left(J \cdot \left(-2 \cdot \cos \left(\frac{K}{2}\right)\right)\right) \cdot \sqrt{1 + \color{blue}{\frac{U}{\left(2 \cdot J\right) \cdot \cos \left(\frac{K}{2}\right)} \cdot \frac{U}{\left(2 \cdot J\right) \cdot \cos \left(\frac{K}{2}\right)}}} \]

      hypot-1-def [=>]93.8

      \[ \left(J \cdot \left(-2 \cdot \cos \left(\frac{K}{2}\right)\right)\right) \cdot \color{blue}{\mathsf{hypot}\left(1, \frac{U}{\left(2 \cdot J\right) \cdot \cos \left(\frac{K}{2}\right)}\right)} \]

      *-commutative [=>]93.8

      \[ \left(J \cdot \left(-2 \cdot \cos \left(\frac{K}{2}\right)\right)\right) \cdot \mathsf{hypot}\left(1, \frac{U}{\color{blue}{\left(J \cdot 2\right)} \cdot \cos \left(\frac{K}{2}\right)}\right) \]

      associate-*l* [=>]93.8

      \[ \left(J \cdot \left(-2 \cdot \cos \left(\frac{K}{2}\right)\right)\right) \cdot \mathsf{hypot}\left(1, \frac{U}{\color{blue}{J \cdot \left(2 \cdot \cos \left(\frac{K}{2}\right)\right)}}\right) \]

    if 2.10000000000000007e238 < U

    1. Initial program 16.5%

      \[\left(\left(-2 \cdot J\right) \cdot \cos \left(\frac{K}{2}\right)\right) \cdot \sqrt{1 + {\left(\frac{U}{\left(2 \cdot J\right) \cdot \cos \left(\frac{K}{2}\right)}\right)}^{2}} \]
    2. Simplified33.0%

      \[\leadsto \color{blue}{J \cdot \left(\cos \left(\frac{K}{2}\right) \cdot \left(-2 \cdot \mathsf{hypot}\left(1, \frac{U}{J \cdot \left(2 \cdot \cos \left(\frac{K}{2}\right)\right)}\right)\right)\right)} \]
      Proof

      [Start]16.5

      \[ \left(\left(-2 \cdot J\right) \cdot \cos \left(\frac{K}{2}\right)\right) \cdot \sqrt{1 + {\left(\frac{U}{\left(2 \cdot J\right) \cdot \cos \left(\frac{K}{2}\right)}\right)}^{2}} \]

      *-commutative [=>]16.5

      \[ \color{blue}{\sqrt{1 + {\left(\frac{U}{\left(2 \cdot J\right) \cdot \cos \left(\frac{K}{2}\right)}\right)}^{2}} \cdot \left(\left(-2 \cdot J\right) \cdot \cos \left(\frac{K}{2}\right)\right)} \]

      associate-*l* [=>]16.5

      \[ \sqrt{1 + {\left(\frac{U}{\left(2 \cdot J\right) \cdot \cos \left(\frac{K}{2}\right)}\right)}^{2}} \cdot \color{blue}{\left(-2 \cdot \left(J \cdot \cos \left(\frac{K}{2}\right)\right)\right)} \]

      associate-*r* [=>]16.5

      \[ \color{blue}{\left(\sqrt{1 + {\left(\frac{U}{\left(2 \cdot J\right) \cdot \cos \left(\frac{K}{2}\right)}\right)}^{2}} \cdot -2\right) \cdot \left(J \cdot \cos \left(\frac{K}{2}\right)\right)} \]

      *-commutative [=>]16.5

      \[ \color{blue}{\left(J \cdot \cos \left(\frac{K}{2}\right)\right) \cdot \left(\sqrt{1 + {\left(\frac{U}{\left(2 \cdot J\right) \cdot \cos \left(\frac{K}{2}\right)}\right)}^{2}} \cdot -2\right)} \]

      associate-*l* [=>]16.3

      \[ \color{blue}{J \cdot \left(\cos \left(\frac{K}{2}\right) \cdot \left(\sqrt{1 + {\left(\frac{U}{\left(2 \cdot J\right) \cdot \cos \left(\frac{K}{2}\right)}\right)}^{2}} \cdot -2\right)\right)} \]

      *-commutative [=>]16.3

      \[ J \cdot \left(\cos \left(\frac{K}{2}\right) \cdot \color{blue}{\left(-2 \cdot \sqrt{1 + {\left(\frac{U}{\left(2 \cdot J\right) \cdot \cos \left(\frac{K}{2}\right)}\right)}^{2}}\right)}\right) \]

      unpow2 [=>]16.3

      \[ J \cdot \left(\cos \left(\frac{K}{2}\right) \cdot \left(-2 \cdot \sqrt{1 + \color{blue}{\frac{U}{\left(2 \cdot J\right) \cdot \cos \left(\frac{K}{2}\right)} \cdot \frac{U}{\left(2 \cdot J\right) \cdot \cos \left(\frac{K}{2}\right)}}}\right)\right) \]

      hypot-1-def [=>]33.0

      \[ J \cdot \left(\cos \left(\frac{K}{2}\right) \cdot \left(-2 \cdot \color{blue}{\mathsf{hypot}\left(1, \frac{U}{\left(2 \cdot J\right) \cdot \cos \left(\frac{K}{2}\right)}\right)}\right)\right) \]

      *-commutative [=>]33.0

      \[ J \cdot \left(\cos \left(\frac{K}{2}\right) \cdot \left(-2 \cdot \mathsf{hypot}\left(1, \frac{U}{\color{blue}{\left(J \cdot 2\right)} \cdot \cos \left(\frac{K}{2}\right)}\right)\right)\right) \]

      associate-*l* [=>]33.0

      \[ J \cdot \left(\cos \left(\frac{K}{2}\right) \cdot \left(-2 \cdot \mathsf{hypot}\left(1, \frac{U}{\color{blue}{J \cdot \left(2 \cdot \cos \left(\frac{K}{2}\right)\right)}}\right)\right)\right) \]
    3. Taylor expanded in J around 0 72.8%

      \[\leadsto \color{blue}{-1 \cdot U} \]
    4. Simplified72.8%

      \[\leadsto \color{blue}{-U} \]
      Proof

      [Start]72.8

      \[ -1 \cdot U \]

      neg-mul-1 [<=]72.8

      \[ \color{blue}{-U} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification90.4%

    \[\leadsto \begin{array}{l} \mathbf{if}\;U \leq -2 \cdot 10^{+202}:\\ \;\;\;\;-2 \cdot \frac{J}{\frac{U}{J}} - U\\ \mathbf{elif}\;U \leq 2.1 \cdot 10^{+238}:\\ \;\;\;\;\left(J \cdot \left(-2 \cdot \cos \left(\frac{K}{2}\right)\right)\right) \cdot \mathsf{hypot}\left(1, \frac{U}{J \cdot \left(2 \cdot \cos \left(\frac{K}{2}\right)\right)}\right)\\ \mathbf{else}:\\ \;\;\;\;-U\\ \end{array} \]

Alternatives

Alternative 1
Accuracy62.5%
Cost33680
\[\begin{array}{l} t_0 := \cos \left(\frac{K}{2}\right)\\ \mathbf{if}\;t_0 \leq -0.04:\\ \;\;\;\;U + J \cdot \left(2 \cdot \frac{J}{U}\right)\\ \mathbf{elif}\;t_0 \leq 0.6:\\ \;\;\;\;\left(J \cdot \left(-2 \cdot t_0\right)\right) \cdot \left(1 + \frac{U \cdot U}{J \cdot J} \cdot 0.125\right)\\ \mathbf{elif}\;t_0 \leq 0.71:\\ \;\;\;\;-U\\ \mathbf{elif}\;t_0 \leq 0.828:\\ \;\;\;\;\left(-2 \cdot J\right) \cdot \cos \left(K \cdot 0.5\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{hypot}\left(1, \frac{U}{J \cdot 2}\right) \cdot \left(-2 \cdot J\right)\\ \end{array} \]
Alternative 2
Accuracy85.5%
Cost20616
\[\begin{array}{l} t_0 := \cos \left(\frac{K}{2}\right)\\ \mathbf{if}\;U \leq -2 \cdot 10^{+202}:\\ \;\;\;\;-2 \cdot \frac{J}{\frac{U}{J}} - U\\ \mathbf{elif}\;U \leq 9 \cdot 10^{+237}:\\ \;\;\;\;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)\\ \mathbf{else}:\\ \;\;\;\;-U\\ \end{array} \]
Alternative 3
Accuracy73.1%
Cost14092
\[\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 -5.2 \cdot 10^{-120}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;J \leq -1.15 \cdot 10^{-288}:\\ \;\;\;\;\frac{-2}{U} \cdot \left(J \cdot J\right) - U\\ \mathbf{elif}\;J \leq 1.75 \cdot 10^{-239}:\\ \;\;\;\;U\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 4
Accuracy63.9%
Cost7568
\[\begin{array}{l} t_0 := \mathsf{hypot}\left(1, \frac{U}{J \cdot 2}\right) \cdot \left(-2 \cdot J\right)\\ t_1 := -2 \cdot \frac{J}{\frac{U}{J}} - U\\ \mathbf{if}\;U \leq -7.6 \cdot 10^{+192}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;U \leq -1.8 \cdot 10^{-114}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;U \leq 1.6 \cdot 10^{-133}:\\ \;\;\;\;\left(-2 \cdot J\right) \cdot \cos \left(K \cdot 0.5\right)\\ \mathbf{elif}\;U \leq 2.1 \cdot 10^{+222}:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 5
Accuracy59.3%
Cost7508
\[\begin{array}{l} t_0 := \left(-2 \cdot J\right) \cdot \cos \left(K \cdot 0.5\right)\\ \mathbf{if}\;J \leq -3.9 \cdot 10^{-75}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;J \leq -6 \cdot 10^{-289}:\\ \;\;\;\;-U\\ \mathbf{elif}\;J \leq 3.7 \cdot 10^{-181}:\\ \;\;\;\;U\\ \mathbf{elif}\;J \leq 2.05 \cdot 10^{-106}:\\ \;\;\;\;-U\\ \mathbf{elif}\;J \leq 3.8 \cdot 10^{-96}:\\ \;\;\;\;U\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 6
Accuracy26.1%
Cost1052
\[\begin{array}{l} \mathbf{if}\;J \leq -4.6 \cdot 10^{-55}:\\ \;\;\;\;U\\ \mathbf{elif}\;J \leq -9.98 \cdot 10^{-132}:\\ \;\;\;\;-U\\ \mathbf{elif}\;J \leq -7.8 \cdot 10^{-162}:\\ \;\;\;\;U\\ \mathbf{elif}\;J \leq -2.2 \cdot 10^{-289}:\\ \;\;\;\;-U\\ \mathbf{elif}\;J \leq 1.4 \cdot 10^{-181}:\\ \;\;\;\;U\\ \mathbf{elif}\;J \leq 1.62 \cdot 10^{-105}:\\ \;\;\;\;-U\\ \mathbf{elif}\;J \leq 1.4 \cdot 10^{-94}:\\ \;\;\;\;U\\ \mathbf{else}:\\ \;\;\;\;-U\\ \end{array} \]
Alternative 7
Accuracy39.4%
Cost852
\[\begin{array}{l} \mathbf{if}\;J \leq -1.95 \cdot 10^{+86}:\\ \;\;\;\;-2 \cdot J\\ \mathbf{elif}\;J \leq -1.9 \cdot 10^{-289}:\\ \;\;\;\;-U\\ \mathbf{elif}\;J \leq 8.6 \cdot 10^{-181}:\\ \;\;\;\;U\\ \mathbf{elif}\;J \leq 1.1 \cdot 10^{-107}:\\ \;\;\;\;-U\\ \mathbf{elif}\;J \leq 1.65 \cdot 10^{-95}:\\ \;\;\;\;U\\ \mathbf{else}:\\ \;\;\;\;-2 \cdot J\\ \end{array} \]
Alternative 8
Accuracy39.4%
Cost852
\[\begin{array}{l} \mathbf{if}\;J \leq -4.2 \cdot 10^{+79}:\\ \;\;\;\;-2 \cdot J\\ \mathbf{elif}\;J \leq -1.4 \cdot 10^{-289}:\\ \;\;\;\;-2 \cdot \frac{J}{\frac{U}{J}} - U\\ \mathbf{elif}\;J \leq 2.05 \cdot 10^{-181}:\\ \;\;\;\;U\\ \mathbf{elif}\;J \leq 1.85 \cdot 10^{-105}:\\ \;\;\;\;-U\\ \mathbf{elif}\;J \leq 9 \cdot 10^{-96}:\\ \;\;\;\;U\\ \mathbf{else}:\\ \;\;\;\;-2 \cdot J\\ \end{array} \]
Alternative 9
Accuracy39.4%
Cost852
\[\begin{array}{l} \mathbf{if}\;J \leq -2.7 \cdot 10^{+82}:\\ \;\;\;\;-2 \cdot J\\ \mathbf{elif}\;J \leq -1.35 \cdot 10^{-288}:\\ \;\;\;\;\frac{-2}{U} \cdot \left(J \cdot J\right) - U\\ \mathbf{elif}\;J \leq 9 \cdot 10^{-181}:\\ \;\;\;\;U\\ \mathbf{elif}\;J \leq 5 \cdot 10^{-106}:\\ \;\;\;\;-U\\ \mathbf{elif}\;J \leq 1.65 \cdot 10^{-95}:\\ \;\;\;\;U\\ \mathbf{else}:\\ \;\;\;\;-2 \cdot J\\ \end{array} \]
Alternative 10
Accuracy27.2%
Cost64
\[U \]

Error

Reproduce?

herbie shell --seed 2023160 
(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)))))