?

Average Accuracy: 71.3% → 92.7%
Time: 21.5s
Precision: binary64
Cost: 47300

?

\[\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}\;\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}} \leq 2 \cdot 10^{+303}:\\ \;\;\;\;-2 \cdot \left(t_0 \cdot \left(J \cdot \mathsf{hypot}\left(1, \frac{U}{2 \cdot \left(J \cdot t_0\right)}\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left|\left(J \cdot J\right) \cdot \frac{-2}{U} - U\right|\\ \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 (<=
        (* (* (* -2.0 J) t_0) (sqrt (+ 1.0 (pow (/ U (* t_0 (* J 2.0))) 2.0))))
        2e+303)
     (* -2.0 (* t_0 (* J (hypot 1.0 (/ U (* 2.0 (* J t_0)))))))
     (fabs (- (* (* J J) (/ -2.0 U)) 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 ((((-2.0 * J) * t_0) * sqrt((1.0 + pow((U / (t_0 * (J * 2.0))), 2.0)))) <= 2e+303) {
		tmp = -2.0 * (t_0 * (J * hypot(1.0, (U / (2.0 * (J * t_0))))));
	} else {
		tmp = fabs((((J * J) * (-2.0 / U)) - 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 ((((-2.0 * J) * t_0) * Math.sqrt((1.0 + Math.pow((U / (t_0 * (J * 2.0))), 2.0)))) <= 2e+303) {
		tmp = -2.0 * (t_0 * (J * Math.hypot(1.0, (U / (2.0 * (J * t_0))))));
	} else {
		tmp = Math.abs((((J * J) * (-2.0 / U)) - 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 (((-2.0 * J) * t_0) * math.sqrt((1.0 + math.pow((U / (t_0 * (J * 2.0))), 2.0)))) <= 2e+303:
		tmp = -2.0 * (t_0 * (J * math.hypot(1.0, (U / (2.0 * (J * t_0))))))
	else:
		tmp = math.fabs((((J * J) * (-2.0 / U)) - 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 (Float64(Float64(Float64(-2.0 * J) * t_0) * sqrt(Float64(1.0 + (Float64(U / Float64(t_0 * Float64(J * 2.0))) ^ 2.0)))) <= 2e+303)
		tmp = Float64(-2.0 * Float64(t_0 * Float64(J * hypot(1.0, Float64(U / Float64(2.0 * Float64(J * t_0)))))));
	else
		tmp = abs(Float64(Float64(Float64(J * J) * Float64(-2.0 / U)) - 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 ((((-2.0 * J) * t_0) * sqrt((1.0 + ((U / (t_0 * (J * 2.0))) ^ 2.0)))) <= 2e+303)
		tmp = -2.0 * (t_0 * (J * hypot(1.0, (U / (2.0 * (J * t_0))))));
	else
		tmp = abs((((J * J) * (-2.0 / U)) - 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[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], 2e+303], N[(-2.0 * N[(t$95$0 * N[(J * N[Sqrt[1.0 ^ 2 + N[(U / N[(2.0 * N[(J * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Abs[N[(N[(N[(J * J), $MachinePrecision] * N[(-2.0 / U), $MachinePrecision]), $MachinePrecision] - U), $MachinePrecision]], $MachinePrecision]]]
\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}\;\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}} \leq 2 \cdot 10^{+303}:\\
\;\;\;\;-2 \cdot \left(t_0 \cdot \left(J \cdot \mathsf{hypot}\left(1, \frac{U}{2 \cdot \left(J \cdot t_0\right)}\right)\right)\right)\\

\mathbf{else}:\\
\;\;\;\;\left|\left(J \cdot J\right) \cdot \frac{-2}{U} - U\right|\\


\end{array}

Error?

Try it out?

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation?

  1. Split input into 2 regimes
  2. 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)))) < 2e303

    1. Initial program 82.9%

      \[\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. Simplified91.9%

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

      [Start]82.9

      \[ \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}} \]

      associate-*l* [=>]82.9

      \[ \color{blue}{\left(-2 \cdot \left(J \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}} \]

      associate-*l* [=>]82.9

      \[ \color{blue}{-2 \cdot \left(\left(J \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}}\right)} \]

      *-commutative [=>]82.9

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

      associate-*l* [=>]82.9

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

      unpow2 [=>]82.9

      \[ -2 \cdot \left(\cos \left(\frac{K}{2}\right) \cdot \left(J \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 [=>]91.9

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

      associate-*l* [=>]91.9

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

    if 2e303 < (*.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))))

    1. Initial program 3.1%

      \[\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. Simplified56.1%

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

      [Start]3.1

      \[ \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}} \]

      unpow2 [=>]3.1

      \[ \left(\left(-2 \cdot J\right) \cdot \cos \left(\frac{K}{2}\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 [=>]56.1

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

      associate-*l* [=>]56.1

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

      \[\leadsto \color{blue}{-2 \cdot \frac{{\cos \left(0.5 \cdot K\right)}^{2} \cdot {J}^{2}}{U} + -1 \cdot U} \]
    4. Simplified49.2%

      \[\leadsto \color{blue}{\frac{-2}{\frac{\frac{U}{J}}{J \cdot {\cos \left(0.5 \cdot K\right)}^{2}}} - U} \]
      Proof

      [Start]48.8

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

      mul-1-neg [=>]48.8

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

      unsub-neg [=>]48.8

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

      associate-*r/ [=>]48.8

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

      associate-/l* [=>]48.8

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

      *-commutative [=>]48.8

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

      unpow2 [=>]48.8

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

      associate-*l* [=>]48.8

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

      associate-/r* [=>]49.2

      \[ \frac{-2}{\color{blue}{\frac{\frac{U}{J}}{J \cdot {\cos \left(0.5 \cdot K\right)}^{2}}}} - U \]
    5. Taylor expanded in K around 0 49.2%

      \[\leadsto \frac{-2}{\frac{\frac{U}{J}}{\color{blue}{J}}} - U \]
    6. Applied egg-rr40.3%

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

      [Start]49.2

      \[ \frac{-2}{\frac{\frac{U}{J}}{J}} - U \]

      add-sqr-sqrt [=>]48.5

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

      sqrt-unprod [=>]40.3

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

      pow2 [=>]40.3

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

      associate-/r/ [=>]40.3

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

      *-commutative [=>]40.3

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

      clear-num [=>]40.3

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

      associate-/r/ [=>]40.3

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

      metadata-eval [=>]40.3

      \[ \sqrt{{\left(J \cdot \left(\color{blue}{-2} \cdot \frac{J}{U}\right) - U\right)}^{2}} \]
    7. Simplified96.9%

      \[\leadsto \color{blue}{\left|\left(J \cdot J\right) \cdot \frac{-2}{U} - U\right|} \]
      Proof

      [Start]40.3

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

      unpow2 [=>]40.3

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

      rem-sqrt-square [=>]97.5

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

      *-commutative [=>]97.5

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

      associate-*l* [<=]97.5

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

      associate-*r/ [=>]96.9

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

      associate-*l/ [=>]96.9

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

      associate-*r/ [<=]96.9

      \[ \left|\color{blue}{\left(J \cdot J\right) \cdot \frac{-2}{U}} - U\right| \]
  3. Recombined 2 regimes into one program.
  4. Final simplification92.7%

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

Alternatives

Alternative 1
Accuracy57.6%
Cost21212
\[\begin{array}{l} t_0 := \cos \left(K \cdot 0.5\right)\\ t_1 := \mathsf{fma}\left(J, -2 \cdot t_0, \frac{-0.25}{J} \cdot \frac{U \cdot U}{t_0}\right)\\ \mathbf{if}\;U \leq -1.6 \cdot 10^{+285}:\\ \;\;\;\;-U\\ \mathbf{elif}\;U \leq -2.5 \cdot 10^{+162}:\\ \;\;\;\;U\\ \mathbf{elif}\;U \leq -3.9 \cdot 10^{-22}:\\ \;\;\;\;\left(-2 \cdot J\right) \cdot t_0\\ \mathbf{elif}\;U \leq -1.3 \cdot 10^{-129}:\\ \;\;\;\;J \cdot \left(-2 \cdot \sqrt{1 + 0.25 \cdot \left(\frac{U}{J} \cdot \frac{U}{J}\right)}\right)\\ \mathbf{elif}\;U \leq 8 \cdot 10^{+31}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;U \leq 10^{+91}:\\ \;\;\;\;-U\\ \mathbf{elif}\;U \leq 1.35 \cdot 10^{+143}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;J \cdot \left(J \cdot \frac{-1 - \cos K}{U}\right) - U\\ \end{array} \]
Alternative 2
Accuracy57.5%
Cost8028
\[\begin{array}{l} t_0 := \left(-2 \cdot J\right) \cdot \cos \left(K \cdot 0.5\right)\\ \mathbf{if}\;U \leq -1 \cdot 10^{+287}:\\ \;\;\;\;-U\\ \mathbf{elif}\;U \leq -2.55 \cdot 10^{+162}:\\ \;\;\;\;U\\ \mathbf{elif}\;U \leq -1.8 \cdot 10^{-20}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;U \leq -1.35 \cdot 10^{-129}:\\ \;\;\;\;J \cdot \left(-2 \cdot \sqrt{1 + 0.25 \cdot \left(\frac{U}{J} \cdot \frac{U}{J}\right)}\right)\\ \mathbf{elif}\;U \leq 10^{+34}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;U \leq 5.5 \cdot 10^{+91}:\\ \;\;\;\;-U\\ \mathbf{elif}\;U \leq 8.2 \cdot 10^{+142}:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;J \cdot \left(J \cdot \frac{-1 - \cos K}{U}\right) - U\\ \end{array} \]
Alternative 3
Accuracy58.4%
Cost7764
\[\begin{array}{l} t_0 := \left(-2 \cdot J\right) \cdot \cos \left(K \cdot 0.5\right)\\ \mathbf{if}\;U \leq -1 \cdot 10^{+284}:\\ \;\;\;\;-U\\ \mathbf{elif}\;U \leq -5.4 \cdot 10^{+162}:\\ \;\;\;\;U\\ \mathbf{elif}\;U \leq 1.65 \cdot 10^{+40}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;U \leq 2.4 \cdot 10^{+90}:\\ \;\;\;\;-U\\ \mathbf{elif}\;U \leq 1.3 \cdot 10^{+143}:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;J \cdot \left(J \cdot \frac{-1 - \cos K}{U}\right) - U\\ \end{array} \]
Alternative 4
Accuracy58.4%
Cost7509
\[\begin{array}{l} \mathbf{if}\;U \leq -8.5 \cdot 10^{+283}:\\ \;\;\;\;-U\\ \mathbf{elif}\;U \leq -1.5 \cdot 10^{+162}:\\ \;\;\;\;U\\ \mathbf{elif}\;U \leq 3.2 \cdot 10^{+37} \lor \neg \left(U \leq 5 \cdot 10^{+94}\right) \land U \leq 1.95 \cdot 10^{+143}:\\ \;\;\;\;\left(-2 \cdot J\right) \cdot \cos \left(K \cdot 0.5\right)\\ \mathbf{else}:\\ \;\;\;\;-U\\ \end{array} \]
Alternative 5
Accuracy38.2%
Cost853
\[\begin{array}{l} \mathbf{if}\;U \leq -5.2 \cdot 10^{+286}:\\ \;\;\;\;-U\\ \mathbf{elif}\;U \leq -1.12 \cdot 10^{+162}:\\ \;\;\;\;U\\ \mathbf{elif}\;U \leq 1.05 \cdot 10^{-56} \lor \neg \left(U \leq 2.05 \cdot 10^{+117}\right) \land U \leq 9.5 \cdot 10^{+142}:\\ \;\;\;\;-2 \cdot J\\ \mathbf{else}:\\ \;\;\;\;-U\\ \end{array} \]
Alternative 6
Accuracy27.3%
Cost392
\[\begin{array}{l} \mathbf{if}\;U \leq -1 \cdot 10^{+287}:\\ \;\;\;\;-U\\ \mathbf{elif}\;U \leq -6.5 \cdot 10^{-141}:\\ \;\;\;\;U\\ \mathbf{else}:\\ \;\;\;\;-U\\ \end{array} \]
Alternative 7
Accuracy27.0%
Cost64
\[U \]

Error

Reproduce?

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