Maksimov and Kolovsky, Equation (4)

Percentage Accurate: 86.8% → 100.0%
Time: 16.2s
Alternatives: 31
Speedup: 2.5×

Specification

?
\[\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
 (+ (* (* 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:

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Accuracy vs Speed?

Herbie found 31 alternatives:

AlternativeAccuracySpeedup
The accuracy (vertical axis) and speed (horizontal axis) of each alternatives. Up and to the right is better. The red square shows the initial program, and each blue circle shows an alternative.The line shows the best available speed-accuracy tradeoffs.

Initial Program: 86.8% accurate, 1.0× speedup?

\[\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
 (+ (* (* 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}

Alternative 1: 100.0% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \mathsf{fma}\left(J \cdot \cos \left(\frac{K}{2}\right), 2 \cdot \sinh \ell, U\right) \end{array} \]
(FPCore (J l K U)
 :precision binary64
 (fma (* J (cos (/ K 2.0))) (* 2.0 (sinh l)) U))
double code(double J, double l, double K, double U) {
	return fma((J * cos((K / 2.0))), (2.0 * sinh(l)), U);
}
function code(J, l, K, U)
	return fma(Float64(J * cos(Float64(K / 2.0))), Float64(2.0 * sinh(l)), U)
end
code[J_, l_, K_, U_] := N[(N[(J * N[Cos[N[(K / 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(2.0 * N[Sinh[l], $MachinePrecision]), $MachinePrecision] + U), $MachinePrecision]
\begin{array}{l}

\\
\mathsf{fma}\left(J \cdot \cos \left(\frac{K}{2}\right), 2 \cdot \sinh \ell, U\right)
\end{array}
Derivation
  1. Initial program 89.3%

    \[\left(J \cdot \left(e^{\ell} - e^{-\ell}\right)\right) \cdot \cos \left(\frac{K}{2}\right) + U \]
  2. Add Preprocessing
  3. Step-by-step derivation
    1. associate-*l*N/A

      \[\leadsto J \cdot \left(\left(e^{\ell} - e^{\mathsf{neg}\left(\ell\right)}\right) \cdot \cos \left(\frac{K}{2}\right)\right) + U \]
    2. *-commutativeN/A

      \[\leadsto J \cdot \left(\cos \left(\frac{K}{2}\right) \cdot \left(e^{\ell} - e^{\mathsf{neg}\left(\ell\right)}\right)\right) + U \]
    3. sub-negN/A

      \[\leadsto J \cdot \left(\cos \left(\frac{K}{2}\right) \cdot \left(e^{\ell} + \left(\mathsf{neg}\left(e^{\mathsf{neg}\left(\ell\right)}\right)\right)\right)\right) + U \]
    4. neg-mul-1N/A

      \[\leadsto J \cdot \left(\cos \left(\frac{K}{2}\right) \cdot \left(e^{\ell} + -1 \cdot e^{\mathsf{neg}\left(\ell\right)}\right)\right) + U \]
    5. exp-negN/A

      \[\leadsto J \cdot \left(\cos \left(\frac{K}{2}\right) \cdot \left(e^{\ell} + -1 \cdot \frac{1}{e^{\ell}}\right)\right) + U \]
    6. div-invN/A

      \[\leadsto J \cdot \left(\cos \left(\frac{K}{2}\right) \cdot \left(e^{\ell} + \frac{-1}{e^{\ell}}\right)\right) + U \]
    7. associate-*l*N/A

      \[\leadsto \left(J \cdot \cos \left(\frac{K}{2}\right)\right) \cdot \left(e^{\ell} + \frac{-1}{e^{\ell}}\right) + U \]
    8. fma-defineN/A

      \[\leadsto \mathsf{fma}\left(J \cdot \cos \left(\frac{K}{2}\right), \color{blue}{e^{\ell} + \frac{-1}{e^{\ell}}}, U\right) \]
    9. fma-lowering-fma.f64N/A

      \[\leadsto \mathsf{fma.f64}\left(\left(J \cdot \cos \left(\frac{K}{2}\right)\right), \color{blue}{\left(e^{\ell} + \frac{-1}{e^{\ell}}\right)}, U\right) \]
  4. Applied egg-rr100.0%

    \[\leadsto \color{blue}{\mathsf{fma}\left(J \cdot \cos \left(\frac{K}{2}\right), 2 \cdot \sinh \ell, U\right)} \]
  5. Add Preprocessing

Alternative 2: 91.3% accurate, 1.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \cos \left(\frac{K}{2}\right)\\ \mathbf{if}\;t\_0 \leq 0.9975:\\ \;\;\;\;U + t\_0 \cdot \left(J \cdot \left(\ell \cdot \left(2 + \left(\ell \cdot \ell\right) \cdot 0.3333333333333333\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;U \cdot \left(1 + \frac{\ell \cdot \left(J \cdot \left(2 + \ell \cdot \left(\ell \cdot \left(0.3333333333333333 + \ell \cdot \left(\ell \cdot \left(0.016666666666666666 + \left(\ell \cdot \ell\right) \cdot 0.0003968253968253968\right)\right)\right)\right)\right)\right)}{U}\right)\\ \end{array} \end{array} \]
(FPCore (J l K U)
 :precision binary64
 (let* ((t_0 (cos (/ K 2.0))))
   (if (<= t_0 0.9975)
     (+ U (* t_0 (* J (* l (+ 2.0 (* (* l l) 0.3333333333333333))))))
     (*
      U
      (+
       1.0
       (/
        (*
         l
         (*
          J
          (+
           2.0
           (*
            l
            (*
             l
             (+
              0.3333333333333333
              (*
               l
               (*
                l
                (+
                 0.016666666666666666
                 (* (* l l) 0.0003968253968253968))))))))))
        U))))))
double code(double J, double l, double K, double U) {
	double t_0 = cos((K / 2.0));
	double tmp;
	if (t_0 <= 0.9975) {
		tmp = U + (t_0 * (J * (l * (2.0 + ((l * l) * 0.3333333333333333)))));
	} else {
		tmp = U * (1.0 + ((l * (J * (2.0 + (l * (l * (0.3333333333333333 + (l * (l * (0.016666666666666666 + ((l * l) * 0.0003968253968253968)))))))))) / 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) :: tmp
    t_0 = cos((k / 2.0d0))
    if (t_0 <= 0.9975d0) then
        tmp = u + (t_0 * (j * (l * (2.0d0 + ((l * l) * 0.3333333333333333d0)))))
    else
        tmp = u * (1.0d0 + ((l * (j * (2.0d0 + (l * (l * (0.3333333333333333d0 + (l * (l * (0.016666666666666666d0 + ((l * l) * 0.0003968253968253968d0)))))))))) / u))
    end if
    code = tmp
end function
public static double code(double J, double l, double K, double U) {
	double t_0 = Math.cos((K / 2.0));
	double tmp;
	if (t_0 <= 0.9975) {
		tmp = U + (t_0 * (J * (l * (2.0 + ((l * l) * 0.3333333333333333)))));
	} else {
		tmp = U * (1.0 + ((l * (J * (2.0 + (l * (l * (0.3333333333333333 + (l * (l * (0.016666666666666666 + ((l * l) * 0.0003968253968253968)))))))))) / U));
	}
	return tmp;
}
def code(J, l, K, U):
	t_0 = math.cos((K / 2.0))
	tmp = 0
	if t_0 <= 0.9975:
		tmp = U + (t_0 * (J * (l * (2.0 + ((l * l) * 0.3333333333333333)))))
	else:
		tmp = U * (1.0 + ((l * (J * (2.0 + (l * (l * (0.3333333333333333 + (l * (l * (0.016666666666666666 + ((l * l) * 0.0003968253968253968)))))))))) / U))
	return tmp
function code(J, l, K, U)
	t_0 = cos(Float64(K / 2.0))
	tmp = 0.0
	if (t_0 <= 0.9975)
		tmp = Float64(U + Float64(t_0 * Float64(J * Float64(l * Float64(2.0 + Float64(Float64(l * l) * 0.3333333333333333))))));
	else
		tmp = Float64(U * Float64(1.0 + Float64(Float64(l * Float64(J * Float64(2.0 + Float64(l * Float64(l * Float64(0.3333333333333333 + Float64(l * Float64(l * Float64(0.016666666666666666 + Float64(Float64(l * l) * 0.0003968253968253968)))))))))) / U)));
	end
	return tmp
end
function tmp_2 = code(J, l, K, U)
	t_0 = cos((K / 2.0));
	tmp = 0.0;
	if (t_0 <= 0.9975)
		tmp = U + (t_0 * (J * (l * (2.0 + ((l * l) * 0.3333333333333333)))));
	else
		tmp = U * (1.0 + ((l * (J * (2.0 + (l * (l * (0.3333333333333333 + (l * (l * (0.016666666666666666 + ((l * l) * 0.0003968253968253968)))))))))) / U));
	end
	tmp_2 = tmp;
end
code[J_, l_, K_, U_] := Block[{t$95$0 = N[Cos[N[(K / 2.0), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$0, 0.9975], N[(U + N[(t$95$0 * N[(J * N[(l * N[(2.0 + N[(N[(l * l), $MachinePrecision] * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(U * N[(1.0 + N[(N[(l * N[(J * N[(2.0 + N[(l * N[(l * N[(0.3333333333333333 + N[(l * N[(l * N[(0.016666666666666666 + N[(N[(l * l), $MachinePrecision] * 0.0003968253968253968), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \cos \left(\frac{K}{2}\right)\\
\mathbf{if}\;t\_0 \leq 0.9975:\\
\;\;\;\;U + t\_0 \cdot \left(J \cdot \left(\ell \cdot \left(2 + \left(\ell \cdot \ell\right) \cdot 0.3333333333333333\right)\right)\right)\\

\mathbf{else}:\\
\;\;\;\;U \cdot \left(1 + \frac{\ell \cdot \left(J \cdot \left(2 + \ell \cdot \left(\ell \cdot \left(0.3333333333333333 + \ell \cdot \left(\ell \cdot \left(0.016666666666666666 + \left(\ell \cdot \ell\right) \cdot 0.0003968253968253968\right)\right)\right)\right)\right)\right)}{U}\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (cos.f64 (/.f64 K #s(literal 2 binary64))) < 0.99750000000000005

    1. Initial program 86.5%

      \[\left(J \cdot \left(e^{\ell} - e^{-\ell}\right)\right) \cdot \cos \left(\frac{K}{2}\right) + U \]
    2. Add Preprocessing
    3. Taylor expanded in l around 0

      \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(J, \color{blue}{\left(\ell \cdot \left(2 + \frac{1}{3} \cdot {\ell}^{2}\right)\right)}\right), \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right), U\right) \]
    4. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\ell, \left(2 + \frac{1}{3} \cdot {\ell}^{2}\right)\right)\right), \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right), U\right) \]
      2. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \left(\frac{1}{3} \cdot {\ell}^{2}\right)\right)\right)\right), \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right), U\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\frac{1}{3}, \left({\ell}^{2}\right)\right)\right)\right)\right), \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right), U\right) \]
      4. unpow2N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\frac{1}{3}, \left(\ell \cdot \ell\right)\right)\right)\right)\right), \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right), U\right) \]
      5. *-lowering-*.f6487.4%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\ell, \ell\right)\right)\right)\right)\right), \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right), U\right) \]
    5. Simplified87.4%

      \[\leadsto \left(J \cdot \color{blue}{\left(\ell \cdot \left(2 + 0.3333333333333333 \cdot \left(\ell \cdot \ell\right)\right)\right)}\right) \cdot \cos \left(\frac{K}{2}\right) + U \]

    if 0.99750000000000005 < (cos.f64 (/.f64 K #s(literal 2 binary64)))

    1. Initial program 92.2%

      \[\left(J \cdot \left(e^{\ell} - e^{-\ell}\right)\right) \cdot \cos \left(\frac{K}{2}\right) + U \]
    2. Step-by-step derivation
      1. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\left(\left(J \cdot \left(e^{\ell} - e^{\mathsf{neg}\left(\ell\right)}\right)\right) \cdot \cos \left(\frac{K}{2}\right)\right), \color{blue}{U}\right) \]
      2. associate-*l*N/A

        \[\leadsto \mathsf{+.f64}\left(\left(J \cdot \left(\left(e^{\ell} - e^{\mathsf{neg}\left(\ell\right)}\right) \cdot \cos \left(\frac{K}{2}\right)\right)\right), U\right) \]
      3. *-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\left(\left(\left(e^{\ell} - e^{\mathsf{neg}\left(\ell\right)}\right) \cdot \cos \left(\frac{K}{2}\right)\right) \cdot J\right), U\right) \]
      4. associate-*l*N/A

        \[\leadsto \mathsf{+.f64}\left(\left(\left(e^{\ell} - e^{\mathsf{neg}\left(\ell\right)}\right) \cdot \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(e^{\ell} - e^{\mathsf{neg}\left(\ell\right)}\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
      6. sub-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(e^{\ell} + \left(\mathsf{neg}\left(e^{\mathsf{neg}\left(\ell\right)}\right)\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
      7. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\left(e^{\ell}\right), \left(\mathsf{neg}\left(e^{\mathsf{neg}\left(\ell\right)}\right)\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
      8. exp-lowering-exp.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \left(\mathsf{neg}\left(e^{\mathsf{neg}\left(\ell\right)}\right)\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
      9. exp-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \left(\mathsf{neg}\left(\frac{1}{e^{\ell}}\right)\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
      10. distribute-neg-fracN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \left(\frac{\mathsf{neg}\left(1\right)}{e^{\ell}}\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
      11. metadata-evalN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \left(\frac{-1}{e^{\ell}}\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
      12. /-lowering-/.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \mathsf{/.f64}\left(-1, \left(e^{\ell}\right)\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
      13. exp-lowering-exp.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \mathsf{/.f64}\left(-1, \mathsf{exp.f64}\left(\ell\right)\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
      14. *-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \mathsf{/.f64}\left(-1, \mathsf{exp.f64}\left(\ell\right)\right)\right), \left(J \cdot \cos \left(\frac{K}{2}\right)\right)\right), U\right) \]
      15. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \mathsf{/.f64}\left(-1, \mathsf{exp.f64}\left(\ell\right)\right)\right), \mathsf{*.f64}\left(J, \cos \left(\frac{K}{2}\right)\right)\right), U\right) \]
      16. cos-lowering-cos.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \mathsf{/.f64}\left(-1, \mathsf{exp.f64}\left(\ell\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\left(\frac{K}{2}\right)\right)\right)\right), U\right) \]
      17. /-lowering-/.f6492.2%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \mathsf{/.f64}\left(-1, \mathsf{exp.f64}\left(\ell\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
    3. Simplified92.2%

      \[\leadsto \color{blue}{\left(e^{\ell} + \frac{-1}{e^{\ell}}\right) \cdot \left(J \cdot \cos \left(\frac{K}{2}\right)\right) + U} \]
    4. Add Preprocessing
    5. Taylor expanded in l around 0

      \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\color{blue}{\left(\ell \cdot \left(2 + {\ell}^{2} \cdot \left(\frac{1}{3} + {\ell}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)}, \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
    6. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \left(2 + {\ell}^{2} \cdot \left(\frac{1}{3} + {\ell}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
      2. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \left({\ell}^{2} \cdot \left(\frac{1}{3} + {\ell}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\left({\ell}^{2}\right), \left(\frac{1}{3} + {\ell}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
      4. unpow2N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\left(\ell \cdot \ell\right), \left(\frac{1}{3} + {\ell}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \left(\frac{1}{3} + {\ell}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
      6. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \left({\ell}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
      7. unpow2N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \left(\left(\ell \cdot \ell\right) \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
      8. associate-*l*N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \left(\ell \cdot \left(\ell \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
      9. *-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \left(\ell \cdot \left(\left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right) \cdot \ell\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\ell, \left(\left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right) \cdot \ell\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
      11. *-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\ell, \left(\ell \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
      12. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
      13. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(\frac{1}{60}, \left(\frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
      14. *-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(\frac{1}{60}, \left({\ell}^{2} \cdot \frac{1}{2520}\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
      15. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(\frac{1}{60}, \mathsf{*.f64}\left(\left({\ell}^{2}\right), \frac{1}{2520}\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
      16. unpow2N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(\frac{1}{60}, \mathsf{*.f64}\left(\left(\ell \cdot \ell\right), \frac{1}{2520}\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
      17. *-lowering-*.f6493.9%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(\frac{1}{60}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \frac{1}{2520}\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
    7. Simplified93.9%

      \[\leadsto \color{blue}{\left(\ell \cdot \left(2 + \left(\ell \cdot \ell\right) \cdot \left(0.3333333333333333 + \ell \cdot \left(\ell \cdot \left(0.016666666666666666 + \left(\ell \cdot \ell\right) \cdot 0.0003968253968253968\right)\right)\right)\right)\right)} \cdot \left(J \cdot \cos \left(\frac{K}{2}\right)\right) + U \]
    8. Taylor expanded in U around inf

      \[\leadsto \color{blue}{U \cdot \left(1 + \frac{J \cdot \left(\ell \cdot \left(\cos \left(\frac{1}{2} \cdot K\right) \cdot \left(2 + {\ell}^{2} \cdot \left(\frac{1}{3} + {\ell}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right)}{U}\right)} \]
    9. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(U, \color{blue}{\left(1 + \frac{J \cdot \left(\ell \cdot \left(\cos \left(\frac{1}{2} \cdot K\right) \cdot \left(2 + {\ell}^{2} \cdot \left(\frac{1}{3} + {\ell}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right)}{U}\right)}\right) \]
      2. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(U, \mathsf{+.f64}\left(1, \color{blue}{\left(\frac{J \cdot \left(\ell \cdot \left(\cos \left(\frac{1}{2} \cdot K\right) \cdot \left(2 + {\ell}^{2} \cdot \left(\frac{1}{3} + {\ell}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right)}{U}\right)}\right)\right) \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(U, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\left(J \cdot \left(\ell \cdot \left(\cos \left(\frac{1}{2} \cdot K\right) \cdot \left(2 + {\ell}^{2} \cdot \left(\frac{1}{3} + {\ell}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right)\right), \color{blue}{U}\right)\right)\right) \]
    10. Simplified94.6%

      \[\leadsto \color{blue}{U \cdot \left(1 + \frac{\left(\cos \left(0.5 \cdot K\right) \cdot \ell\right) \cdot \left(\left(2 + \ell \cdot \left(\ell \cdot \left(0.3333333333333333 + \ell \cdot \left(\ell \cdot \left(0.016666666666666666 + \left(\ell \cdot \ell\right) \cdot 0.0003968253968253968\right)\right)\right)\right)\right) \cdot J\right)}{U}\right)} \]
    11. Taylor expanded in K around 0

      \[\leadsto \color{blue}{U \cdot \left(1 + \frac{J \cdot \left(\ell \cdot \left(2 + {\ell}^{2} \cdot \left(\frac{1}{3} + {\ell}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)}{U}\right)} \]
    12. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(U, \color{blue}{\left(1 + \frac{J \cdot \left(\ell \cdot \left(2 + {\ell}^{2} \cdot \left(\frac{1}{3} + {\ell}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)}{U}\right)}\right) \]
      2. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(U, \mathsf{+.f64}\left(1, \color{blue}{\left(\frac{J \cdot \left(\ell \cdot \left(2 + {\ell}^{2} \cdot \left(\frac{1}{3} + {\ell}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)}{U}\right)}\right)\right) \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(U, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\left(J \cdot \left(\ell \cdot \left(2 + {\ell}^{2} \cdot \left(\frac{1}{3} + {\ell}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right), \color{blue}{U}\right)\right)\right) \]
    13. Simplified94.6%

      \[\leadsto \color{blue}{U \cdot \left(1 + \frac{\ell \cdot \left(J \cdot \left(2 + \ell \cdot \left(\ell \cdot \left(0.3333333333333333 + \ell \cdot \left(\ell \cdot \left(0.016666666666666666 + \left(\ell \cdot \ell\right) \cdot 0.0003968253968253968\right)\right)\right)\right)\right)\right)}{U}\right)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification91.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\cos \left(\frac{K}{2}\right) \leq 0.9975:\\ \;\;\;\;U + \cos \left(\frac{K}{2}\right) \cdot \left(J \cdot \left(\ell \cdot \left(2 + \left(\ell \cdot \ell\right) \cdot 0.3333333333333333\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;U \cdot \left(1 + \frac{\ell \cdot \left(J \cdot \left(2 + \ell \cdot \left(\ell \cdot \left(0.3333333333333333 + \ell \cdot \left(\ell \cdot \left(0.016666666666666666 + \left(\ell \cdot \ell\right) \cdot 0.0003968253968253968\right)\right)\right)\right)\right)\right)}{U}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 89.3% accurate, 1.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;\cos \left(\frac{K}{2}\right) \leq 0.14:\\ \;\;\;\;U + \ell \cdot \left(\cos \left(K \cdot 0.5\right) \cdot \left(J \cdot \left(2 + \left(\ell \cdot \ell\right) \cdot 0.3333333333333333\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;U \cdot \left(1 + \frac{\ell \cdot \left(J \cdot \left(2 + \ell \cdot \left(\ell \cdot \left(0.3333333333333333 + \ell \cdot \left(\ell \cdot \left(0.016666666666666666 + \left(\ell \cdot \ell\right) \cdot 0.0003968253968253968\right)\right)\right)\right)\right)\right)}{U}\right)\\ \end{array} \end{array} \]
(FPCore (J l K U)
 :precision binary64
 (if (<= (cos (/ K 2.0)) 0.14)
   (+ U (* l (* (cos (* K 0.5)) (* J (+ 2.0 (* (* l l) 0.3333333333333333))))))
   (*
    U
    (+
     1.0
     (/
      (*
       l
       (*
        J
        (+
         2.0
         (*
          l
          (*
           l
           (+
            0.3333333333333333
            (*
             l
             (*
              l
              (+
               0.016666666666666666
               (* (* l l) 0.0003968253968253968))))))))))
      U)))))
double code(double J, double l, double K, double U) {
	double tmp;
	if (cos((K / 2.0)) <= 0.14) {
		tmp = U + (l * (cos((K * 0.5)) * (J * (2.0 + ((l * l) * 0.3333333333333333)))));
	} else {
		tmp = U * (1.0 + ((l * (J * (2.0 + (l * (l * (0.3333333333333333 + (l * (l * (0.016666666666666666 + ((l * l) * 0.0003968253968253968)))))))))) / 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) :: tmp
    if (cos((k / 2.0d0)) <= 0.14d0) then
        tmp = u + (l * (cos((k * 0.5d0)) * (j * (2.0d0 + ((l * l) * 0.3333333333333333d0)))))
    else
        tmp = u * (1.0d0 + ((l * (j * (2.0d0 + (l * (l * (0.3333333333333333d0 + (l * (l * (0.016666666666666666d0 + ((l * l) * 0.0003968253968253968d0)))))))))) / u))
    end if
    code = tmp
end function
public static double code(double J, double l, double K, double U) {
	double tmp;
	if (Math.cos((K / 2.0)) <= 0.14) {
		tmp = U + (l * (Math.cos((K * 0.5)) * (J * (2.0 + ((l * l) * 0.3333333333333333)))));
	} else {
		tmp = U * (1.0 + ((l * (J * (2.0 + (l * (l * (0.3333333333333333 + (l * (l * (0.016666666666666666 + ((l * l) * 0.0003968253968253968)))))))))) / U));
	}
	return tmp;
}
def code(J, l, K, U):
	tmp = 0
	if math.cos((K / 2.0)) <= 0.14:
		tmp = U + (l * (math.cos((K * 0.5)) * (J * (2.0 + ((l * l) * 0.3333333333333333)))))
	else:
		tmp = U * (1.0 + ((l * (J * (2.0 + (l * (l * (0.3333333333333333 + (l * (l * (0.016666666666666666 + ((l * l) * 0.0003968253968253968)))))))))) / U))
	return tmp
function code(J, l, K, U)
	tmp = 0.0
	if (cos(Float64(K / 2.0)) <= 0.14)
		tmp = Float64(U + Float64(l * Float64(cos(Float64(K * 0.5)) * Float64(J * Float64(2.0 + Float64(Float64(l * l) * 0.3333333333333333))))));
	else
		tmp = Float64(U * Float64(1.0 + Float64(Float64(l * Float64(J * Float64(2.0 + Float64(l * Float64(l * Float64(0.3333333333333333 + Float64(l * Float64(l * Float64(0.016666666666666666 + Float64(Float64(l * l) * 0.0003968253968253968)))))))))) / U)));
	end
	return tmp
end
function tmp_2 = code(J, l, K, U)
	tmp = 0.0;
	if (cos((K / 2.0)) <= 0.14)
		tmp = U + (l * (cos((K * 0.5)) * (J * (2.0 + ((l * l) * 0.3333333333333333)))));
	else
		tmp = U * (1.0 + ((l * (J * (2.0 + (l * (l * (0.3333333333333333 + (l * (l * (0.016666666666666666 + ((l * l) * 0.0003968253968253968)))))))))) / U));
	end
	tmp_2 = tmp;
end
code[J_, l_, K_, U_] := If[LessEqual[N[Cos[N[(K / 2.0), $MachinePrecision]], $MachinePrecision], 0.14], N[(U + N[(l * N[(N[Cos[N[(K * 0.5), $MachinePrecision]], $MachinePrecision] * N[(J * N[(2.0 + N[(N[(l * l), $MachinePrecision] * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(U * N[(1.0 + N[(N[(l * N[(J * N[(2.0 + N[(l * N[(l * N[(0.3333333333333333 + N[(l * N[(l * N[(0.016666666666666666 + N[(N[(l * l), $MachinePrecision] * 0.0003968253968253968), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;\cos \left(\frac{K}{2}\right) \leq 0.14:\\
\;\;\;\;U + \ell \cdot \left(\cos \left(K \cdot 0.5\right) \cdot \left(J \cdot \left(2 + \left(\ell \cdot \ell\right) \cdot 0.3333333333333333\right)\right)\right)\\

\mathbf{else}:\\
\;\;\;\;U \cdot \left(1 + \frac{\ell \cdot \left(J \cdot \left(2 + \ell \cdot \left(\ell \cdot \left(0.3333333333333333 + \ell \cdot \left(\ell \cdot \left(0.016666666666666666 + \left(\ell \cdot \ell\right) \cdot 0.0003968253968253968\right)\right)\right)\right)\right)\right)}{U}\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (cos.f64 (/.f64 K #s(literal 2 binary64))) < 0.14000000000000001

    1. Initial program 87.5%

      \[\left(J \cdot \left(e^{\ell} - e^{-\ell}\right)\right) \cdot \cos \left(\frac{K}{2}\right) + U \]
    2. Add Preprocessing
    3. Taylor expanded in l around 0

      \[\leadsto \mathsf{+.f64}\left(\color{blue}{\left(\ell \cdot \left(\frac{1}{3} \cdot \left(J \cdot \left({\ell}^{2} \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) + 2 \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right)\right)}, U\right) \]
    4. Step-by-step derivation
      1. distribute-rgt-inN/A

        \[\leadsto \mathsf{+.f64}\left(\left(\left(\frac{1}{3} \cdot \left(J \cdot \left({\ell}^{2} \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right)\right) \cdot \ell + \left(2 \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) \cdot \ell\right), U\right) \]
      2. fma-defineN/A

        \[\leadsto \mathsf{+.f64}\left(\left(\mathsf{fma}\left(\frac{1}{3} \cdot \left(J \cdot \left({\ell}^{2} \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right), \ell, \left(2 \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) \cdot \ell\right)\right), U\right) \]
      3. *-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\left(\mathsf{fma}\left(\frac{1}{3} \cdot \left(J \cdot \left(\cos \left(\frac{1}{2} \cdot K\right) \cdot {\ell}^{2}\right)\right), \ell, \left(2 \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) \cdot \ell\right)\right), U\right) \]
      4. associate-*r*N/A

        \[\leadsto \mathsf{+.f64}\left(\left(\mathsf{fma}\left(\frac{1}{3} \cdot \left(\left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right) \cdot {\ell}^{2}\right), \ell, \left(2 \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) \cdot \ell\right)\right), U\right) \]
      5. associate-*l*N/A

        \[\leadsto \mathsf{+.f64}\left(\left(\mathsf{fma}\left(\left(\frac{1}{3} \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) \cdot {\ell}^{2}, \ell, \left(2 \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) \cdot \ell\right)\right), U\right) \]
      6. *-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\left(\mathsf{fma}\left({\ell}^{2} \cdot \left(\frac{1}{3} \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right), \ell, \left(2 \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) \cdot \ell\right)\right), U\right) \]
      7. fma-undefineN/A

        \[\leadsto \mathsf{+.f64}\left(\left(\left({\ell}^{2} \cdot \left(\frac{1}{3} \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right)\right) \cdot \ell + \left(2 \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) \cdot \ell\right), U\right) \]
      8. distribute-rgt-inN/A

        \[\leadsto \mathsf{+.f64}\left(\left(\ell \cdot \left({\ell}^{2} \cdot \left(\frac{1}{3} \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) + 2 \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right)\right), U\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\ell, \left({\ell}^{2} \cdot \left(\frac{1}{3} \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) + 2 \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right)\right), U\right) \]
    5. Simplified83.5%

      \[\leadsto \color{blue}{\ell \cdot \left(\cos \left(0.5 \cdot K\right) \cdot \left(J \cdot \left(2 + 0.3333333333333333 \cdot \left(\ell \cdot \ell\right)\right)\right)\right)} + U \]

    if 0.14000000000000001 < (cos.f64 (/.f64 K #s(literal 2 binary64)))

    1. Initial program 90.1%

      \[\left(J \cdot \left(e^{\ell} - e^{-\ell}\right)\right) \cdot \cos \left(\frac{K}{2}\right) + U \]
    2. Step-by-step derivation
      1. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\left(\left(J \cdot \left(e^{\ell} - e^{\mathsf{neg}\left(\ell\right)}\right)\right) \cdot \cos \left(\frac{K}{2}\right)\right), \color{blue}{U}\right) \]
      2. associate-*l*N/A

        \[\leadsto \mathsf{+.f64}\left(\left(J \cdot \left(\left(e^{\ell} - e^{\mathsf{neg}\left(\ell\right)}\right) \cdot \cos \left(\frac{K}{2}\right)\right)\right), U\right) \]
      3. *-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\left(\left(\left(e^{\ell} - e^{\mathsf{neg}\left(\ell\right)}\right) \cdot \cos \left(\frac{K}{2}\right)\right) \cdot J\right), U\right) \]
      4. associate-*l*N/A

        \[\leadsto \mathsf{+.f64}\left(\left(\left(e^{\ell} - e^{\mathsf{neg}\left(\ell\right)}\right) \cdot \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(e^{\ell} - e^{\mathsf{neg}\left(\ell\right)}\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
      6. sub-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(e^{\ell} + \left(\mathsf{neg}\left(e^{\mathsf{neg}\left(\ell\right)}\right)\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
      7. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\left(e^{\ell}\right), \left(\mathsf{neg}\left(e^{\mathsf{neg}\left(\ell\right)}\right)\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
      8. exp-lowering-exp.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \left(\mathsf{neg}\left(e^{\mathsf{neg}\left(\ell\right)}\right)\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
      9. exp-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \left(\mathsf{neg}\left(\frac{1}{e^{\ell}}\right)\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
      10. distribute-neg-fracN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \left(\frac{\mathsf{neg}\left(1\right)}{e^{\ell}}\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
      11. metadata-evalN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \left(\frac{-1}{e^{\ell}}\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
      12. /-lowering-/.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \mathsf{/.f64}\left(-1, \left(e^{\ell}\right)\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
      13. exp-lowering-exp.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \mathsf{/.f64}\left(-1, \mathsf{exp.f64}\left(\ell\right)\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
      14. *-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \mathsf{/.f64}\left(-1, \mathsf{exp.f64}\left(\ell\right)\right)\right), \left(J \cdot \cos \left(\frac{K}{2}\right)\right)\right), U\right) \]
      15. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \mathsf{/.f64}\left(-1, \mathsf{exp.f64}\left(\ell\right)\right)\right), \mathsf{*.f64}\left(J, \cos \left(\frac{K}{2}\right)\right)\right), U\right) \]
      16. cos-lowering-cos.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \mathsf{/.f64}\left(-1, \mathsf{exp.f64}\left(\ell\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\left(\frac{K}{2}\right)\right)\right)\right), U\right) \]
      17. /-lowering-/.f6490.1%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \mathsf{/.f64}\left(-1, \mathsf{exp.f64}\left(\ell\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
    3. Simplified90.1%

      \[\leadsto \color{blue}{\left(e^{\ell} + \frac{-1}{e^{\ell}}\right) \cdot \left(J \cdot \cos \left(\frac{K}{2}\right)\right) + U} \]
    4. Add Preprocessing
    5. Taylor expanded in l around 0

      \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\color{blue}{\left(\ell \cdot \left(2 + {\ell}^{2} \cdot \left(\frac{1}{3} + {\ell}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)}, \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
    6. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \left(2 + {\ell}^{2} \cdot \left(\frac{1}{3} + {\ell}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
      2. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \left({\ell}^{2} \cdot \left(\frac{1}{3} + {\ell}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\left({\ell}^{2}\right), \left(\frac{1}{3} + {\ell}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
      4. unpow2N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\left(\ell \cdot \ell\right), \left(\frac{1}{3} + {\ell}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \left(\frac{1}{3} + {\ell}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
      6. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \left({\ell}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
      7. unpow2N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \left(\left(\ell \cdot \ell\right) \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
      8. associate-*l*N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \left(\ell \cdot \left(\ell \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
      9. *-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \left(\ell \cdot \left(\left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right) \cdot \ell\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\ell, \left(\left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right) \cdot \ell\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
      11. *-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\ell, \left(\ell \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
      12. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
      13. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(\frac{1}{60}, \left(\frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
      14. *-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(\frac{1}{60}, \left({\ell}^{2} \cdot \frac{1}{2520}\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
      15. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(\frac{1}{60}, \mathsf{*.f64}\left(\left({\ell}^{2}\right), \frac{1}{2520}\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
      16. unpow2N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(\frac{1}{60}, \mathsf{*.f64}\left(\left(\ell \cdot \ell\right), \frac{1}{2520}\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
      17. *-lowering-*.f6494.6%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(\frac{1}{60}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \frac{1}{2520}\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
    7. Simplified94.6%

      \[\leadsto \color{blue}{\left(\ell \cdot \left(2 + \left(\ell \cdot \ell\right) \cdot \left(0.3333333333333333 + \ell \cdot \left(\ell \cdot \left(0.016666666666666666 + \left(\ell \cdot \ell\right) \cdot 0.0003968253968253968\right)\right)\right)\right)\right)} \cdot \left(J \cdot \cos \left(\frac{K}{2}\right)\right) + U \]
    8. Taylor expanded in U around inf

      \[\leadsto \color{blue}{U \cdot \left(1 + \frac{J \cdot \left(\ell \cdot \left(\cos \left(\frac{1}{2} \cdot K\right) \cdot \left(2 + {\ell}^{2} \cdot \left(\frac{1}{3} + {\ell}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right)}{U}\right)} \]
    9. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(U, \color{blue}{\left(1 + \frac{J \cdot \left(\ell \cdot \left(\cos \left(\frac{1}{2} \cdot K\right) \cdot \left(2 + {\ell}^{2} \cdot \left(\frac{1}{3} + {\ell}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right)}{U}\right)}\right) \]
      2. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(U, \mathsf{+.f64}\left(1, \color{blue}{\left(\frac{J \cdot \left(\ell \cdot \left(\cos \left(\frac{1}{2} \cdot K\right) \cdot \left(2 + {\ell}^{2} \cdot \left(\frac{1}{3} + {\ell}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right)}{U}\right)}\right)\right) \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(U, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\left(J \cdot \left(\ell \cdot \left(\cos \left(\frac{1}{2} \cdot K\right) \cdot \left(2 + {\ell}^{2} \cdot \left(\frac{1}{3} + {\ell}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right)\right), \color{blue}{U}\right)\right)\right) \]
    10. Simplified95.1%

      \[\leadsto \color{blue}{U \cdot \left(1 + \frac{\left(\cos \left(0.5 \cdot K\right) \cdot \ell\right) \cdot \left(\left(2 + \ell \cdot \left(\ell \cdot \left(0.3333333333333333 + \ell \cdot \left(\ell \cdot \left(0.016666666666666666 + \left(\ell \cdot \ell\right) \cdot 0.0003968253968253968\right)\right)\right)\right)\right) \cdot J\right)}{U}\right)} \]
    11. Taylor expanded in K around 0

      \[\leadsto \color{blue}{U \cdot \left(1 + \frac{J \cdot \left(\ell \cdot \left(2 + {\ell}^{2} \cdot \left(\frac{1}{3} + {\ell}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)}{U}\right)} \]
    12. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(U, \color{blue}{\left(1 + \frac{J \cdot \left(\ell \cdot \left(2 + {\ell}^{2} \cdot \left(\frac{1}{3} + {\ell}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)}{U}\right)}\right) \]
      2. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(U, \mathsf{+.f64}\left(1, \color{blue}{\left(\frac{J \cdot \left(\ell \cdot \left(2 + {\ell}^{2} \cdot \left(\frac{1}{3} + {\ell}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)}{U}\right)}\right)\right) \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(U, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\left(J \cdot \left(\ell \cdot \left(2 + {\ell}^{2} \cdot \left(\frac{1}{3} + {\ell}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right), \color{blue}{U}\right)\right)\right) \]
    13. Simplified92.0%

      \[\leadsto \color{blue}{U \cdot \left(1 + \frac{\ell \cdot \left(J \cdot \left(2 + \ell \cdot \left(\ell \cdot \left(0.3333333333333333 + \ell \cdot \left(\ell \cdot \left(0.016666666666666666 + \left(\ell \cdot \ell\right) \cdot 0.0003968253968253968\right)\right)\right)\right)\right)\right)}{U}\right)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification89.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\cos \left(\frac{K}{2}\right) \leq 0.14:\\ \;\;\;\;U + \ell \cdot \left(\cos \left(K \cdot 0.5\right) \cdot \left(J \cdot \left(2 + \left(\ell \cdot \ell\right) \cdot 0.3333333333333333\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;U \cdot \left(1 + \frac{\ell \cdot \left(J \cdot \left(2 + \ell \cdot \left(\ell \cdot \left(0.3333333333333333 + \ell \cdot \left(\ell \cdot \left(0.016666666666666666 + \left(\ell \cdot \ell\right) \cdot 0.0003968253968253968\right)\right)\right)\right)\right)\right)}{U}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 84.4% accurate, 1.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \cos \left(\frac{K}{2}\right)\\ \mathbf{if}\;t\_0 \leq -0.005:\\ \;\;\;\;U + \left(J \cdot t\_0\right) \cdot \left(2 \cdot \ell\right)\\ \mathbf{else}:\\ \;\;\;\;U \cdot \left(1 + \frac{\ell \cdot \left(J \cdot \left(2 + \ell \cdot \left(\ell \cdot \left(0.3333333333333333 + \ell \cdot \left(\ell \cdot \left(0.016666666666666666 + \left(\ell \cdot \ell\right) \cdot 0.0003968253968253968\right)\right)\right)\right)\right)\right)}{U}\right)\\ \end{array} \end{array} \]
(FPCore (J l K U)
 :precision binary64
 (let* ((t_0 (cos (/ K 2.0))))
   (if (<= t_0 -0.005)
     (+ U (* (* J t_0) (* 2.0 l)))
     (*
      U
      (+
       1.0
       (/
        (*
         l
         (*
          J
          (+
           2.0
           (*
            l
            (*
             l
             (+
              0.3333333333333333
              (*
               l
               (*
                l
                (+
                 0.016666666666666666
                 (* (* l l) 0.0003968253968253968))))))))))
        U))))))
double code(double J, double l, double K, double U) {
	double t_0 = cos((K / 2.0));
	double tmp;
	if (t_0 <= -0.005) {
		tmp = U + ((J * t_0) * (2.0 * l));
	} else {
		tmp = U * (1.0 + ((l * (J * (2.0 + (l * (l * (0.3333333333333333 + (l * (l * (0.016666666666666666 + ((l * l) * 0.0003968253968253968)))))))))) / 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) :: tmp
    t_0 = cos((k / 2.0d0))
    if (t_0 <= (-0.005d0)) then
        tmp = u + ((j * t_0) * (2.0d0 * l))
    else
        tmp = u * (1.0d0 + ((l * (j * (2.0d0 + (l * (l * (0.3333333333333333d0 + (l * (l * (0.016666666666666666d0 + ((l * l) * 0.0003968253968253968d0)))))))))) / u))
    end if
    code = tmp
end function
public static double code(double J, double l, double K, double U) {
	double t_0 = Math.cos((K / 2.0));
	double tmp;
	if (t_0 <= -0.005) {
		tmp = U + ((J * t_0) * (2.0 * l));
	} else {
		tmp = U * (1.0 + ((l * (J * (2.0 + (l * (l * (0.3333333333333333 + (l * (l * (0.016666666666666666 + ((l * l) * 0.0003968253968253968)))))))))) / U));
	}
	return tmp;
}
def code(J, l, K, U):
	t_0 = math.cos((K / 2.0))
	tmp = 0
	if t_0 <= -0.005:
		tmp = U + ((J * t_0) * (2.0 * l))
	else:
		tmp = U * (1.0 + ((l * (J * (2.0 + (l * (l * (0.3333333333333333 + (l * (l * (0.016666666666666666 + ((l * l) * 0.0003968253968253968)))))))))) / U))
	return tmp
function code(J, l, K, U)
	t_0 = cos(Float64(K / 2.0))
	tmp = 0.0
	if (t_0 <= -0.005)
		tmp = Float64(U + Float64(Float64(J * t_0) * Float64(2.0 * l)));
	else
		tmp = Float64(U * Float64(1.0 + Float64(Float64(l * Float64(J * Float64(2.0 + Float64(l * Float64(l * Float64(0.3333333333333333 + Float64(l * Float64(l * Float64(0.016666666666666666 + Float64(Float64(l * l) * 0.0003968253968253968)))))))))) / U)));
	end
	return tmp
end
function tmp_2 = code(J, l, K, U)
	t_0 = cos((K / 2.0));
	tmp = 0.0;
	if (t_0 <= -0.005)
		tmp = U + ((J * t_0) * (2.0 * l));
	else
		tmp = U * (1.0 + ((l * (J * (2.0 + (l * (l * (0.3333333333333333 + (l * (l * (0.016666666666666666 + ((l * l) * 0.0003968253968253968)))))))))) / U));
	end
	tmp_2 = tmp;
end
code[J_, l_, K_, U_] := Block[{t$95$0 = N[Cos[N[(K / 2.0), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$0, -0.005], N[(U + N[(N[(J * t$95$0), $MachinePrecision] * N[(2.0 * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(U * N[(1.0 + N[(N[(l * N[(J * N[(2.0 + N[(l * N[(l * N[(0.3333333333333333 + N[(l * N[(l * N[(0.016666666666666666 + N[(N[(l * l), $MachinePrecision] * 0.0003968253968253968), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \cos \left(\frac{K}{2}\right)\\
\mathbf{if}\;t\_0 \leq -0.005:\\
\;\;\;\;U + \left(J \cdot t\_0\right) \cdot \left(2 \cdot \ell\right)\\

\mathbf{else}:\\
\;\;\;\;U \cdot \left(1 + \frac{\ell \cdot \left(J \cdot \left(2 + \ell \cdot \left(\ell \cdot \left(0.3333333333333333 + \ell \cdot \left(\ell \cdot \left(0.016666666666666666 + \left(\ell \cdot \ell\right) \cdot 0.0003968253968253968\right)\right)\right)\right)\right)\right)}{U}\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (cos.f64 (/.f64 K #s(literal 2 binary64))) < -0.0050000000000000001

    1. Initial program 87.9%

      \[\left(J \cdot \left(e^{\ell} - e^{-\ell}\right)\right) \cdot \cos \left(\frac{K}{2}\right) + U \]
    2. Step-by-step derivation
      1. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\left(\left(J \cdot \left(e^{\ell} - e^{\mathsf{neg}\left(\ell\right)}\right)\right) \cdot \cos \left(\frac{K}{2}\right)\right), \color{blue}{U}\right) \]
      2. associate-*l*N/A

        \[\leadsto \mathsf{+.f64}\left(\left(J \cdot \left(\left(e^{\ell} - e^{\mathsf{neg}\left(\ell\right)}\right) \cdot \cos \left(\frac{K}{2}\right)\right)\right), U\right) \]
      3. *-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\left(\left(\left(e^{\ell} - e^{\mathsf{neg}\left(\ell\right)}\right) \cdot \cos \left(\frac{K}{2}\right)\right) \cdot J\right), U\right) \]
      4. associate-*l*N/A

        \[\leadsto \mathsf{+.f64}\left(\left(\left(e^{\ell} - e^{\mathsf{neg}\left(\ell\right)}\right) \cdot \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(e^{\ell} - e^{\mathsf{neg}\left(\ell\right)}\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
      6. sub-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(e^{\ell} + \left(\mathsf{neg}\left(e^{\mathsf{neg}\left(\ell\right)}\right)\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
      7. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\left(e^{\ell}\right), \left(\mathsf{neg}\left(e^{\mathsf{neg}\left(\ell\right)}\right)\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
      8. exp-lowering-exp.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \left(\mathsf{neg}\left(e^{\mathsf{neg}\left(\ell\right)}\right)\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
      9. exp-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \left(\mathsf{neg}\left(\frac{1}{e^{\ell}}\right)\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
      10. distribute-neg-fracN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \left(\frac{\mathsf{neg}\left(1\right)}{e^{\ell}}\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
      11. metadata-evalN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \left(\frac{-1}{e^{\ell}}\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
      12. /-lowering-/.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \mathsf{/.f64}\left(-1, \left(e^{\ell}\right)\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
      13. exp-lowering-exp.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \mathsf{/.f64}\left(-1, \mathsf{exp.f64}\left(\ell\right)\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
      14. *-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \mathsf{/.f64}\left(-1, \mathsf{exp.f64}\left(\ell\right)\right)\right), \left(J \cdot \cos \left(\frac{K}{2}\right)\right)\right), U\right) \]
      15. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \mathsf{/.f64}\left(-1, \mathsf{exp.f64}\left(\ell\right)\right)\right), \mathsf{*.f64}\left(J, \cos \left(\frac{K}{2}\right)\right)\right), U\right) \]
      16. cos-lowering-cos.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \mathsf{/.f64}\left(-1, \mathsf{exp.f64}\left(\ell\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\left(\frac{K}{2}\right)\right)\right)\right), U\right) \]
      17. /-lowering-/.f6487.9%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \mathsf{/.f64}\left(-1, \mathsf{exp.f64}\left(\ell\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
    3. Simplified87.9%

      \[\leadsto \color{blue}{\left(e^{\ell} + \frac{-1}{e^{\ell}}\right) \cdot \left(J \cdot \cos \left(\frac{K}{2}\right)\right) + U} \]
    4. Add Preprocessing
    5. Taylor expanded in l around 0

      \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\color{blue}{\left(2 \cdot \ell\right)}, \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
    6. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(\ell \cdot 2\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
      2. *-lowering-*.f6463.1%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, 2\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
    7. Simplified63.1%

      \[\leadsto \color{blue}{\left(\ell \cdot 2\right)} \cdot \left(J \cdot \cos \left(\frac{K}{2}\right)\right) + U \]

    if -0.0050000000000000001 < (cos.f64 (/.f64 K #s(literal 2 binary64)))

    1. Initial program 89.9%

      \[\left(J \cdot \left(e^{\ell} - e^{-\ell}\right)\right) \cdot \cos \left(\frac{K}{2}\right) + U \]
    2. Step-by-step derivation
      1. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\left(\left(J \cdot \left(e^{\ell} - e^{\mathsf{neg}\left(\ell\right)}\right)\right) \cdot \cos \left(\frac{K}{2}\right)\right), \color{blue}{U}\right) \]
      2. associate-*l*N/A

        \[\leadsto \mathsf{+.f64}\left(\left(J \cdot \left(\left(e^{\ell} - e^{\mathsf{neg}\left(\ell\right)}\right) \cdot \cos \left(\frac{K}{2}\right)\right)\right), U\right) \]
      3. *-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\left(\left(\left(e^{\ell} - e^{\mathsf{neg}\left(\ell\right)}\right) \cdot \cos \left(\frac{K}{2}\right)\right) \cdot J\right), U\right) \]
      4. associate-*l*N/A

        \[\leadsto \mathsf{+.f64}\left(\left(\left(e^{\ell} - e^{\mathsf{neg}\left(\ell\right)}\right) \cdot \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(e^{\ell} - e^{\mathsf{neg}\left(\ell\right)}\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
      6. sub-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(e^{\ell} + \left(\mathsf{neg}\left(e^{\mathsf{neg}\left(\ell\right)}\right)\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
      7. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\left(e^{\ell}\right), \left(\mathsf{neg}\left(e^{\mathsf{neg}\left(\ell\right)}\right)\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
      8. exp-lowering-exp.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \left(\mathsf{neg}\left(e^{\mathsf{neg}\left(\ell\right)}\right)\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
      9. exp-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \left(\mathsf{neg}\left(\frac{1}{e^{\ell}}\right)\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
      10. distribute-neg-fracN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \left(\frac{\mathsf{neg}\left(1\right)}{e^{\ell}}\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
      11. metadata-evalN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \left(\frac{-1}{e^{\ell}}\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
      12. /-lowering-/.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \mathsf{/.f64}\left(-1, \left(e^{\ell}\right)\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
      13. exp-lowering-exp.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \mathsf{/.f64}\left(-1, \mathsf{exp.f64}\left(\ell\right)\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
      14. *-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \mathsf{/.f64}\left(-1, \mathsf{exp.f64}\left(\ell\right)\right)\right), \left(J \cdot \cos \left(\frac{K}{2}\right)\right)\right), U\right) \]
      15. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \mathsf{/.f64}\left(-1, \mathsf{exp.f64}\left(\ell\right)\right)\right), \mathsf{*.f64}\left(J, \cos \left(\frac{K}{2}\right)\right)\right), U\right) \]
      16. cos-lowering-cos.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \mathsf{/.f64}\left(-1, \mathsf{exp.f64}\left(\ell\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\left(\frac{K}{2}\right)\right)\right)\right), U\right) \]
      17. /-lowering-/.f6489.9%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \mathsf{/.f64}\left(-1, \mathsf{exp.f64}\left(\ell\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
    3. Simplified89.9%

      \[\leadsto \color{blue}{\left(e^{\ell} + \frac{-1}{e^{\ell}}\right) \cdot \left(J \cdot \cos \left(\frac{K}{2}\right)\right) + U} \]
    4. Add Preprocessing
    5. Taylor expanded in l around 0

      \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\color{blue}{\left(\ell \cdot \left(2 + {\ell}^{2} \cdot \left(\frac{1}{3} + {\ell}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)}, \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
    6. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \left(2 + {\ell}^{2} \cdot \left(\frac{1}{3} + {\ell}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
      2. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \left({\ell}^{2} \cdot \left(\frac{1}{3} + {\ell}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\left({\ell}^{2}\right), \left(\frac{1}{3} + {\ell}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
      4. unpow2N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\left(\ell \cdot \ell\right), \left(\frac{1}{3} + {\ell}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \left(\frac{1}{3} + {\ell}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
      6. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \left({\ell}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
      7. unpow2N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \left(\left(\ell \cdot \ell\right) \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
      8. associate-*l*N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \left(\ell \cdot \left(\ell \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
      9. *-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \left(\ell \cdot \left(\left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right) \cdot \ell\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\ell, \left(\left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right) \cdot \ell\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
      11. *-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\ell, \left(\ell \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
      12. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
      13. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(\frac{1}{60}, \left(\frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
      14. *-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(\frac{1}{60}, \left({\ell}^{2} \cdot \frac{1}{2520}\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
      15. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(\frac{1}{60}, \mathsf{*.f64}\left(\left({\ell}^{2}\right), \frac{1}{2520}\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
      16. unpow2N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(\frac{1}{60}, \mathsf{*.f64}\left(\left(\ell \cdot \ell\right), \frac{1}{2520}\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
      17. *-lowering-*.f6494.7%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(\frac{1}{60}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \frac{1}{2520}\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
    7. Simplified94.7%

      \[\leadsto \color{blue}{\left(\ell \cdot \left(2 + \left(\ell \cdot \ell\right) \cdot \left(0.3333333333333333 + \ell \cdot \left(\ell \cdot \left(0.016666666666666666 + \left(\ell \cdot \ell\right) \cdot 0.0003968253968253968\right)\right)\right)\right)\right)} \cdot \left(J \cdot \cos \left(\frac{K}{2}\right)\right) + U \]
    8. Taylor expanded in U around inf

      \[\leadsto \color{blue}{U \cdot \left(1 + \frac{J \cdot \left(\ell \cdot \left(\cos \left(\frac{1}{2} \cdot K\right) \cdot \left(2 + {\ell}^{2} \cdot \left(\frac{1}{3} + {\ell}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right)}{U}\right)} \]
    9. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(U, \color{blue}{\left(1 + \frac{J \cdot \left(\ell \cdot \left(\cos \left(\frac{1}{2} \cdot K\right) \cdot \left(2 + {\ell}^{2} \cdot \left(\frac{1}{3} + {\ell}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right)}{U}\right)}\right) \]
      2. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(U, \mathsf{+.f64}\left(1, \color{blue}{\left(\frac{J \cdot \left(\ell \cdot \left(\cos \left(\frac{1}{2} \cdot K\right) \cdot \left(2 + {\ell}^{2} \cdot \left(\frac{1}{3} + {\ell}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right)}{U}\right)}\right)\right) \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(U, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\left(J \cdot \left(\ell \cdot \left(\cos \left(\frac{1}{2} \cdot K\right) \cdot \left(2 + {\ell}^{2} \cdot \left(\frac{1}{3} + {\ell}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right)\right), \color{blue}{U}\right)\right)\right) \]
    10. Simplified95.2%

      \[\leadsto \color{blue}{U \cdot \left(1 + \frac{\left(\cos \left(0.5 \cdot K\right) \cdot \ell\right) \cdot \left(\left(2 + \ell \cdot \left(\ell \cdot \left(0.3333333333333333 + \ell \cdot \left(\ell \cdot \left(0.016666666666666666 + \left(\ell \cdot \ell\right) \cdot 0.0003968253968253968\right)\right)\right)\right)\right) \cdot J\right)}{U}\right)} \]
    11. Taylor expanded in K around 0

      \[\leadsto \color{blue}{U \cdot \left(1 + \frac{J \cdot \left(\ell \cdot \left(2 + {\ell}^{2} \cdot \left(\frac{1}{3} + {\ell}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)}{U}\right)} \]
    12. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(U, \color{blue}{\left(1 + \frac{J \cdot \left(\ell \cdot \left(2 + {\ell}^{2} \cdot \left(\frac{1}{3} + {\ell}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)}{U}\right)}\right) \]
      2. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(U, \mathsf{+.f64}\left(1, \color{blue}{\left(\frac{J \cdot \left(\ell \cdot \left(2 + {\ell}^{2} \cdot \left(\frac{1}{3} + {\ell}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)}{U}\right)}\right)\right) \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(U, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\left(J \cdot \left(\ell \cdot \left(2 + {\ell}^{2} \cdot \left(\frac{1}{3} + {\ell}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right), \color{blue}{U}\right)\right)\right) \]
    13. Simplified91.7%

      \[\leadsto \color{blue}{U \cdot \left(1 + \frac{\ell \cdot \left(J \cdot \left(2 + \ell \cdot \left(\ell \cdot \left(0.3333333333333333 + \ell \cdot \left(\ell \cdot \left(0.016666666666666666 + \left(\ell \cdot \ell\right) \cdot 0.0003968253968253968\right)\right)\right)\right)\right)\right)}{U}\right)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification83.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\cos \left(\frac{K}{2}\right) \leq -0.005:\\ \;\;\;\;U + \left(J \cdot \cos \left(\frac{K}{2}\right)\right) \cdot \left(2 \cdot \ell\right)\\ \mathbf{else}:\\ \;\;\;\;U \cdot \left(1 + \frac{\ell \cdot \left(J \cdot \left(2 + \ell \cdot \left(\ell \cdot \left(0.3333333333333333 + \ell \cdot \left(\ell \cdot \left(0.016666666666666666 + \left(\ell \cdot \ell\right) \cdot 0.0003968253968253968\right)\right)\right)\right)\right)\right)}{U}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 84.4% accurate, 1.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \cos \left(\frac{K}{2}\right)\\ \mathbf{if}\;t\_0 \leq -0.005:\\ \;\;\;\;U + t\_0 \cdot \left(J \cdot \left(2 \cdot \ell\right)\right)\\ \mathbf{else}:\\ \;\;\;\;U \cdot \left(1 + \frac{\ell \cdot \left(J \cdot \left(2 + \ell \cdot \left(\ell \cdot \left(0.3333333333333333 + \ell \cdot \left(\ell \cdot \left(0.016666666666666666 + \left(\ell \cdot \ell\right) \cdot 0.0003968253968253968\right)\right)\right)\right)\right)\right)}{U}\right)\\ \end{array} \end{array} \]
(FPCore (J l K U)
 :precision binary64
 (let* ((t_0 (cos (/ K 2.0))))
   (if (<= t_0 -0.005)
     (+ U (* t_0 (* J (* 2.0 l))))
     (*
      U
      (+
       1.0
       (/
        (*
         l
         (*
          J
          (+
           2.0
           (*
            l
            (*
             l
             (+
              0.3333333333333333
              (*
               l
               (*
                l
                (+
                 0.016666666666666666
                 (* (* l l) 0.0003968253968253968))))))))))
        U))))))
double code(double J, double l, double K, double U) {
	double t_0 = cos((K / 2.0));
	double tmp;
	if (t_0 <= -0.005) {
		tmp = U + (t_0 * (J * (2.0 * l)));
	} else {
		tmp = U * (1.0 + ((l * (J * (2.0 + (l * (l * (0.3333333333333333 + (l * (l * (0.016666666666666666 + ((l * l) * 0.0003968253968253968)))))))))) / 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) :: tmp
    t_0 = cos((k / 2.0d0))
    if (t_0 <= (-0.005d0)) then
        tmp = u + (t_0 * (j * (2.0d0 * l)))
    else
        tmp = u * (1.0d0 + ((l * (j * (2.0d0 + (l * (l * (0.3333333333333333d0 + (l * (l * (0.016666666666666666d0 + ((l * l) * 0.0003968253968253968d0)))))))))) / u))
    end if
    code = tmp
end function
public static double code(double J, double l, double K, double U) {
	double t_0 = Math.cos((K / 2.0));
	double tmp;
	if (t_0 <= -0.005) {
		tmp = U + (t_0 * (J * (2.0 * l)));
	} else {
		tmp = U * (1.0 + ((l * (J * (2.0 + (l * (l * (0.3333333333333333 + (l * (l * (0.016666666666666666 + ((l * l) * 0.0003968253968253968)))))))))) / U));
	}
	return tmp;
}
def code(J, l, K, U):
	t_0 = math.cos((K / 2.0))
	tmp = 0
	if t_0 <= -0.005:
		tmp = U + (t_0 * (J * (2.0 * l)))
	else:
		tmp = U * (1.0 + ((l * (J * (2.0 + (l * (l * (0.3333333333333333 + (l * (l * (0.016666666666666666 + ((l * l) * 0.0003968253968253968)))))))))) / U))
	return tmp
function code(J, l, K, U)
	t_0 = cos(Float64(K / 2.0))
	tmp = 0.0
	if (t_0 <= -0.005)
		tmp = Float64(U + Float64(t_0 * Float64(J * Float64(2.0 * l))));
	else
		tmp = Float64(U * Float64(1.0 + Float64(Float64(l * Float64(J * Float64(2.0 + Float64(l * Float64(l * Float64(0.3333333333333333 + Float64(l * Float64(l * Float64(0.016666666666666666 + Float64(Float64(l * l) * 0.0003968253968253968)))))))))) / U)));
	end
	return tmp
end
function tmp_2 = code(J, l, K, U)
	t_0 = cos((K / 2.0));
	tmp = 0.0;
	if (t_0 <= -0.005)
		tmp = U + (t_0 * (J * (2.0 * l)));
	else
		tmp = U * (1.0 + ((l * (J * (2.0 + (l * (l * (0.3333333333333333 + (l * (l * (0.016666666666666666 + ((l * l) * 0.0003968253968253968)))))))))) / U));
	end
	tmp_2 = tmp;
end
code[J_, l_, K_, U_] := Block[{t$95$0 = N[Cos[N[(K / 2.0), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$0, -0.005], N[(U + N[(t$95$0 * N[(J * N[(2.0 * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(U * N[(1.0 + N[(N[(l * N[(J * N[(2.0 + N[(l * N[(l * N[(0.3333333333333333 + N[(l * N[(l * N[(0.016666666666666666 + N[(N[(l * l), $MachinePrecision] * 0.0003968253968253968), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \cos \left(\frac{K}{2}\right)\\
\mathbf{if}\;t\_0 \leq -0.005:\\
\;\;\;\;U + t\_0 \cdot \left(J \cdot \left(2 \cdot \ell\right)\right)\\

\mathbf{else}:\\
\;\;\;\;U \cdot \left(1 + \frac{\ell \cdot \left(J \cdot \left(2 + \ell \cdot \left(\ell \cdot \left(0.3333333333333333 + \ell \cdot \left(\ell \cdot \left(0.016666666666666666 + \left(\ell \cdot \ell\right) \cdot 0.0003968253968253968\right)\right)\right)\right)\right)\right)}{U}\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (cos.f64 (/.f64 K #s(literal 2 binary64))) < -0.0050000000000000001

    1. Initial program 87.9%

      \[\left(J \cdot \left(e^{\ell} - e^{-\ell}\right)\right) \cdot \cos \left(\frac{K}{2}\right) + U \]
    2. Add Preprocessing
    3. Taylor expanded in l around 0

      \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\color{blue}{\left(2 \cdot \left(J \cdot \ell\right)\right)}, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right), U\right) \]
    4. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(\left(J \cdot \ell\right) \cdot 2\right), \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right), U\right) \]
      2. associate-*l*N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(J \cdot \left(\ell \cdot 2\right)\right), \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right), U\right) \]
      3. *-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(J \cdot \left(2 \cdot \ell\right)\right), \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right), U\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(J, \left(2 \cdot \ell\right)\right), \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right), U\right) \]
      5. *-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(J, \left(\ell \cdot 2\right)\right), \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right), U\right) \]
      6. *-lowering-*.f6463.0%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\ell, 2\right)\right), \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right), U\right) \]
    5. Simplified63.0%

      \[\leadsto \color{blue}{\left(J \cdot \left(\ell \cdot 2\right)\right)} \cdot \cos \left(\frac{K}{2}\right) + U \]

    if -0.0050000000000000001 < (cos.f64 (/.f64 K #s(literal 2 binary64)))

    1. Initial program 89.9%

      \[\left(J \cdot \left(e^{\ell} - e^{-\ell}\right)\right) \cdot \cos \left(\frac{K}{2}\right) + U \]
    2. Step-by-step derivation
      1. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\left(\left(J \cdot \left(e^{\ell} - e^{\mathsf{neg}\left(\ell\right)}\right)\right) \cdot \cos \left(\frac{K}{2}\right)\right), \color{blue}{U}\right) \]
      2. associate-*l*N/A

        \[\leadsto \mathsf{+.f64}\left(\left(J \cdot \left(\left(e^{\ell} - e^{\mathsf{neg}\left(\ell\right)}\right) \cdot \cos \left(\frac{K}{2}\right)\right)\right), U\right) \]
      3. *-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\left(\left(\left(e^{\ell} - e^{\mathsf{neg}\left(\ell\right)}\right) \cdot \cos \left(\frac{K}{2}\right)\right) \cdot J\right), U\right) \]
      4. associate-*l*N/A

        \[\leadsto \mathsf{+.f64}\left(\left(\left(e^{\ell} - e^{\mathsf{neg}\left(\ell\right)}\right) \cdot \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(e^{\ell} - e^{\mathsf{neg}\left(\ell\right)}\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
      6. sub-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(e^{\ell} + \left(\mathsf{neg}\left(e^{\mathsf{neg}\left(\ell\right)}\right)\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
      7. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\left(e^{\ell}\right), \left(\mathsf{neg}\left(e^{\mathsf{neg}\left(\ell\right)}\right)\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
      8. exp-lowering-exp.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \left(\mathsf{neg}\left(e^{\mathsf{neg}\left(\ell\right)}\right)\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
      9. exp-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \left(\mathsf{neg}\left(\frac{1}{e^{\ell}}\right)\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
      10. distribute-neg-fracN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \left(\frac{\mathsf{neg}\left(1\right)}{e^{\ell}}\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
      11. metadata-evalN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \left(\frac{-1}{e^{\ell}}\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
      12. /-lowering-/.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \mathsf{/.f64}\left(-1, \left(e^{\ell}\right)\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
      13. exp-lowering-exp.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \mathsf{/.f64}\left(-1, \mathsf{exp.f64}\left(\ell\right)\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
      14. *-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \mathsf{/.f64}\left(-1, \mathsf{exp.f64}\left(\ell\right)\right)\right), \left(J \cdot \cos \left(\frac{K}{2}\right)\right)\right), U\right) \]
      15. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \mathsf{/.f64}\left(-1, \mathsf{exp.f64}\left(\ell\right)\right)\right), \mathsf{*.f64}\left(J, \cos \left(\frac{K}{2}\right)\right)\right), U\right) \]
      16. cos-lowering-cos.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \mathsf{/.f64}\left(-1, \mathsf{exp.f64}\left(\ell\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\left(\frac{K}{2}\right)\right)\right)\right), U\right) \]
      17. /-lowering-/.f6489.9%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \mathsf{/.f64}\left(-1, \mathsf{exp.f64}\left(\ell\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
    3. Simplified89.9%

      \[\leadsto \color{blue}{\left(e^{\ell} + \frac{-1}{e^{\ell}}\right) \cdot \left(J \cdot \cos \left(\frac{K}{2}\right)\right) + U} \]
    4. Add Preprocessing
    5. Taylor expanded in l around 0

      \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\color{blue}{\left(\ell \cdot \left(2 + {\ell}^{2} \cdot \left(\frac{1}{3} + {\ell}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)}, \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
    6. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \left(2 + {\ell}^{2} \cdot \left(\frac{1}{3} + {\ell}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
      2. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \left({\ell}^{2} \cdot \left(\frac{1}{3} + {\ell}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\left({\ell}^{2}\right), \left(\frac{1}{3} + {\ell}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
      4. unpow2N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\left(\ell \cdot \ell\right), \left(\frac{1}{3} + {\ell}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \left(\frac{1}{3} + {\ell}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
      6. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \left({\ell}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
      7. unpow2N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \left(\left(\ell \cdot \ell\right) \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
      8. associate-*l*N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \left(\ell \cdot \left(\ell \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
      9. *-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \left(\ell \cdot \left(\left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right) \cdot \ell\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\ell, \left(\left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right) \cdot \ell\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
      11. *-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\ell, \left(\ell \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
      12. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
      13. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(\frac{1}{60}, \left(\frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
      14. *-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(\frac{1}{60}, \left({\ell}^{2} \cdot \frac{1}{2520}\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
      15. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(\frac{1}{60}, \mathsf{*.f64}\left(\left({\ell}^{2}\right), \frac{1}{2520}\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
      16. unpow2N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(\frac{1}{60}, \mathsf{*.f64}\left(\left(\ell \cdot \ell\right), \frac{1}{2520}\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
      17. *-lowering-*.f6494.7%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(\frac{1}{60}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \frac{1}{2520}\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
    7. Simplified94.7%

      \[\leadsto \color{blue}{\left(\ell \cdot \left(2 + \left(\ell \cdot \ell\right) \cdot \left(0.3333333333333333 + \ell \cdot \left(\ell \cdot \left(0.016666666666666666 + \left(\ell \cdot \ell\right) \cdot 0.0003968253968253968\right)\right)\right)\right)\right)} \cdot \left(J \cdot \cos \left(\frac{K}{2}\right)\right) + U \]
    8. Taylor expanded in U around inf

      \[\leadsto \color{blue}{U \cdot \left(1 + \frac{J \cdot \left(\ell \cdot \left(\cos \left(\frac{1}{2} \cdot K\right) \cdot \left(2 + {\ell}^{2} \cdot \left(\frac{1}{3} + {\ell}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right)}{U}\right)} \]
    9. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(U, \color{blue}{\left(1 + \frac{J \cdot \left(\ell \cdot \left(\cos \left(\frac{1}{2} \cdot K\right) \cdot \left(2 + {\ell}^{2} \cdot \left(\frac{1}{3} + {\ell}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right)}{U}\right)}\right) \]
      2. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(U, \mathsf{+.f64}\left(1, \color{blue}{\left(\frac{J \cdot \left(\ell \cdot \left(\cos \left(\frac{1}{2} \cdot K\right) \cdot \left(2 + {\ell}^{2} \cdot \left(\frac{1}{3} + {\ell}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right)}{U}\right)}\right)\right) \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(U, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\left(J \cdot \left(\ell \cdot \left(\cos \left(\frac{1}{2} \cdot K\right) \cdot \left(2 + {\ell}^{2} \cdot \left(\frac{1}{3} + {\ell}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right)\right), \color{blue}{U}\right)\right)\right) \]
    10. Simplified95.2%

      \[\leadsto \color{blue}{U \cdot \left(1 + \frac{\left(\cos \left(0.5 \cdot K\right) \cdot \ell\right) \cdot \left(\left(2 + \ell \cdot \left(\ell \cdot \left(0.3333333333333333 + \ell \cdot \left(\ell \cdot \left(0.016666666666666666 + \left(\ell \cdot \ell\right) \cdot 0.0003968253968253968\right)\right)\right)\right)\right) \cdot J\right)}{U}\right)} \]
    11. Taylor expanded in K around 0

      \[\leadsto \color{blue}{U \cdot \left(1 + \frac{J \cdot \left(\ell \cdot \left(2 + {\ell}^{2} \cdot \left(\frac{1}{3} + {\ell}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)}{U}\right)} \]
    12. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(U, \color{blue}{\left(1 + \frac{J \cdot \left(\ell \cdot \left(2 + {\ell}^{2} \cdot \left(\frac{1}{3} + {\ell}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)}{U}\right)}\right) \]
      2. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(U, \mathsf{+.f64}\left(1, \color{blue}{\left(\frac{J \cdot \left(\ell \cdot \left(2 + {\ell}^{2} \cdot \left(\frac{1}{3} + {\ell}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)}{U}\right)}\right)\right) \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(U, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\left(J \cdot \left(\ell \cdot \left(2 + {\ell}^{2} \cdot \left(\frac{1}{3} + {\ell}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right), \color{blue}{U}\right)\right)\right) \]
    13. Simplified91.7%

      \[\leadsto \color{blue}{U \cdot \left(1 + \frac{\ell \cdot \left(J \cdot \left(2 + \ell \cdot \left(\ell \cdot \left(0.3333333333333333 + \ell \cdot \left(\ell \cdot \left(0.016666666666666666 + \left(\ell \cdot \ell\right) \cdot 0.0003968253968253968\right)\right)\right)\right)\right)\right)}{U}\right)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification83.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\cos \left(\frac{K}{2}\right) \leq -0.005:\\ \;\;\;\;U + \cos \left(\frac{K}{2}\right) \cdot \left(J \cdot \left(2 \cdot \ell\right)\right)\\ \mathbf{else}:\\ \;\;\;\;U \cdot \left(1 + \frac{\ell \cdot \left(J \cdot \left(2 + \ell \cdot \left(\ell \cdot \left(0.3333333333333333 + \ell \cdot \left(\ell \cdot \left(0.016666666666666666 + \left(\ell \cdot \ell\right) \cdot 0.0003968253968253968\right)\right)\right)\right)\right)\right)}{U}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 89.4% accurate, 1.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;\frac{K}{2} \leq 10^{-30}:\\ \;\;\;\;\mathsf{fma}\left(J, 2 \cdot \sinh \ell, U\right)\\ \mathbf{else}:\\ \;\;\;\;U + \left(J \cdot \cos \left(\frac{K}{2}\right)\right) \cdot \left(\ell \cdot \left(2 + \left(\ell \cdot \ell\right) \cdot \left(0.3333333333333333 + \ell \cdot \left(\ell \cdot \left(0.016666666666666666 + \left(\ell \cdot \ell\right) \cdot 0.0003968253968253968\right)\right)\right)\right)\right)\\ \end{array} \end{array} \]
(FPCore (J l K U)
 :precision binary64
 (if (<= (/ K 2.0) 1e-30)
   (fma J (* 2.0 (sinh l)) U)
   (+
    U
    (*
     (* J (cos (/ K 2.0)))
     (*
      l
      (+
       2.0
       (*
        (* l l)
        (+
         0.3333333333333333
         (*
          l
          (*
           l
           (+ 0.016666666666666666 (* (* l l) 0.0003968253968253968))))))))))))
double code(double J, double l, double K, double U) {
	double tmp;
	if ((K / 2.0) <= 1e-30) {
		tmp = fma(J, (2.0 * sinh(l)), U);
	} else {
		tmp = U + ((J * cos((K / 2.0))) * (l * (2.0 + ((l * l) * (0.3333333333333333 + (l * (l * (0.016666666666666666 + ((l * l) * 0.0003968253968253968)))))))));
	}
	return tmp;
}
function code(J, l, K, U)
	tmp = 0.0
	if (Float64(K / 2.0) <= 1e-30)
		tmp = fma(J, Float64(2.0 * sinh(l)), U);
	else
		tmp = Float64(U + Float64(Float64(J * cos(Float64(K / 2.0))) * Float64(l * Float64(2.0 + Float64(Float64(l * l) * Float64(0.3333333333333333 + Float64(l * Float64(l * Float64(0.016666666666666666 + Float64(Float64(l * l) * 0.0003968253968253968))))))))));
	end
	return tmp
end
code[J_, l_, K_, U_] := If[LessEqual[N[(K / 2.0), $MachinePrecision], 1e-30], N[(J * N[(2.0 * N[Sinh[l], $MachinePrecision]), $MachinePrecision] + U), $MachinePrecision], N[(U + N[(N[(J * N[Cos[N[(K / 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(l * N[(2.0 + N[(N[(l * l), $MachinePrecision] * N[(0.3333333333333333 + N[(l * N[(l * N[(0.016666666666666666 + N[(N[(l * l), $MachinePrecision] * 0.0003968253968253968), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;\frac{K}{2} \leq 10^{-30}:\\
\;\;\;\;\mathsf{fma}\left(J, 2 \cdot \sinh \ell, U\right)\\

\mathbf{else}:\\
\;\;\;\;U + \left(J \cdot \cos \left(\frac{K}{2}\right)\right) \cdot \left(\ell \cdot \left(2 + \left(\ell \cdot \ell\right) \cdot \left(0.3333333333333333 + \ell \cdot \left(\ell \cdot \left(0.016666666666666666 + \left(\ell \cdot \ell\right) \cdot 0.0003968253968253968\right)\right)\right)\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (/.f64 K #s(literal 2 binary64)) < 1e-30

    1. Initial program 91.1%

      \[\left(J \cdot \left(e^{\ell} - e^{-\ell}\right)\right) \cdot \cos \left(\frac{K}{2}\right) + U \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. associate-*l*N/A

        \[\leadsto J \cdot \left(\left(e^{\ell} - e^{\mathsf{neg}\left(\ell\right)}\right) \cdot \cos \left(\frac{K}{2}\right)\right) + U \]
      2. *-commutativeN/A

        \[\leadsto J \cdot \left(\cos \left(\frac{K}{2}\right) \cdot \left(e^{\ell} - e^{\mathsf{neg}\left(\ell\right)}\right)\right) + U \]
      3. sub-negN/A

        \[\leadsto J \cdot \left(\cos \left(\frac{K}{2}\right) \cdot \left(e^{\ell} + \left(\mathsf{neg}\left(e^{\mathsf{neg}\left(\ell\right)}\right)\right)\right)\right) + U \]
      4. neg-mul-1N/A

        \[\leadsto J \cdot \left(\cos \left(\frac{K}{2}\right) \cdot \left(e^{\ell} + -1 \cdot e^{\mathsf{neg}\left(\ell\right)}\right)\right) + U \]
      5. exp-negN/A

        \[\leadsto J \cdot \left(\cos \left(\frac{K}{2}\right) \cdot \left(e^{\ell} + -1 \cdot \frac{1}{e^{\ell}}\right)\right) + U \]
      6. div-invN/A

        \[\leadsto J \cdot \left(\cos \left(\frac{K}{2}\right) \cdot \left(e^{\ell} + \frac{-1}{e^{\ell}}\right)\right) + U \]
      7. associate-*l*N/A

        \[\leadsto \left(J \cdot \cos \left(\frac{K}{2}\right)\right) \cdot \left(e^{\ell} + \frac{-1}{e^{\ell}}\right) + U \]
      8. fma-defineN/A

        \[\leadsto \mathsf{fma}\left(J \cdot \cos \left(\frac{K}{2}\right), \color{blue}{e^{\ell} + \frac{-1}{e^{\ell}}}, U\right) \]
      9. fma-lowering-fma.f64N/A

        \[\leadsto \mathsf{fma.f64}\left(\left(J \cdot \cos \left(\frac{K}{2}\right)\right), \color{blue}{\left(e^{\ell} + \frac{-1}{e^{\ell}}\right)}, U\right) \]
    4. Applied egg-rr100.0%

      \[\leadsto \color{blue}{\mathsf{fma}\left(J \cdot \cos \left(\frac{K}{2}\right), 2 \cdot \sinh \ell, U\right)} \]
    5. Taylor expanded in K around 0

      \[\leadsto \mathsf{fma.f64}\left(\color{blue}{J}, \mathsf{*.f64}\left(2, \mathsf{sinh.f64}\left(\ell\right)\right), U\right) \]
    6. Step-by-step derivation
      1. Simplified87.0%

        \[\leadsto \mathsf{fma}\left(\color{blue}{J}, 2 \cdot \sinh \ell, U\right) \]

      if 1e-30 < (/.f64 K #s(literal 2 binary64))

      1. Initial program 84.7%

        \[\left(J \cdot \left(e^{\ell} - e^{-\ell}\right)\right) \cdot \cos \left(\frac{K}{2}\right) + U \]
      2. Step-by-step derivation
        1. +-lowering-+.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\left(\left(J \cdot \left(e^{\ell} - e^{\mathsf{neg}\left(\ell\right)}\right)\right) \cdot \cos \left(\frac{K}{2}\right)\right), \color{blue}{U}\right) \]
        2. associate-*l*N/A

          \[\leadsto \mathsf{+.f64}\left(\left(J \cdot \left(\left(e^{\ell} - e^{\mathsf{neg}\left(\ell\right)}\right) \cdot \cos \left(\frac{K}{2}\right)\right)\right), U\right) \]
        3. *-commutativeN/A

          \[\leadsto \mathsf{+.f64}\left(\left(\left(\left(e^{\ell} - e^{\mathsf{neg}\left(\ell\right)}\right) \cdot \cos \left(\frac{K}{2}\right)\right) \cdot J\right), U\right) \]
        4. associate-*l*N/A

          \[\leadsto \mathsf{+.f64}\left(\left(\left(e^{\ell} - e^{\mathsf{neg}\left(\ell\right)}\right) \cdot \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
        5. *-lowering-*.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(e^{\ell} - e^{\mathsf{neg}\left(\ell\right)}\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
        6. sub-negN/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(e^{\ell} + \left(\mathsf{neg}\left(e^{\mathsf{neg}\left(\ell\right)}\right)\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
        7. +-lowering-+.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\left(e^{\ell}\right), \left(\mathsf{neg}\left(e^{\mathsf{neg}\left(\ell\right)}\right)\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
        8. exp-lowering-exp.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \left(\mathsf{neg}\left(e^{\mathsf{neg}\left(\ell\right)}\right)\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
        9. exp-negN/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \left(\mathsf{neg}\left(\frac{1}{e^{\ell}}\right)\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
        10. distribute-neg-fracN/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \left(\frac{\mathsf{neg}\left(1\right)}{e^{\ell}}\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
        11. metadata-evalN/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \left(\frac{-1}{e^{\ell}}\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
        12. /-lowering-/.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \mathsf{/.f64}\left(-1, \left(e^{\ell}\right)\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
        13. exp-lowering-exp.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \mathsf{/.f64}\left(-1, \mathsf{exp.f64}\left(\ell\right)\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
        14. *-commutativeN/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \mathsf{/.f64}\left(-1, \mathsf{exp.f64}\left(\ell\right)\right)\right), \left(J \cdot \cos \left(\frac{K}{2}\right)\right)\right), U\right) \]
        15. *-lowering-*.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \mathsf{/.f64}\left(-1, \mathsf{exp.f64}\left(\ell\right)\right)\right), \mathsf{*.f64}\left(J, \cos \left(\frac{K}{2}\right)\right)\right), U\right) \]
        16. cos-lowering-cos.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \mathsf{/.f64}\left(-1, \mathsf{exp.f64}\left(\ell\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\left(\frac{K}{2}\right)\right)\right)\right), U\right) \]
        17. /-lowering-/.f6484.7%

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \mathsf{/.f64}\left(-1, \mathsf{exp.f64}\left(\ell\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
      3. Simplified84.7%

        \[\leadsto \color{blue}{\left(e^{\ell} + \frac{-1}{e^{\ell}}\right) \cdot \left(J \cdot \cos \left(\frac{K}{2}\right)\right) + U} \]
      4. Add Preprocessing
      5. Taylor expanded in l around 0

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\color{blue}{\left(\ell \cdot \left(2 + {\ell}^{2} \cdot \left(\frac{1}{3} + {\ell}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)}, \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
      6. Step-by-step derivation
        1. *-lowering-*.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \left(2 + {\ell}^{2} \cdot \left(\frac{1}{3} + {\ell}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
        2. +-lowering-+.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \left({\ell}^{2} \cdot \left(\frac{1}{3} + {\ell}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
        3. *-lowering-*.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\left({\ell}^{2}\right), \left(\frac{1}{3} + {\ell}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
        4. unpow2N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\left(\ell \cdot \ell\right), \left(\frac{1}{3} + {\ell}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
        5. *-lowering-*.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \left(\frac{1}{3} + {\ell}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
        6. +-lowering-+.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \left({\ell}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
        7. unpow2N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \left(\left(\ell \cdot \ell\right) \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
        8. associate-*l*N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \left(\ell \cdot \left(\ell \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
        9. *-commutativeN/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \left(\ell \cdot \left(\left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right) \cdot \ell\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
        10. *-lowering-*.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\ell, \left(\left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right) \cdot \ell\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
        11. *-commutativeN/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\ell, \left(\ell \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
        12. *-lowering-*.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
        13. +-lowering-+.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(\frac{1}{60}, \left(\frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
        14. *-commutativeN/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(\frac{1}{60}, \left({\ell}^{2} \cdot \frac{1}{2520}\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
        15. *-lowering-*.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(\frac{1}{60}, \mathsf{*.f64}\left(\left({\ell}^{2}\right), \frac{1}{2520}\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
        16. unpow2N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(\frac{1}{60}, \mathsf{*.f64}\left(\left(\ell \cdot \ell\right), \frac{1}{2520}\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
        17. *-lowering-*.f6496.0%

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(\frac{1}{60}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \frac{1}{2520}\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
      7. Simplified96.0%

        \[\leadsto \color{blue}{\left(\ell \cdot \left(2 + \left(\ell \cdot \ell\right) \cdot \left(0.3333333333333333 + \ell \cdot \left(\ell \cdot \left(0.016666666666666666 + \left(\ell \cdot \ell\right) \cdot 0.0003968253968253968\right)\right)\right)\right)\right)} \cdot \left(J \cdot \cos \left(\frac{K}{2}\right)\right) + U \]
    7. Recombined 2 regimes into one program.
    8. Final simplification89.5%

      \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{K}{2} \leq 10^{-30}:\\ \;\;\;\;\mathsf{fma}\left(J, 2 \cdot \sinh \ell, U\right)\\ \mathbf{else}:\\ \;\;\;\;U + \left(J \cdot \cos \left(\frac{K}{2}\right)\right) \cdot \left(\ell \cdot \left(2 + \left(\ell \cdot \ell\right) \cdot \left(0.3333333333333333 + \ell \cdot \left(\ell \cdot \left(0.016666666666666666 + \left(\ell \cdot \ell\right) \cdot 0.0003968253968253968\right)\right)\right)\right)\right)\\ \end{array} \]
    9. Add Preprocessing

    Alternative 7: 99.9% accurate, 1.5× speedup?

    \[\begin{array}{l} \\ U + \cos \left(\frac{K}{2}\right) \cdot \left(\sinh \ell \cdot \left(J \cdot 2\right)\right) \end{array} \]
    (FPCore (J l K U)
     :precision binary64
     (+ U (* (cos (/ K 2.0)) (* (sinh l) (* J 2.0)))))
    double code(double J, double l, double K, double U) {
    	return U + (cos((K / 2.0)) * (sinh(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 + (cos((k / 2.0d0)) * (sinh(l) * (j * 2.0d0)))
    end function
    
    public static double code(double J, double l, double K, double U) {
    	return U + (Math.cos((K / 2.0)) * (Math.sinh(l) * (J * 2.0)));
    }
    
    def code(J, l, K, U):
    	return U + (math.cos((K / 2.0)) * (math.sinh(l) * (J * 2.0)))
    
    function code(J, l, K, U)
    	return Float64(U + Float64(cos(Float64(K / 2.0)) * Float64(sinh(l) * Float64(J * 2.0))))
    end
    
    function tmp = code(J, l, K, U)
    	tmp = U + (cos((K / 2.0)) * (sinh(l) * (J * 2.0)));
    end
    
    code[J_, l_, K_, U_] := N[(U + N[(N[Cos[N[(K / 2.0), $MachinePrecision]], $MachinePrecision] * N[(N[Sinh[l], $MachinePrecision] * N[(J * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
    
    \begin{array}{l}
    
    \\
    U + \cos \left(\frac{K}{2}\right) \cdot \left(\sinh \ell \cdot \left(J \cdot 2\right)\right)
    \end{array}
    
    Derivation
    1. Initial program 89.3%

      \[\left(J \cdot \left(e^{\ell} - e^{-\ell}\right)\right) \cdot \cos \left(\frac{K}{2}\right) + U \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. sinh-undefN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(J \cdot \left(2 \cdot \sinh \ell\right)\right), \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right), U\right) \]
      2. associate-*r*N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(\left(J \cdot 2\right) \cdot \sinh \ell\right), \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right), U\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(J \cdot 2\right), \sinh \ell\right), \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right), U\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(J, 2\right), \sinh \ell\right), \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right), U\right) \]
      5. sinh-lowering-sinh.f6499.9%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(J, 2\right), \mathsf{sinh.f64}\left(\ell\right)\right), \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right), U\right) \]
    4. Applied egg-rr99.9%

      \[\leadsto \color{blue}{\left(\left(J \cdot 2\right) \cdot \sinh \ell\right)} \cdot \cos \left(\frac{K}{2}\right) + U \]
    5. Final simplification99.9%

      \[\leadsto U + \cos \left(\frac{K}{2}\right) \cdot \left(\sinh \ell \cdot \left(J \cdot 2\right)\right) \]
    6. Add Preprocessing

    Alternative 8: 93.5% accurate, 2.3× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_0 := J \cdot \left(\left(\ell \cdot \cos \left(K \cdot 0.5\right)\right) \cdot \left(2 + \ell \cdot \left(\ell \cdot \left(0.3333333333333333 + \left(\ell \cdot \ell\right) \cdot 0.016666666666666666\right)\right)\right)\right)\\ \mathbf{if}\;\ell \leq -6.6 \cdot 10^{+66}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;\ell \leq -0.0078:\\ \;\;\;\;U \cdot \left(1 + \frac{\ell \cdot \left(J \cdot \left(2 + \ell \cdot \left(\ell \cdot \left(0.3333333333333333 + \ell \cdot \left(\ell \cdot \left(0.016666666666666666 + \left(\ell \cdot \ell\right) \cdot 0.0003968253968253968\right)\right)\right)\right)\right)\right)}{U}\right)\\ \mathbf{elif}\;\ell \leq 1250:\\ \;\;\;\;U + \left(J \cdot \cos \left(\frac{K}{2}\right)\right) \cdot \left(2 \cdot \ell\right)\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \]
    (FPCore (J l K U)
     :precision binary64
     (let* ((t_0
             (*
              J
              (*
               (* l (cos (* K 0.5)))
               (+
                2.0
                (*
                 l
                 (*
                  l
                  (+ 0.3333333333333333 (* (* l l) 0.016666666666666666)))))))))
       (if (<= l -6.6e+66)
         t_0
         (if (<= l -0.0078)
           (*
            U
            (+
             1.0
             (/
              (*
               l
               (*
                J
                (+
                 2.0
                 (*
                  l
                  (*
                   l
                   (+
                    0.3333333333333333
                    (*
                     l
                     (*
                      l
                      (+
                       0.016666666666666666
                       (* (* l l) 0.0003968253968253968))))))))))
              U)))
           (if (<= l 1250.0) (+ U (* (* J (cos (/ K 2.0))) (* 2.0 l))) t_0)))))
    double code(double J, double l, double K, double U) {
    	double t_0 = J * ((l * cos((K * 0.5))) * (2.0 + (l * (l * (0.3333333333333333 + ((l * l) * 0.016666666666666666))))));
    	double tmp;
    	if (l <= -6.6e+66) {
    		tmp = t_0;
    	} else if (l <= -0.0078) {
    		tmp = U * (1.0 + ((l * (J * (2.0 + (l * (l * (0.3333333333333333 + (l * (l * (0.016666666666666666 + ((l * l) * 0.0003968253968253968)))))))))) / U));
    	} else if (l <= 1250.0) {
    		tmp = U + ((J * cos((K / 2.0))) * (2.0 * l));
    	} 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) :: tmp
        t_0 = j * ((l * cos((k * 0.5d0))) * (2.0d0 + (l * (l * (0.3333333333333333d0 + ((l * l) * 0.016666666666666666d0))))))
        if (l <= (-6.6d+66)) then
            tmp = t_0
        else if (l <= (-0.0078d0)) then
            tmp = u * (1.0d0 + ((l * (j * (2.0d0 + (l * (l * (0.3333333333333333d0 + (l * (l * (0.016666666666666666d0 + ((l * l) * 0.0003968253968253968d0)))))))))) / u))
        else if (l <= 1250.0d0) then
            tmp = u + ((j * cos((k / 2.0d0))) * (2.0d0 * l))
        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 = J * ((l * Math.cos((K * 0.5))) * (2.0 + (l * (l * (0.3333333333333333 + ((l * l) * 0.016666666666666666))))));
    	double tmp;
    	if (l <= -6.6e+66) {
    		tmp = t_0;
    	} else if (l <= -0.0078) {
    		tmp = U * (1.0 + ((l * (J * (2.0 + (l * (l * (0.3333333333333333 + (l * (l * (0.016666666666666666 + ((l * l) * 0.0003968253968253968)))))))))) / U));
    	} else if (l <= 1250.0) {
    		tmp = U + ((J * Math.cos((K / 2.0))) * (2.0 * l));
    	} else {
    		tmp = t_0;
    	}
    	return tmp;
    }
    
    def code(J, l, K, U):
    	t_0 = J * ((l * math.cos((K * 0.5))) * (2.0 + (l * (l * (0.3333333333333333 + ((l * l) * 0.016666666666666666))))))
    	tmp = 0
    	if l <= -6.6e+66:
    		tmp = t_0
    	elif l <= -0.0078:
    		tmp = U * (1.0 + ((l * (J * (2.0 + (l * (l * (0.3333333333333333 + (l * (l * (0.016666666666666666 + ((l * l) * 0.0003968253968253968)))))))))) / U))
    	elif l <= 1250.0:
    		tmp = U + ((J * math.cos((K / 2.0))) * (2.0 * l))
    	else:
    		tmp = t_0
    	return tmp
    
    function code(J, l, K, U)
    	t_0 = Float64(J * Float64(Float64(l * cos(Float64(K * 0.5))) * Float64(2.0 + Float64(l * Float64(l * Float64(0.3333333333333333 + Float64(Float64(l * l) * 0.016666666666666666)))))))
    	tmp = 0.0
    	if (l <= -6.6e+66)
    		tmp = t_0;
    	elseif (l <= -0.0078)
    		tmp = Float64(U * Float64(1.0 + Float64(Float64(l * Float64(J * Float64(2.0 + Float64(l * Float64(l * Float64(0.3333333333333333 + Float64(l * Float64(l * Float64(0.016666666666666666 + Float64(Float64(l * l) * 0.0003968253968253968)))))))))) / U)));
    	elseif (l <= 1250.0)
    		tmp = Float64(U + Float64(Float64(J * cos(Float64(K / 2.0))) * Float64(2.0 * l)));
    	else
    		tmp = t_0;
    	end
    	return tmp
    end
    
    function tmp_2 = code(J, l, K, U)
    	t_0 = J * ((l * cos((K * 0.5))) * (2.0 + (l * (l * (0.3333333333333333 + ((l * l) * 0.016666666666666666))))));
    	tmp = 0.0;
    	if (l <= -6.6e+66)
    		tmp = t_0;
    	elseif (l <= -0.0078)
    		tmp = U * (1.0 + ((l * (J * (2.0 + (l * (l * (0.3333333333333333 + (l * (l * (0.016666666666666666 + ((l * l) * 0.0003968253968253968)))))))))) / U));
    	elseif (l <= 1250.0)
    		tmp = U + ((J * cos((K / 2.0))) * (2.0 * l));
    	else
    		tmp = t_0;
    	end
    	tmp_2 = tmp;
    end
    
    code[J_, l_, K_, U_] := Block[{t$95$0 = N[(J * N[(N[(l * N[Cos[N[(K * 0.5), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(2.0 + N[(l * N[(l * N[(0.3333333333333333 + N[(N[(l * l), $MachinePrecision] * 0.016666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[l, -6.6e+66], t$95$0, If[LessEqual[l, -0.0078], N[(U * N[(1.0 + N[(N[(l * N[(J * N[(2.0 + N[(l * N[(l * N[(0.3333333333333333 + N[(l * N[(l * N[(0.016666666666666666 + N[(N[(l * l), $MachinePrecision] * 0.0003968253968253968), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[l, 1250.0], N[(U + N[(N[(J * N[Cos[N[(K / 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(2.0 * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_0 := J \cdot \left(\left(\ell \cdot \cos \left(K \cdot 0.5\right)\right) \cdot \left(2 + \ell \cdot \left(\ell \cdot \left(0.3333333333333333 + \left(\ell \cdot \ell\right) \cdot 0.016666666666666666\right)\right)\right)\right)\\
    \mathbf{if}\;\ell \leq -6.6 \cdot 10^{+66}:\\
    \;\;\;\;t\_0\\
    
    \mathbf{elif}\;\ell \leq -0.0078:\\
    \;\;\;\;U \cdot \left(1 + \frac{\ell \cdot \left(J \cdot \left(2 + \ell \cdot \left(\ell \cdot \left(0.3333333333333333 + \ell \cdot \left(\ell \cdot \left(0.016666666666666666 + \left(\ell \cdot \ell\right) \cdot 0.0003968253968253968\right)\right)\right)\right)\right)\right)}{U}\right)\\
    
    \mathbf{elif}\;\ell \leq 1250:\\
    \;\;\;\;U + \left(J \cdot \cos \left(\frac{K}{2}\right)\right) \cdot \left(2 \cdot \ell\right)\\
    
    \mathbf{else}:\\
    \;\;\;\;t\_0\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if l < -6.6000000000000003e66 or 1250 < l

      1. Initial program 100.0%

        \[\left(J \cdot \left(e^{\ell} - e^{-\ell}\right)\right) \cdot \cos \left(\frac{K}{2}\right) + U \]
      2. Step-by-step derivation
        1. +-lowering-+.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\left(\left(J \cdot \left(e^{\ell} - e^{\mathsf{neg}\left(\ell\right)}\right)\right) \cdot \cos \left(\frac{K}{2}\right)\right), \color{blue}{U}\right) \]
        2. associate-*l*N/A

          \[\leadsto \mathsf{+.f64}\left(\left(J \cdot \left(\left(e^{\ell} - e^{\mathsf{neg}\left(\ell\right)}\right) \cdot \cos \left(\frac{K}{2}\right)\right)\right), U\right) \]
        3. *-commutativeN/A

          \[\leadsto \mathsf{+.f64}\left(\left(\left(\left(e^{\ell} - e^{\mathsf{neg}\left(\ell\right)}\right) \cdot \cos \left(\frac{K}{2}\right)\right) \cdot J\right), U\right) \]
        4. associate-*l*N/A

          \[\leadsto \mathsf{+.f64}\left(\left(\left(e^{\ell} - e^{\mathsf{neg}\left(\ell\right)}\right) \cdot \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
        5. *-lowering-*.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(e^{\ell} - e^{\mathsf{neg}\left(\ell\right)}\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
        6. sub-negN/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(e^{\ell} + \left(\mathsf{neg}\left(e^{\mathsf{neg}\left(\ell\right)}\right)\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
        7. +-lowering-+.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\left(e^{\ell}\right), \left(\mathsf{neg}\left(e^{\mathsf{neg}\left(\ell\right)}\right)\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
        8. exp-lowering-exp.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \left(\mathsf{neg}\left(e^{\mathsf{neg}\left(\ell\right)}\right)\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
        9. exp-negN/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \left(\mathsf{neg}\left(\frac{1}{e^{\ell}}\right)\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
        10. distribute-neg-fracN/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \left(\frac{\mathsf{neg}\left(1\right)}{e^{\ell}}\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
        11. metadata-evalN/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \left(\frac{-1}{e^{\ell}}\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
        12. /-lowering-/.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \mathsf{/.f64}\left(-1, \left(e^{\ell}\right)\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
        13. exp-lowering-exp.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \mathsf{/.f64}\left(-1, \mathsf{exp.f64}\left(\ell\right)\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
        14. *-commutativeN/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \mathsf{/.f64}\left(-1, \mathsf{exp.f64}\left(\ell\right)\right)\right), \left(J \cdot \cos \left(\frac{K}{2}\right)\right)\right), U\right) \]
        15. *-lowering-*.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \mathsf{/.f64}\left(-1, \mathsf{exp.f64}\left(\ell\right)\right)\right), \mathsf{*.f64}\left(J, \cos \left(\frac{K}{2}\right)\right)\right), U\right) \]
        16. cos-lowering-cos.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \mathsf{/.f64}\left(-1, \mathsf{exp.f64}\left(\ell\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\left(\frac{K}{2}\right)\right)\right)\right), U\right) \]
        17. /-lowering-/.f64100.0%

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \mathsf{/.f64}\left(-1, \mathsf{exp.f64}\left(\ell\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
      3. Simplified100.0%

        \[\leadsto \color{blue}{\left(e^{\ell} + \frac{-1}{e^{\ell}}\right) \cdot \left(J \cdot \cos \left(\frac{K}{2}\right)\right) + U} \]
      4. Add Preprocessing
      5. Taylor expanded in l around 0

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\color{blue}{\left(\ell \cdot \left(2 + {\ell}^{2} \cdot \left(\frac{1}{3} + \frac{1}{60} \cdot {\ell}^{2}\right)\right)\right)}, \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
      6. Step-by-step derivation
        1. *-lowering-*.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \left(2 + {\ell}^{2} \cdot \left(\frac{1}{3} + \frac{1}{60} \cdot {\ell}^{2}\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
        2. +-lowering-+.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \left({\ell}^{2} \cdot \left(\frac{1}{3} + \frac{1}{60} \cdot {\ell}^{2}\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
        3. *-lowering-*.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\left({\ell}^{2}\right), \left(\frac{1}{3} + \frac{1}{60} \cdot {\ell}^{2}\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
        4. unpow2N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\left(\ell \cdot \ell\right), \left(\frac{1}{3} + \frac{1}{60} \cdot {\ell}^{2}\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
        5. *-lowering-*.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \left(\frac{1}{3} + \frac{1}{60} \cdot {\ell}^{2}\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
        6. +-lowering-+.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \left(\frac{1}{60} \cdot {\ell}^{2}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
        7. *-commutativeN/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \left({\ell}^{2} \cdot \frac{1}{60}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
        8. *-lowering-*.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\left({\ell}^{2}\right), \frac{1}{60}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
        9. unpow2N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\left(\ell \cdot \ell\right), \frac{1}{60}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
        10. *-lowering-*.f6494.1%

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \frac{1}{60}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
      7. Simplified94.1%

        \[\leadsto \color{blue}{\left(\ell \cdot \left(2 + \left(\ell \cdot \ell\right) \cdot \left(0.3333333333333333 + \left(\ell \cdot \ell\right) \cdot 0.016666666666666666\right)\right)\right)} \cdot \left(J \cdot \cos \left(\frac{K}{2}\right)\right) + U \]
      8. Taylor expanded in J around inf

        \[\leadsto \color{blue}{J \cdot \left(\ell \cdot \left(\cos \left(\frac{1}{2} \cdot K\right) \cdot \left(2 + {\ell}^{2} \cdot \left(\frac{1}{3} + \frac{1}{60} \cdot {\ell}^{2}\right)\right)\right)\right)} \]
      9. Step-by-step derivation
        1. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(J, \color{blue}{\left(\ell \cdot \left(\cos \left(\frac{1}{2} \cdot K\right) \cdot \left(2 + {\ell}^{2} \cdot \left(\frac{1}{3} + \frac{1}{60} \cdot {\ell}^{2}\right)\right)\right)\right)}\right) \]
        2. associate-*r*N/A

          \[\leadsto \mathsf{*.f64}\left(J, \left(\left(\ell \cdot \cos \left(\frac{1}{2} \cdot K\right)\right) \cdot \color{blue}{\left(2 + {\ell}^{2} \cdot \left(\frac{1}{3} + \frac{1}{60} \cdot {\ell}^{2}\right)\right)}\right)\right) \]
        3. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\left(\ell \cdot \cos \left(\frac{1}{2} \cdot K\right)\right), \color{blue}{\left(2 + {\ell}^{2} \cdot \left(\frac{1}{3} + \frac{1}{60} \cdot {\ell}^{2}\right)\right)}\right)\right) \]
        4. *-commutativeN/A

          \[\leadsto \mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\left(\cos \left(\frac{1}{2} \cdot K\right) \cdot \ell\right), \left(\color{blue}{2} + {\ell}^{2} \cdot \left(\frac{1}{3} + \frac{1}{60} \cdot {\ell}^{2}\right)\right)\right)\right) \]
        5. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\cos \left(\frac{1}{2} \cdot K\right), \ell\right), \left(\color{blue}{2} + {\ell}^{2} \cdot \left(\frac{1}{3} + \frac{1}{60} \cdot {\ell}^{2}\right)\right)\right)\right) \]
        6. cos-lowering-cos.f64N/A

          \[\leadsto \mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{cos.f64}\left(\left(\frac{1}{2} \cdot K\right)\right), \ell\right), \left(2 + {\ell}^{2} \cdot \left(\frac{1}{3} + \frac{1}{60} \cdot {\ell}^{2}\right)\right)\right)\right) \]
        7. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, K\right)\right), \ell\right), \left(2 + {\ell}^{2} \cdot \left(\frac{1}{3} + \frac{1}{60} \cdot {\ell}^{2}\right)\right)\right)\right) \]
        8. +-lowering-+.f64N/A

          \[\leadsto \mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, K\right)\right), \ell\right), \mathsf{+.f64}\left(2, \color{blue}{\left({\ell}^{2} \cdot \left(\frac{1}{3} + \frac{1}{60} \cdot {\ell}^{2}\right)\right)}\right)\right)\right) \]
        9. unpow2N/A

          \[\leadsto \mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, K\right)\right), \ell\right), \mathsf{+.f64}\left(2, \left(\left(\ell \cdot \ell\right) \cdot \left(\color{blue}{\frac{1}{3}} + \frac{1}{60} \cdot {\ell}^{2}\right)\right)\right)\right)\right) \]
        10. associate-*l*N/A

          \[\leadsto \mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, K\right)\right), \ell\right), \mathsf{+.f64}\left(2, \left(\ell \cdot \color{blue}{\left(\ell \cdot \left(\frac{1}{3} + \frac{1}{60} \cdot {\ell}^{2}\right)\right)}\right)\right)\right)\right) \]
        11. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, K\right)\right), \ell\right), \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\ell, \color{blue}{\left(\ell \cdot \left(\frac{1}{3} + \frac{1}{60} \cdot {\ell}^{2}\right)\right)}\right)\right)\right)\right) \]
        12. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, K\right)\right), \ell\right), \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \color{blue}{\left(\frac{1}{3} + \frac{1}{60} \cdot {\ell}^{2}\right)}\right)\right)\right)\right)\right) \]
        13. +-lowering-+.f64N/A

          \[\leadsto \mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, K\right)\right), \ell\right), \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(\frac{1}{3}, \color{blue}{\left(\frac{1}{60} \cdot {\ell}^{2}\right)}\right)\right)\right)\right)\right)\right) \]
        14. *-commutativeN/A

          \[\leadsto \mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, K\right)\right), \ell\right), \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(\frac{1}{3}, \left({\ell}^{2} \cdot \color{blue}{\frac{1}{60}}\right)\right)\right)\right)\right)\right)\right) \]
        15. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, K\right)\right), \ell\right), \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\left({\ell}^{2}\right), \color{blue}{\frac{1}{60}}\right)\right)\right)\right)\right)\right)\right) \]
        16. unpow2N/A

          \[\leadsto \mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, K\right)\right), \ell\right), \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\left(\ell \cdot \ell\right), \frac{1}{60}\right)\right)\right)\right)\right)\right)\right) \]
        17. *-lowering-*.f6494.2%

          \[\leadsto \mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, K\right)\right), \ell\right), \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \frac{1}{60}\right)\right)\right)\right)\right)\right)\right) \]
      10. Simplified94.2%

        \[\leadsto \color{blue}{J \cdot \left(\left(\cos \left(0.5 \cdot K\right) \cdot \ell\right) \cdot \left(2 + \ell \cdot \left(\ell \cdot \left(0.3333333333333333 + \left(\ell \cdot \ell\right) \cdot 0.016666666666666666\right)\right)\right)\right)} \]

      if -6.6000000000000003e66 < l < -0.0077999999999999996

      1. Initial program 100.0%

        \[\left(J \cdot \left(e^{\ell} - e^{-\ell}\right)\right) \cdot \cos \left(\frac{K}{2}\right) + U \]
      2. Step-by-step derivation
        1. +-lowering-+.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\left(\left(J \cdot \left(e^{\ell} - e^{\mathsf{neg}\left(\ell\right)}\right)\right) \cdot \cos \left(\frac{K}{2}\right)\right), \color{blue}{U}\right) \]
        2. associate-*l*N/A

          \[\leadsto \mathsf{+.f64}\left(\left(J \cdot \left(\left(e^{\ell} - e^{\mathsf{neg}\left(\ell\right)}\right) \cdot \cos \left(\frac{K}{2}\right)\right)\right), U\right) \]
        3. *-commutativeN/A

          \[\leadsto \mathsf{+.f64}\left(\left(\left(\left(e^{\ell} - e^{\mathsf{neg}\left(\ell\right)}\right) \cdot \cos \left(\frac{K}{2}\right)\right) \cdot J\right), U\right) \]
        4. associate-*l*N/A

          \[\leadsto \mathsf{+.f64}\left(\left(\left(e^{\ell} - e^{\mathsf{neg}\left(\ell\right)}\right) \cdot \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
        5. *-lowering-*.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(e^{\ell} - e^{\mathsf{neg}\left(\ell\right)}\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
        6. sub-negN/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(e^{\ell} + \left(\mathsf{neg}\left(e^{\mathsf{neg}\left(\ell\right)}\right)\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
        7. +-lowering-+.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\left(e^{\ell}\right), \left(\mathsf{neg}\left(e^{\mathsf{neg}\left(\ell\right)}\right)\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
        8. exp-lowering-exp.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \left(\mathsf{neg}\left(e^{\mathsf{neg}\left(\ell\right)}\right)\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
        9. exp-negN/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \left(\mathsf{neg}\left(\frac{1}{e^{\ell}}\right)\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
        10. distribute-neg-fracN/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \left(\frac{\mathsf{neg}\left(1\right)}{e^{\ell}}\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
        11. metadata-evalN/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \left(\frac{-1}{e^{\ell}}\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
        12. /-lowering-/.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \mathsf{/.f64}\left(-1, \left(e^{\ell}\right)\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
        13. exp-lowering-exp.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \mathsf{/.f64}\left(-1, \mathsf{exp.f64}\left(\ell\right)\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
        14. *-commutativeN/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \mathsf{/.f64}\left(-1, \mathsf{exp.f64}\left(\ell\right)\right)\right), \left(J \cdot \cos \left(\frac{K}{2}\right)\right)\right), U\right) \]
        15. *-lowering-*.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \mathsf{/.f64}\left(-1, \mathsf{exp.f64}\left(\ell\right)\right)\right), \mathsf{*.f64}\left(J, \cos \left(\frac{K}{2}\right)\right)\right), U\right) \]
        16. cos-lowering-cos.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \mathsf{/.f64}\left(-1, \mathsf{exp.f64}\left(\ell\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\left(\frac{K}{2}\right)\right)\right)\right), U\right) \]
        17. /-lowering-/.f64100.0%

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \mathsf{/.f64}\left(-1, \mathsf{exp.f64}\left(\ell\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
      3. Simplified100.0%

        \[\leadsto \color{blue}{\left(e^{\ell} + \frac{-1}{e^{\ell}}\right) \cdot \left(J \cdot \cos \left(\frac{K}{2}\right)\right) + U} \]
      4. Add Preprocessing
      5. Taylor expanded in l around 0

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\color{blue}{\left(\ell \cdot \left(2 + {\ell}^{2} \cdot \left(\frac{1}{3} + {\ell}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)}, \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
      6. Step-by-step derivation
        1. *-lowering-*.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \left(2 + {\ell}^{2} \cdot \left(\frac{1}{3} + {\ell}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
        2. +-lowering-+.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \left({\ell}^{2} \cdot \left(\frac{1}{3} + {\ell}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
        3. *-lowering-*.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\left({\ell}^{2}\right), \left(\frac{1}{3} + {\ell}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
        4. unpow2N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\left(\ell \cdot \ell\right), \left(\frac{1}{3} + {\ell}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
        5. *-lowering-*.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \left(\frac{1}{3} + {\ell}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
        6. +-lowering-+.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \left({\ell}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
        7. unpow2N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \left(\left(\ell \cdot \ell\right) \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
        8. associate-*l*N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \left(\ell \cdot \left(\ell \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
        9. *-commutativeN/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \left(\ell \cdot \left(\left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right) \cdot \ell\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
        10. *-lowering-*.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\ell, \left(\left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right) \cdot \ell\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
        11. *-commutativeN/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\ell, \left(\ell \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
        12. *-lowering-*.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
        13. +-lowering-+.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(\frac{1}{60}, \left(\frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
        14. *-commutativeN/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(\frac{1}{60}, \left({\ell}^{2} \cdot \frac{1}{2520}\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
        15. *-lowering-*.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(\frac{1}{60}, \mathsf{*.f64}\left(\left({\ell}^{2}\right), \frac{1}{2520}\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
        16. unpow2N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(\frac{1}{60}, \mathsf{*.f64}\left(\left(\ell \cdot \ell\right), \frac{1}{2520}\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
        17. *-lowering-*.f6464.6%

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(\frac{1}{60}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \frac{1}{2520}\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
      7. Simplified64.6%

        \[\leadsto \color{blue}{\left(\ell \cdot \left(2 + \left(\ell \cdot \ell\right) \cdot \left(0.3333333333333333 + \ell \cdot \left(\ell \cdot \left(0.016666666666666666 + \left(\ell \cdot \ell\right) \cdot 0.0003968253968253968\right)\right)\right)\right)\right)} \cdot \left(J \cdot \cos \left(\frac{K}{2}\right)\right) + U \]
      8. Taylor expanded in U around inf

        \[\leadsto \color{blue}{U \cdot \left(1 + \frac{J \cdot \left(\ell \cdot \left(\cos \left(\frac{1}{2} \cdot K\right) \cdot \left(2 + {\ell}^{2} \cdot \left(\frac{1}{3} + {\ell}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right)}{U}\right)} \]
      9. Step-by-step derivation
        1. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(U, \color{blue}{\left(1 + \frac{J \cdot \left(\ell \cdot \left(\cos \left(\frac{1}{2} \cdot K\right) \cdot \left(2 + {\ell}^{2} \cdot \left(\frac{1}{3} + {\ell}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right)}{U}\right)}\right) \]
        2. +-lowering-+.f64N/A

          \[\leadsto \mathsf{*.f64}\left(U, \mathsf{+.f64}\left(1, \color{blue}{\left(\frac{J \cdot \left(\ell \cdot \left(\cos \left(\frac{1}{2} \cdot K\right) \cdot \left(2 + {\ell}^{2} \cdot \left(\frac{1}{3} + {\ell}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right)}{U}\right)}\right)\right) \]
        3. /-lowering-/.f64N/A

          \[\leadsto \mathsf{*.f64}\left(U, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\left(J \cdot \left(\ell \cdot \left(\cos \left(\frac{1}{2} \cdot K\right) \cdot \left(2 + {\ell}^{2} \cdot \left(\frac{1}{3} + {\ell}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right)\right), \color{blue}{U}\right)\right)\right) \]
      10. Simplified76.0%

        \[\leadsto \color{blue}{U \cdot \left(1 + \frac{\left(\cos \left(0.5 \cdot K\right) \cdot \ell\right) \cdot \left(\left(2 + \ell \cdot \left(\ell \cdot \left(0.3333333333333333 + \ell \cdot \left(\ell \cdot \left(0.016666666666666666 + \left(\ell \cdot \ell\right) \cdot 0.0003968253968253968\right)\right)\right)\right)\right) \cdot J\right)}{U}\right)} \]
      11. Taylor expanded in K around 0

        \[\leadsto \color{blue}{U \cdot \left(1 + \frac{J \cdot \left(\ell \cdot \left(2 + {\ell}^{2} \cdot \left(\frac{1}{3} + {\ell}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)}{U}\right)} \]
      12. Step-by-step derivation
        1. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(U, \color{blue}{\left(1 + \frac{J \cdot \left(\ell \cdot \left(2 + {\ell}^{2} \cdot \left(\frac{1}{3} + {\ell}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)}{U}\right)}\right) \]
        2. +-lowering-+.f64N/A

          \[\leadsto \mathsf{*.f64}\left(U, \mathsf{+.f64}\left(1, \color{blue}{\left(\frac{J \cdot \left(\ell \cdot \left(2 + {\ell}^{2} \cdot \left(\frac{1}{3} + {\ell}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)}{U}\right)}\right)\right) \]
        3. /-lowering-/.f64N/A

          \[\leadsto \mathsf{*.f64}\left(U, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\left(J \cdot \left(\ell \cdot \left(2 + {\ell}^{2} \cdot \left(\frac{1}{3} + {\ell}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right), \color{blue}{U}\right)\right)\right) \]
      13. Simplified63.1%

        \[\leadsto \color{blue}{U \cdot \left(1 + \frac{\ell \cdot \left(J \cdot \left(2 + \ell \cdot \left(\ell \cdot \left(0.3333333333333333 + \ell \cdot \left(\ell \cdot \left(0.016666666666666666 + \left(\ell \cdot \ell\right) \cdot 0.0003968253968253968\right)\right)\right)\right)\right)\right)}{U}\right)} \]

      if -0.0077999999999999996 < l < 1250

      1. Initial program 77.9%

        \[\left(J \cdot \left(e^{\ell} - e^{-\ell}\right)\right) \cdot \cos \left(\frac{K}{2}\right) + U \]
      2. Step-by-step derivation
        1. +-lowering-+.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\left(\left(J \cdot \left(e^{\ell} - e^{\mathsf{neg}\left(\ell\right)}\right)\right) \cdot \cos \left(\frac{K}{2}\right)\right), \color{blue}{U}\right) \]
        2. associate-*l*N/A

          \[\leadsto \mathsf{+.f64}\left(\left(J \cdot \left(\left(e^{\ell} - e^{\mathsf{neg}\left(\ell\right)}\right) \cdot \cos \left(\frac{K}{2}\right)\right)\right), U\right) \]
        3. *-commutativeN/A

          \[\leadsto \mathsf{+.f64}\left(\left(\left(\left(e^{\ell} - e^{\mathsf{neg}\left(\ell\right)}\right) \cdot \cos \left(\frac{K}{2}\right)\right) \cdot J\right), U\right) \]
        4. associate-*l*N/A

          \[\leadsto \mathsf{+.f64}\left(\left(\left(e^{\ell} - e^{\mathsf{neg}\left(\ell\right)}\right) \cdot \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
        5. *-lowering-*.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(e^{\ell} - e^{\mathsf{neg}\left(\ell\right)}\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
        6. sub-negN/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(e^{\ell} + \left(\mathsf{neg}\left(e^{\mathsf{neg}\left(\ell\right)}\right)\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
        7. +-lowering-+.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\left(e^{\ell}\right), \left(\mathsf{neg}\left(e^{\mathsf{neg}\left(\ell\right)}\right)\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
        8. exp-lowering-exp.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \left(\mathsf{neg}\left(e^{\mathsf{neg}\left(\ell\right)}\right)\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
        9. exp-negN/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \left(\mathsf{neg}\left(\frac{1}{e^{\ell}}\right)\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
        10. distribute-neg-fracN/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \left(\frac{\mathsf{neg}\left(1\right)}{e^{\ell}}\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
        11. metadata-evalN/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \left(\frac{-1}{e^{\ell}}\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
        12. /-lowering-/.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \mathsf{/.f64}\left(-1, \left(e^{\ell}\right)\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
        13. exp-lowering-exp.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \mathsf{/.f64}\left(-1, \mathsf{exp.f64}\left(\ell\right)\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
        14. *-commutativeN/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \mathsf{/.f64}\left(-1, \mathsf{exp.f64}\left(\ell\right)\right)\right), \left(J \cdot \cos \left(\frac{K}{2}\right)\right)\right), U\right) \]
        15. *-lowering-*.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \mathsf{/.f64}\left(-1, \mathsf{exp.f64}\left(\ell\right)\right)\right), \mathsf{*.f64}\left(J, \cos \left(\frac{K}{2}\right)\right)\right), U\right) \]
        16. cos-lowering-cos.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \mathsf{/.f64}\left(-1, \mathsf{exp.f64}\left(\ell\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\left(\frac{K}{2}\right)\right)\right)\right), U\right) \]
        17. /-lowering-/.f6477.9%

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \mathsf{/.f64}\left(-1, \mathsf{exp.f64}\left(\ell\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
      3. Simplified77.9%

        \[\leadsto \color{blue}{\left(e^{\ell} + \frac{-1}{e^{\ell}}\right) \cdot \left(J \cdot \cos \left(\frac{K}{2}\right)\right) + U} \]
      4. Add Preprocessing
      5. Taylor expanded in l around 0

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\color{blue}{\left(2 \cdot \ell\right)}, \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
      6. Step-by-step derivation
        1. *-commutativeN/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(\ell \cdot 2\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
        2. *-lowering-*.f6499.9%

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, 2\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
      7. Simplified99.9%

        \[\leadsto \color{blue}{\left(\ell \cdot 2\right)} \cdot \left(J \cdot \cos \left(\frac{K}{2}\right)\right) + U \]
    3. Recombined 3 regimes into one program.
    4. Final simplification95.0%

      \[\leadsto \begin{array}{l} \mathbf{if}\;\ell \leq -6.6 \cdot 10^{+66}:\\ \;\;\;\;J \cdot \left(\left(\ell \cdot \cos \left(K \cdot 0.5\right)\right) \cdot \left(2 + \ell \cdot \left(\ell \cdot \left(0.3333333333333333 + \left(\ell \cdot \ell\right) \cdot 0.016666666666666666\right)\right)\right)\right)\\ \mathbf{elif}\;\ell \leq -0.0078:\\ \;\;\;\;U \cdot \left(1 + \frac{\ell \cdot \left(J \cdot \left(2 + \ell \cdot \left(\ell \cdot \left(0.3333333333333333 + \ell \cdot \left(\ell \cdot \left(0.016666666666666666 + \left(\ell \cdot \ell\right) \cdot 0.0003968253968253968\right)\right)\right)\right)\right)\right)}{U}\right)\\ \mathbf{elif}\;\ell \leq 1250:\\ \;\;\;\;U + \left(J \cdot \cos \left(\frac{K}{2}\right)\right) \cdot \left(2 \cdot \ell\right)\\ \mathbf{else}:\\ \;\;\;\;J \cdot \left(\left(\ell \cdot \cos \left(K \cdot 0.5\right)\right) \cdot \left(2 + \ell \cdot \left(\ell \cdot \left(0.3333333333333333 + \left(\ell \cdot \ell\right) \cdot 0.016666666666666666\right)\right)\right)\right)\\ \end{array} \]
    5. Add Preprocessing

    Alternative 9: 90.6% accurate, 2.3× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_0 := \left(\cos \left(K \cdot 0.5\right) \cdot \left(J \cdot \left(\ell \cdot \ell\right)\right)\right) \cdot \left(\ell \cdot 0.3333333333333333\right)\\ \mathbf{if}\;\ell \leq -2.3 \cdot 10^{+131}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;\ell \leq -0.14:\\ \;\;\;\;U \cdot \left(1 + \frac{\ell \cdot \left(J \cdot \left(2 + \ell \cdot \left(\ell \cdot \left(0.3333333333333333 + \ell \cdot \left(\ell \cdot \left(0.016666666666666666 + \left(\ell \cdot \ell\right) \cdot 0.0003968253968253968\right)\right)\right)\right)\right)\right)}{U}\right)\\ \mathbf{elif}\;\ell \leq 950:\\ \;\;\;\;U + \left(J \cdot \cos \left(\frac{K}{2}\right)\right) \cdot \left(2 \cdot \ell\right)\\ \mathbf{elif}\;\ell \leq 3.6 \cdot 10^{+149}:\\ \;\;\;\;J \cdot \left(\left(2 + \left(\ell \cdot \ell\right) \cdot \left(0.3333333333333333 + \left(\ell \cdot \ell\right) \cdot 0.016666666666666666\right)\right) \cdot \left(\ell \cdot \left(1 + -0.125 \cdot \left(K \cdot K\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \]
    (FPCore (J l K U)
     :precision binary64
     (let* ((t_0 (* (* (cos (* K 0.5)) (* J (* l l))) (* l 0.3333333333333333))))
       (if (<= l -2.3e+131)
         t_0
         (if (<= l -0.14)
           (*
            U
            (+
             1.0
             (/
              (*
               l
               (*
                J
                (+
                 2.0
                 (*
                  l
                  (*
                   l
                   (+
                    0.3333333333333333
                    (*
                     l
                     (*
                      l
                      (+
                       0.016666666666666666
                       (* (* l l) 0.0003968253968253968))))))))))
              U)))
           (if (<= l 950.0)
             (+ U (* (* J (cos (/ K 2.0))) (* 2.0 l)))
             (if (<= l 3.6e+149)
               (*
                J
                (*
                 (+
                  2.0
                  (*
                   (* l l)
                   (+ 0.3333333333333333 (* (* l l) 0.016666666666666666))))
                 (* l (+ 1.0 (* -0.125 (* K K))))))
               t_0))))))
    double code(double J, double l, double K, double U) {
    	double t_0 = (cos((K * 0.5)) * (J * (l * l))) * (l * 0.3333333333333333);
    	double tmp;
    	if (l <= -2.3e+131) {
    		tmp = t_0;
    	} else if (l <= -0.14) {
    		tmp = U * (1.0 + ((l * (J * (2.0 + (l * (l * (0.3333333333333333 + (l * (l * (0.016666666666666666 + ((l * l) * 0.0003968253968253968)))))))))) / U));
    	} else if (l <= 950.0) {
    		tmp = U + ((J * cos((K / 2.0))) * (2.0 * l));
    	} else if (l <= 3.6e+149) {
    		tmp = J * ((2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * 0.016666666666666666)))) * (l * (1.0 + (-0.125 * (K * K)))));
    	} 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) :: tmp
        t_0 = (cos((k * 0.5d0)) * (j * (l * l))) * (l * 0.3333333333333333d0)
        if (l <= (-2.3d+131)) then
            tmp = t_0
        else if (l <= (-0.14d0)) then
            tmp = u * (1.0d0 + ((l * (j * (2.0d0 + (l * (l * (0.3333333333333333d0 + (l * (l * (0.016666666666666666d0 + ((l * l) * 0.0003968253968253968d0)))))))))) / u))
        else if (l <= 950.0d0) then
            tmp = u + ((j * cos((k / 2.0d0))) * (2.0d0 * l))
        else if (l <= 3.6d+149) then
            tmp = j * ((2.0d0 + ((l * l) * (0.3333333333333333d0 + ((l * l) * 0.016666666666666666d0)))) * (l * (1.0d0 + ((-0.125d0) * (k * k)))))
        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 = (Math.cos((K * 0.5)) * (J * (l * l))) * (l * 0.3333333333333333);
    	double tmp;
    	if (l <= -2.3e+131) {
    		tmp = t_0;
    	} else if (l <= -0.14) {
    		tmp = U * (1.0 + ((l * (J * (2.0 + (l * (l * (0.3333333333333333 + (l * (l * (0.016666666666666666 + ((l * l) * 0.0003968253968253968)))))))))) / U));
    	} else if (l <= 950.0) {
    		tmp = U + ((J * Math.cos((K / 2.0))) * (2.0 * l));
    	} else if (l <= 3.6e+149) {
    		tmp = J * ((2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * 0.016666666666666666)))) * (l * (1.0 + (-0.125 * (K * K)))));
    	} else {
    		tmp = t_0;
    	}
    	return tmp;
    }
    
    def code(J, l, K, U):
    	t_0 = (math.cos((K * 0.5)) * (J * (l * l))) * (l * 0.3333333333333333)
    	tmp = 0
    	if l <= -2.3e+131:
    		tmp = t_0
    	elif l <= -0.14:
    		tmp = U * (1.0 + ((l * (J * (2.0 + (l * (l * (0.3333333333333333 + (l * (l * (0.016666666666666666 + ((l * l) * 0.0003968253968253968)))))))))) / U))
    	elif l <= 950.0:
    		tmp = U + ((J * math.cos((K / 2.0))) * (2.0 * l))
    	elif l <= 3.6e+149:
    		tmp = J * ((2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * 0.016666666666666666)))) * (l * (1.0 + (-0.125 * (K * K)))))
    	else:
    		tmp = t_0
    	return tmp
    
    function code(J, l, K, U)
    	t_0 = Float64(Float64(cos(Float64(K * 0.5)) * Float64(J * Float64(l * l))) * Float64(l * 0.3333333333333333))
    	tmp = 0.0
    	if (l <= -2.3e+131)
    		tmp = t_0;
    	elseif (l <= -0.14)
    		tmp = Float64(U * Float64(1.0 + Float64(Float64(l * Float64(J * Float64(2.0 + Float64(l * Float64(l * Float64(0.3333333333333333 + Float64(l * Float64(l * Float64(0.016666666666666666 + Float64(Float64(l * l) * 0.0003968253968253968)))))))))) / U)));
    	elseif (l <= 950.0)
    		tmp = Float64(U + Float64(Float64(J * cos(Float64(K / 2.0))) * Float64(2.0 * l)));
    	elseif (l <= 3.6e+149)
    		tmp = Float64(J * Float64(Float64(2.0 + Float64(Float64(l * l) * Float64(0.3333333333333333 + Float64(Float64(l * l) * 0.016666666666666666)))) * Float64(l * Float64(1.0 + Float64(-0.125 * Float64(K * K))))));
    	else
    		tmp = t_0;
    	end
    	return tmp
    end
    
    function tmp_2 = code(J, l, K, U)
    	t_0 = (cos((K * 0.5)) * (J * (l * l))) * (l * 0.3333333333333333);
    	tmp = 0.0;
    	if (l <= -2.3e+131)
    		tmp = t_0;
    	elseif (l <= -0.14)
    		tmp = U * (1.0 + ((l * (J * (2.0 + (l * (l * (0.3333333333333333 + (l * (l * (0.016666666666666666 + ((l * l) * 0.0003968253968253968)))))))))) / U));
    	elseif (l <= 950.0)
    		tmp = U + ((J * cos((K / 2.0))) * (2.0 * l));
    	elseif (l <= 3.6e+149)
    		tmp = J * ((2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * 0.016666666666666666)))) * (l * (1.0 + (-0.125 * (K * K)))));
    	else
    		tmp = t_0;
    	end
    	tmp_2 = tmp;
    end
    
    code[J_, l_, K_, U_] := Block[{t$95$0 = N[(N[(N[Cos[N[(K * 0.5), $MachinePrecision]], $MachinePrecision] * N[(J * N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(l * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[l, -2.3e+131], t$95$0, If[LessEqual[l, -0.14], N[(U * N[(1.0 + N[(N[(l * N[(J * N[(2.0 + N[(l * N[(l * N[(0.3333333333333333 + N[(l * N[(l * N[(0.016666666666666666 + N[(N[(l * l), $MachinePrecision] * 0.0003968253968253968), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[l, 950.0], N[(U + N[(N[(J * N[Cos[N[(K / 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(2.0 * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[l, 3.6e+149], N[(J * N[(N[(2.0 + N[(N[(l * l), $MachinePrecision] * N[(0.3333333333333333 + N[(N[(l * l), $MachinePrecision] * 0.016666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(l * N[(1.0 + N[(-0.125 * N[(K * K), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_0 := \left(\cos \left(K \cdot 0.5\right) \cdot \left(J \cdot \left(\ell \cdot \ell\right)\right)\right) \cdot \left(\ell \cdot 0.3333333333333333\right)\\
    \mathbf{if}\;\ell \leq -2.3 \cdot 10^{+131}:\\
    \;\;\;\;t\_0\\
    
    \mathbf{elif}\;\ell \leq -0.14:\\
    \;\;\;\;U \cdot \left(1 + \frac{\ell \cdot \left(J \cdot \left(2 + \ell \cdot \left(\ell \cdot \left(0.3333333333333333 + \ell \cdot \left(\ell \cdot \left(0.016666666666666666 + \left(\ell \cdot \ell\right) \cdot 0.0003968253968253968\right)\right)\right)\right)\right)\right)}{U}\right)\\
    
    \mathbf{elif}\;\ell \leq 950:\\
    \;\;\;\;U + \left(J \cdot \cos \left(\frac{K}{2}\right)\right) \cdot \left(2 \cdot \ell\right)\\
    
    \mathbf{elif}\;\ell \leq 3.6 \cdot 10^{+149}:\\
    \;\;\;\;J \cdot \left(\left(2 + \left(\ell \cdot \ell\right) \cdot \left(0.3333333333333333 + \left(\ell \cdot \ell\right) \cdot 0.016666666666666666\right)\right) \cdot \left(\ell \cdot \left(1 + -0.125 \cdot \left(K \cdot K\right)\right)\right)\right)\\
    
    \mathbf{else}:\\
    \;\;\;\;t\_0\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 4 regimes
    2. if l < -2.29999999999999992e131 or 3.59999999999999995e149 < l

      1. Initial program 100.0%

        \[\left(J \cdot \left(e^{\ell} - e^{-\ell}\right)\right) \cdot \cos \left(\frac{K}{2}\right) + U \]
      2. Add Preprocessing
      3. Taylor expanded in l around 0

        \[\leadsto \mathsf{+.f64}\left(\color{blue}{\left(\ell \cdot \left(\frac{1}{3} \cdot \left(J \cdot \left({\ell}^{2} \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) + 2 \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right)\right)}, U\right) \]
      4. Step-by-step derivation
        1. distribute-rgt-inN/A

          \[\leadsto \mathsf{+.f64}\left(\left(\left(\frac{1}{3} \cdot \left(J \cdot \left({\ell}^{2} \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right)\right) \cdot \ell + \left(2 \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) \cdot \ell\right), U\right) \]
        2. fma-defineN/A

          \[\leadsto \mathsf{+.f64}\left(\left(\mathsf{fma}\left(\frac{1}{3} \cdot \left(J \cdot \left({\ell}^{2} \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right), \ell, \left(2 \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) \cdot \ell\right)\right), U\right) \]
        3. *-commutativeN/A

          \[\leadsto \mathsf{+.f64}\left(\left(\mathsf{fma}\left(\frac{1}{3} \cdot \left(J \cdot \left(\cos \left(\frac{1}{2} \cdot K\right) \cdot {\ell}^{2}\right)\right), \ell, \left(2 \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) \cdot \ell\right)\right), U\right) \]
        4. associate-*r*N/A

          \[\leadsto \mathsf{+.f64}\left(\left(\mathsf{fma}\left(\frac{1}{3} \cdot \left(\left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right) \cdot {\ell}^{2}\right), \ell, \left(2 \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) \cdot \ell\right)\right), U\right) \]
        5. associate-*l*N/A

          \[\leadsto \mathsf{+.f64}\left(\left(\mathsf{fma}\left(\left(\frac{1}{3} \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) \cdot {\ell}^{2}, \ell, \left(2 \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) \cdot \ell\right)\right), U\right) \]
        6. *-commutativeN/A

          \[\leadsto \mathsf{+.f64}\left(\left(\mathsf{fma}\left({\ell}^{2} \cdot \left(\frac{1}{3} \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right), \ell, \left(2 \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) \cdot \ell\right)\right), U\right) \]
        7. fma-undefineN/A

          \[\leadsto \mathsf{+.f64}\left(\left(\left({\ell}^{2} \cdot \left(\frac{1}{3} \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right)\right) \cdot \ell + \left(2 \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) \cdot \ell\right), U\right) \]
        8. distribute-rgt-inN/A

          \[\leadsto \mathsf{+.f64}\left(\left(\ell \cdot \left({\ell}^{2} \cdot \left(\frac{1}{3} \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) + 2 \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right)\right), U\right) \]
        9. *-lowering-*.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\ell, \left({\ell}^{2} \cdot \left(\frac{1}{3} \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) + 2 \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right)\right), U\right) \]
      5. Simplified98.8%

        \[\leadsto \color{blue}{\ell \cdot \left(\cos \left(0.5 \cdot K\right) \cdot \left(J \cdot \left(2 + 0.3333333333333333 \cdot \left(\ell \cdot \ell\right)\right)\right)\right)} + U \]
      6. Taylor expanded in l around inf

        \[\leadsto \color{blue}{\frac{1}{3} \cdot \left(J \cdot \left({\ell}^{3} \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right)} \]
      7. Step-by-step derivation
        1. associate-*r*N/A

          \[\leadsto \left(\frac{1}{3} \cdot J\right) \cdot \color{blue}{\left({\ell}^{3} \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)} \]
        2. *-commutativeN/A

          \[\leadsto \left(\frac{1}{3} \cdot J\right) \cdot \left(\cos \left(\frac{1}{2} \cdot K\right) \cdot \color{blue}{{\ell}^{3}}\right) \]
        3. unpow3N/A

          \[\leadsto \left(\frac{1}{3} \cdot J\right) \cdot \left(\cos \left(\frac{1}{2} \cdot K\right) \cdot \left(\left(\ell \cdot \ell\right) \cdot \color{blue}{\ell}\right)\right) \]
        4. unpow2N/A

          \[\leadsto \left(\frac{1}{3} \cdot J\right) \cdot \left(\cos \left(\frac{1}{2} \cdot K\right) \cdot \left({\ell}^{2} \cdot \ell\right)\right) \]
        5. associate-*r*N/A

          \[\leadsto \left(\frac{1}{3} \cdot J\right) \cdot \left(\left(\cos \left(\frac{1}{2} \cdot K\right) \cdot {\ell}^{2}\right) \cdot \color{blue}{\ell}\right) \]
        6. *-commutativeN/A

          \[\leadsto \left(\frac{1}{3} \cdot J\right) \cdot \left(\left({\ell}^{2} \cdot \cos \left(\frac{1}{2} \cdot K\right)\right) \cdot \ell\right) \]
        7. associate-*l*N/A

          \[\leadsto \left(\left(\frac{1}{3} \cdot J\right) \cdot \left({\ell}^{2} \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) \cdot \color{blue}{\ell} \]
        8. associate-*r*N/A

          \[\leadsto \left(\frac{1}{3} \cdot \left(J \cdot \left({\ell}^{2} \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right)\right) \cdot \ell \]
        9. *-commutativeN/A

          \[\leadsto \left(\left(J \cdot \left({\ell}^{2} \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) \cdot \frac{1}{3}\right) \cdot \ell \]
        10. associate-*l*N/A

          \[\leadsto \left(J \cdot \left({\ell}^{2} \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) \cdot \color{blue}{\left(\frac{1}{3} \cdot \ell\right)} \]
        11. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\left(J \cdot \left({\ell}^{2} \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right), \color{blue}{\left(\frac{1}{3} \cdot \ell\right)}\right) \]
        12. associate-*r*N/A

          \[\leadsto \mathsf{*.f64}\left(\left(\left(J \cdot {\ell}^{2}\right) \cdot \cos \left(\frac{1}{2} \cdot K\right)\right), \left(\color{blue}{\frac{1}{3}} \cdot \ell\right)\right) \]
        13. *-commutativeN/A

          \[\leadsto \mathsf{*.f64}\left(\left(\cos \left(\frac{1}{2} \cdot K\right) \cdot \left(J \cdot {\ell}^{2}\right)\right), \left(\color{blue}{\frac{1}{3}} \cdot \ell\right)\right) \]
        14. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\cos \left(\frac{1}{2} \cdot K\right), \left(J \cdot {\ell}^{2}\right)\right), \left(\color{blue}{\frac{1}{3}} \cdot \ell\right)\right) \]
        15. cos-lowering-cos.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{cos.f64}\left(\left(\frac{1}{2} \cdot K\right)\right), \left(J \cdot {\ell}^{2}\right)\right), \left(\frac{1}{3} \cdot \ell\right)\right) \]
        16. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, K\right)\right), \left(J \cdot {\ell}^{2}\right)\right), \left(\frac{1}{3} \cdot \ell\right)\right) \]
        17. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, K\right)\right), \mathsf{*.f64}\left(J, \left({\ell}^{2}\right)\right)\right), \left(\frac{1}{3} \cdot \ell\right)\right) \]
        18. unpow2N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, K\right)\right), \mathsf{*.f64}\left(J, \left(\ell \cdot \ell\right)\right)\right), \left(\frac{1}{3} \cdot \ell\right)\right) \]
        19. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, K\right)\right), \mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\ell, \ell\right)\right)\right), \left(\frac{1}{3} \cdot \ell\right)\right) \]
        20. *-lowering-*.f6498.8%

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, K\right)\right), \mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\ell, \ell\right)\right)\right), \mathsf{*.f64}\left(\frac{1}{3}, \color{blue}{\ell}\right)\right) \]
      8. Simplified98.8%

        \[\leadsto \color{blue}{\left(\cos \left(0.5 \cdot K\right) \cdot \left(J \cdot \left(\ell \cdot \ell\right)\right)\right) \cdot \left(0.3333333333333333 \cdot \ell\right)} \]

      if -2.29999999999999992e131 < l < -0.14000000000000001

      1. Initial program 100.0%

        \[\left(J \cdot \left(e^{\ell} - e^{-\ell}\right)\right) \cdot \cos \left(\frac{K}{2}\right) + U \]
      2. Step-by-step derivation
        1. +-lowering-+.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\left(\left(J \cdot \left(e^{\ell} - e^{\mathsf{neg}\left(\ell\right)}\right)\right) \cdot \cos \left(\frac{K}{2}\right)\right), \color{blue}{U}\right) \]
        2. associate-*l*N/A

          \[\leadsto \mathsf{+.f64}\left(\left(J \cdot \left(\left(e^{\ell} - e^{\mathsf{neg}\left(\ell\right)}\right) \cdot \cos \left(\frac{K}{2}\right)\right)\right), U\right) \]
        3. *-commutativeN/A

          \[\leadsto \mathsf{+.f64}\left(\left(\left(\left(e^{\ell} - e^{\mathsf{neg}\left(\ell\right)}\right) \cdot \cos \left(\frac{K}{2}\right)\right) \cdot J\right), U\right) \]
        4. associate-*l*N/A

          \[\leadsto \mathsf{+.f64}\left(\left(\left(e^{\ell} - e^{\mathsf{neg}\left(\ell\right)}\right) \cdot \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
        5. *-lowering-*.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(e^{\ell} - e^{\mathsf{neg}\left(\ell\right)}\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
        6. sub-negN/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(e^{\ell} + \left(\mathsf{neg}\left(e^{\mathsf{neg}\left(\ell\right)}\right)\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
        7. +-lowering-+.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\left(e^{\ell}\right), \left(\mathsf{neg}\left(e^{\mathsf{neg}\left(\ell\right)}\right)\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
        8. exp-lowering-exp.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \left(\mathsf{neg}\left(e^{\mathsf{neg}\left(\ell\right)}\right)\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
        9. exp-negN/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \left(\mathsf{neg}\left(\frac{1}{e^{\ell}}\right)\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
        10. distribute-neg-fracN/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \left(\frac{\mathsf{neg}\left(1\right)}{e^{\ell}}\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
        11. metadata-evalN/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \left(\frac{-1}{e^{\ell}}\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
        12. /-lowering-/.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \mathsf{/.f64}\left(-1, \left(e^{\ell}\right)\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
        13. exp-lowering-exp.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \mathsf{/.f64}\left(-1, \mathsf{exp.f64}\left(\ell\right)\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
        14. *-commutativeN/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \mathsf{/.f64}\left(-1, \mathsf{exp.f64}\left(\ell\right)\right)\right), \left(J \cdot \cos \left(\frac{K}{2}\right)\right)\right), U\right) \]
        15. *-lowering-*.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \mathsf{/.f64}\left(-1, \mathsf{exp.f64}\left(\ell\right)\right)\right), \mathsf{*.f64}\left(J, \cos \left(\frac{K}{2}\right)\right)\right), U\right) \]
        16. cos-lowering-cos.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \mathsf{/.f64}\left(-1, \mathsf{exp.f64}\left(\ell\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\left(\frac{K}{2}\right)\right)\right)\right), U\right) \]
        17. /-lowering-/.f64100.0%

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \mathsf{/.f64}\left(-1, \mathsf{exp.f64}\left(\ell\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
      3. Simplified100.0%

        \[\leadsto \color{blue}{\left(e^{\ell} + \frac{-1}{e^{\ell}}\right) \cdot \left(J \cdot \cos \left(\frac{K}{2}\right)\right) + U} \]
      4. Add Preprocessing
      5. Taylor expanded in l around 0

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\color{blue}{\left(\ell \cdot \left(2 + {\ell}^{2} \cdot \left(\frac{1}{3} + {\ell}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)}, \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
      6. Step-by-step derivation
        1. *-lowering-*.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \left(2 + {\ell}^{2} \cdot \left(\frac{1}{3} + {\ell}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
        2. +-lowering-+.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \left({\ell}^{2} \cdot \left(\frac{1}{3} + {\ell}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
        3. *-lowering-*.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\left({\ell}^{2}\right), \left(\frac{1}{3} + {\ell}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
        4. unpow2N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\left(\ell \cdot \ell\right), \left(\frac{1}{3} + {\ell}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
        5. *-lowering-*.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \left(\frac{1}{3} + {\ell}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
        6. +-lowering-+.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \left({\ell}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
        7. unpow2N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \left(\left(\ell \cdot \ell\right) \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
        8. associate-*l*N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \left(\ell \cdot \left(\ell \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
        9. *-commutativeN/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \left(\ell \cdot \left(\left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right) \cdot \ell\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
        10. *-lowering-*.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\ell, \left(\left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right) \cdot \ell\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
        11. *-commutativeN/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\ell, \left(\ell \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
        12. *-lowering-*.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
        13. +-lowering-+.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(\frac{1}{60}, \left(\frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
        14. *-commutativeN/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(\frac{1}{60}, \left({\ell}^{2} \cdot \frac{1}{2520}\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
        15. *-lowering-*.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(\frac{1}{60}, \mathsf{*.f64}\left(\left({\ell}^{2}\right), \frac{1}{2520}\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
        16. unpow2N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(\frac{1}{60}, \mathsf{*.f64}\left(\left(\ell \cdot \ell\right), \frac{1}{2520}\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
        17. *-lowering-*.f6480.5%

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(\frac{1}{60}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \frac{1}{2520}\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
      7. Simplified80.5%

        \[\leadsto \color{blue}{\left(\ell \cdot \left(2 + \left(\ell \cdot \ell\right) \cdot \left(0.3333333333333333 + \ell \cdot \left(\ell \cdot \left(0.016666666666666666 + \left(\ell \cdot \ell\right) \cdot 0.0003968253968253968\right)\right)\right)\right)\right)} \cdot \left(J \cdot \cos \left(\frac{K}{2}\right)\right) + U \]
      8. Taylor expanded in U around inf

        \[\leadsto \color{blue}{U \cdot \left(1 + \frac{J \cdot \left(\ell \cdot \left(\cos \left(\frac{1}{2} \cdot K\right) \cdot \left(2 + {\ell}^{2} \cdot \left(\frac{1}{3} + {\ell}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right)}{U}\right)} \]
      9. Step-by-step derivation
        1. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(U, \color{blue}{\left(1 + \frac{J \cdot \left(\ell \cdot \left(\cos \left(\frac{1}{2} \cdot K\right) \cdot \left(2 + {\ell}^{2} \cdot \left(\frac{1}{3} + {\ell}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right)}{U}\right)}\right) \]
        2. +-lowering-+.f64N/A

          \[\leadsto \mathsf{*.f64}\left(U, \mathsf{+.f64}\left(1, \color{blue}{\left(\frac{J \cdot \left(\ell \cdot \left(\cos \left(\frac{1}{2} \cdot K\right) \cdot \left(2 + {\ell}^{2} \cdot \left(\frac{1}{3} + {\ell}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right)}{U}\right)}\right)\right) \]
        3. /-lowering-/.f64N/A

          \[\leadsto \mathsf{*.f64}\left(U, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\left(J \cdot \left(\ell \cdot \left(\cos \left(\frac{1}{2} \cdot K\right) \cdot \left(2 + {\ell}^{2} \cdot \left(\frac{1}{3} + {\ell}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right)\right), \color{blue}{U}\right)\right)\right) \]
      10. Simplified86.7%

        \[\leadsto \color{blue}{U \cdot \left(1 + \frac{\left(\cos \left(0.5 \cdot K\right) \cdot \ell\right) \cdot \left(\left(2 + \ell \cdot \left(\ell \cdot \left(0.3333333333333333 + \ell \cdot \left(\ell \cdot \left(0.016666666666666666 + \left(\ell \cdot \ell\right) \cdot 0.0003968253968253968\right)\right)\right)\right)\right) \cdot J\right)}{U}\right)} \]
      11. Taylor expanded in K around 0

        \[\leadsto \color{blue}{U \cdot \left(1 + \frac{J \cdot \left(\ell \cdot \left(2 + {\ell}^{2} \cdot \left(\frac{1}{3} + {\ell}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)}{U}\right)} \]
      12. Step-by-step derivation
        1. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(U, \color{blue}{\left(1 + \frac{J \cdot \left(\ell \cdot \left(2 + {\ell}^{2} \cdot \left(\frac{1}{3} + {\ell}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)}{U}\right)}\right) \]
        2. +-lowering-+.f64N/A

          \[\leadsto \mathsf{*.f64}\left(U, \mathsf{+.f64}\left(1, \color{blue}{\left(\frac{J \cdot \left(\ell \cdot \left(2 + {\ell}^{2} \cdot \left(\frac{1}{3} + {\ell}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)}{U}\right)}\right)\right) \]
        3. /-lowering-/.f64N/A

          \[\leadsto \mathsf{*.f64}\left(U, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\left(J \cdot \left(\ell \cdot \left(2 + {\ell}^{2} \cdot \left(\frac{1}{3} + {\ell}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right), \color{blue}{U}\right)\right)\right) \]
      13. Simplified69.3%

        \[\leadsto \color{blue}{U \cdot \left(1 + \frac{\ell \cdot \left(J \cdot \left(2 + \ell \cdot \left(\ell \cdot \left(0.3333333333333333 + \ell \cdot \left(\ell \cdot \left(0.016666666666666666 + \left(\ell \cdot \ell\right) \cdot 0.0003968253968253968\right)\right)\right)\right)\right)\right)}{U}\right)} \]

      if -0.14000000000000001 < l < 950

      1. Initial program 77.9%

        \[\left(J \cdot \left(e^{\ell} - e^{-\ell}\right)\right) \cdot \cos \left(\frac{K}{2}\right) + U \]
      2. Step-by-step derivation
        1. +-lowering-+.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\left(\left(J \cdot \left(e^{\ell} - e^{\mathsf{neg}\left(\ell\right)}\right)\right) \cdot \cos \left(\frac{K}{2}\right)\right), \color{blue}{U}\right) \]
        2. associate-*l*N/A

          \[\leadsto \mathsf{+.f64}\left(\left(J \cdot \left(\left(e^{\ell} - e^{\mathsf{neg}\left(\ell\right)}\right) \cdot \cos \left(\frac{K}{2}\right)\right)\right), U\right) \]
        3. *-commutativeN/A

          \[\leadsto \mathsf{+.f64}\left(\left(\left(\left(e^{\ell} - e^{\mathsf{neg}\left(\ell\right)}\right) \cdot \cos \left(\frac{K}{2}\right)\right) \cdot J\right), U\right) \]
        4. associate-*l*N/A

          \[\leadsto \mathsf{+.f64}\left(\left(\left(e^{\ell} - e^{\mathsf{neg}\left(\ell\right)}\right) \cdot \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
        5. *-lowering-*.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(e^{\ell} - e^{\mathsf{neg}\left(\ell\right)}\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
        6. sub-negN/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(e^{\ell} + \left(\mathsf{neg}\left(e^{\mathsf{neg}\left(\ell\right)}\right)\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
        7. +-lowering-+.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\left(e^{\ell}\right), \left(\mathsf{neg}\left(e^{\mathsf{neg}\left(\ell\right)}\right)\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
        8. exp-lowering-exp.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \left(\mathsf{neg}\left(e^{\mathsf{neg}\left(\ell\right)}\right)\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
        9. exp-negN/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \left(\mathsf{neg}\left(\frac{1}{e^{\ell}}\right)\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
        10. distribute-neg-fracN/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \left(\frac{\mathsf{neg}\left(1\right)}{e^{\ell}}\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
        11. metadata-evalN/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \left(\frac{-1}{e^{\ell}}\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
        12. /-lowering-/.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \mathsf{/.f64}\left(-1, \left(e^{\ell}\right)\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
        13. exp-lowering-exp.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \mathsf{/.f64}\left(-1, \mathsf{exp.f64}\left(\ell\right)\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
        14. *-commutativeN/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \mathsf{/.f64}\left(-1, \mathsf{exp.f64}\left(\ell\right)\right)\right), \left(J \cdot \cos \left(\frac{K}{2}\right)\right)\right), U\right) \]
        15. *-lowering-*.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \mathsf{/.f64}\left(-1, \mathsf{exp.f64}\left(\ell\right)\right)\right), \mathsf{*.f64}\left(J, \cos \left(\frac{K}{2}\right)\right)\right), U\right) \]
        16. cos-lowering-cos.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \mathsf{/.f64}\left(-1, \mathsf{exp.f64}\left(\ell\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\left(\frac{K}{2}\right)\right)\right)\right), U\right) \]
        17. /-lowering-/.f6477.9%

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \mathsf{/.f64}\left(-1, \mathsf{exp.f64}\left(\ell\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
      3. Simplified77.9%

        \[\leadsto \color{blue}{\left(e^{\ell} + \frac{-1}{e^{\ell}}\right) \cdot \left(J \cdot \cos \left(\frac{K}{2}\right)\right) + U} \]
      4. Add Preprocessing
      5. Taylor expanded in l around 0

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\color{blue}{\left(2 \cdot \ell\right)}, \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
      6. Step-by-step derivation
        1. *-commutativeN/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(\ell \cdot 2\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
        2. *-lowering-*.f6499.9%

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, 2\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
      7. Simplified99.9%

        \[\leadsto \color{blue}{\left(\ell \cdot 2\right)} \cdot \left(J \cdot \cos \left(\frac{K}{2}\right)\right) + U \]

      if 950 < l < 3.59999999999999995e149

      1. Initial program 100.0%

        \[\left(J \cdot \left(e^{\ell} - e^{-\ell}\right)\right) \cdot \cos \left(\frac{K}{2}\right) + U \]
      2. Step-by-step derivation
        1. +-lowering-+.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\left(\left(J \cdot \left(e^{\ell} - e^{\mathsf{neg}\left(\ell\right)}\right)\right) \cdot \cos \left(\frac{K}{2}\right)\right), \color{blue}{U}\right) \]
        2. associate-*l*N/A

          \[\leadsto \mathsf{+.f64}\left(\left(J \cdot \left(\left(e^{\ell} - e^{\mathsf{neg}\left(\ell\right)}\right) \cdot \cos \left(\frac{K}{2}\right)\right)\right), U\right) \]
        3. *-commutativeN/A

          \[\leadsto \mathsf{+.f64}\left(\left(\left(\left(e^{\ell} - e^{\mathsf{neg}\left(\ell\right)}\right) \cdot \cos \left(\frac{K}{2}\right)\right) \cdot J\right), U\right) \]
        4. associate-*l*N/A

          \[\leadsto \mathsf{+.f64}\left(\left(\left(e^{\ell} - e^{\mathsf{neg}\left(\ell\right)}\right) \cdot \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
        5. *-lowering-*.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(e^{\ell} - e^{\mathsf{neg}\left(\ell\right)}\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
        6. sub-negN/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(e^{\ell} + \left(\mathsf{neg}\left(e^{\mathsf{neg}\left(\ell\right)}\right)\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
        7. +-lowering-+.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\left(e^{\ell}\right), \left(\mathsf{neg}\left(e^{\mathsf{neg}\left(\ell\right)}\right)\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
        8. exp-lowering-exp.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \left(\mathsf{neg}\left(e^{\mathsf{neg}\left(\ell\right)}\right)\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
        9. exp-negN/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \left(\mathsf{neg}\left(\frac{1}{e^{\ell}}\right)\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
        10. distribute-neg-fracN/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \left(\frac{\mathsf{neg}\left(1\right)}{e^{\ell}}\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
        11. metadata-evalN/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \left(\frac{-1}{e^{\ell}}\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
        12. /-lowering-/.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \mathsf{/.f64}\left(-1, \left(e^{\ell}\right)\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
        13. exp-lowering-exp.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \mathsf{/.f64}\left(-1, \mathsf{exp.f64}\left(\ell\right)\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
        14. *-commutativeN/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \mathsf{/.f64}\left(-1, \mathsf{exp.f64}\left(\ell\right)\right)\right), \left(J \cdot \cos \left(\frac{K}{2}\right)\right)\right), U\right) \]
        15. *-lowering-*.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \mathsf{/.f64}\left(-1, \mathsf{exp.f64}\left(\ell\right)\right)\right), \mathsf{*.f64}\left(J, \cos \left(\frac{K}{2}\right)\right)\right), U\right) \]
        16. cos-lowering-cos.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \mathsf{/.f64}\left(-1, \mathsf{exp.f64}\left(\ell\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\left(\frac{K}{2}\right)\right)\right)\right), U\right) \]
        17. /-lowering-/.f64100.0%

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \mathsf{/.f64}\left(-1, \mathsf{exp.f64}\left(\ell\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
      3. Simplified100.0%

        \[\leadsto \color{blue}{\left(e^{\ell} + \frac{-1}{e^{\ell}}\right) \cdot \left(J \cdot \cos \left(\frac{K}{2}\right)\right) + U} \]
      4. Add Preprocessing
      5. Taylor expanded in l around 0

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\color{blue}{\left(\ell \cdot \left(2 + {\ell}^{2} \cdot \left(\frac{1}{3} + \frac{1}{60} \cdot {\ell}^{2}\right)\right)\right)}, \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
      6. Step-by-step derivation
        1. *-lowering-*.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \left(2 + {\ell}^{2} \cdot \left(\frac{1}{3} + \frac{1}{60} \cdot {\ell}^{2}\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
        2. +-lowering-+.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \left({\ell}^{2} \cdot \left(\frac{1}{3} + \frac{1}{60} \cdot {\ell}^{2}\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
        3. *-lowering-*.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\left({\ell}^{2}\right), \left(\frac{1}{3} + \frac{1}{60} \cdot {\ell}^{2}\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
        4. unpow2N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\left(\ell \cdot \ell\right), \left(\frac{1}{3} + \frac{1}{60} \cdot {\ell}^{2}\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
        5. *-lowering-*.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \left(\frac{1}{3} + \frac{1}{60} \cdot {\ell}^{2}\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
        6. +-lowering-+.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \left(\frac{1}{60} \cdot {\ell}^{2}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
        7. *-commutativeN/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \left({\ell}^{2} \cdot \frac{1}{60}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
        8. *-lowering-*.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\left({\ell}^{2}\right), \frac{1}{60}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
        9. unpow2N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\left(\ell \cdot \ell\right), \frac{1}{60}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
        10. *-lowering-*.f6474.8%

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \frac{1}{60}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
      7. Simplified74.8%

        \[\leadsto \color{blue}{\left(\ell \cdot \left(2 + \left(\ell \cdot \ell\right) \cdot \left(0.3333333333333333 + \left(\ell \cdot \ell\right) \cdot 0.016666666666666666\right)\right)\right)} \cdot \left(J \cdot \cos \left(\frac{K}{2}\right)\right) + U \]
      8. Taylor expanded in K around 0

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \frac{1}{60}\right)\right)\right)\right)\right), \color{blue}{\left(J + \frac{-1}{8} \cdot \left(J \cdot {K}^{2}\right)\right)}\right), U\right) \]
      9. Step-by-step derivation
        1. associate-*r*N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \frac{1}{60}\right)\right)\right)\right)\right), \left(J + \left(\frac{-1}{8} \cdot J\right) \cdot {K}^{2}\right)\right), U\right) \]
        2. +-lowering-+.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \frac{1}{60}\right)\right)\right)\right)\right), \mathsf{+.f64}\left(J, \left(\left(\frac{-1}{8} \cdot J\right) \cdot {K}^{2}\right)\right)\right), U\right) \]
        3. *-commutativeN/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \frac{1}{60}\right)\right)\right)\right)\right), \mathsf{+.f64}\left(J, \left(\left(J \cdot \frac{-1}{8}\right) \cdot {K}^{2}\right)\right)\right), U\right) \]
        4. associate-*l*N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \frac{1}{60}\right)\right)\right)\right)\right), \mathsf{+.f64}\left(J, \left(J \cdot \left(\frac{-1}{8} \cdot {K}^{2}\right)\right)\right)\right), U\right) \]
        5. *-lowering-*.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \frac{1}{60}\right)\right)\right)\right)\right), \mathsf{+.f64}\left(J, \mathsf{*.f64}\left(J, \left(\frac{-1}{8} \cdot {K}^{2}\right)\right)\right)\right), U\right) \]
        6. *-lowering-*.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \frac{1}{60}\right)\right)\right)\right)\right), \mathsf{+.f64}\left(J, \mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\frac{-1}{8}, \left({K}^{2}\right)\right)\right)\right)\right), U\right) \]
        7. unpow2N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \frac{1}{60}\right)\right)\right)\right)\right), \mathsf{+.f64}\left(J, \mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\frac{-1}{8}, \left(K \cdot K\right)\right)\right)\right)\right), U\right) \]
        8. *-lowering-*.f6467.4%

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \frac{1}{60}\right)\right)\right)\right)\right), \mathsf{+.f64}\left(J, \mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{*.f64}\left(K, K\right)\right)\right)\right)\right), U\right) \]
      10. Simplified67.4%

        \[\leadsto \left(\ell \cdot \left(2 + \left(\ell \cdot \ell\right) \cdot \left(0.3333333333333333 + \left(\ell \cdot \ell\right) \cdot 0.016666666666666666\right)\right)\right) \cdot \color{blue}{\left(J + J \cdot \left(-0.125 \cdot \left(K \cdot K\right)\right)\right)} + U \]
      11. Taylor expanded in J around inf

        \[\leadsto \color{blue}{J \cdot \left(\ell \cdot \left(\left(1 + \frac{-1}{8} \cdot {K}^{2}\right) \cdot \left(2 + {\ell}^{2} \cdot \left(\frac{1}{3} + \frac{1}{60} \cdot {\ell}^{2}\right)\right)\right)\right)} \]
      12. Step-by-step derivation
        1. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(J, \color{blue}{\left(\ell \cdot \left(\left(1 + \frac{-1}{8} \cdot {K}^{2}\right) \cdot \left(2 + {\ell}^{2} \cdot \left(\frac{1}{3} + \frac{1}{60} \cdot {\ell}^{2}\right)\right)\right)\right)}\right) \]
        2. associate-*r*N/A

          \[\leadsto \mathsf{*.f64}\left(J, \left(\left(\ell \cdot \left(1 + \frac{-1}{8} \cdot {K}^{2}\right)\right) \cdot \color{blue}{\left(2 + {\ell}^{2} \cdot \left(\frac{1}{3} + \frac{1}{60} \cdot {\ell}^{2}\right)\right)}\right)\right) \]
        3. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\left(\ell \cdot \left(1 + \frac{-1}{8} \cdot {K}^{2}\right)\right), \color{blue}{\left(2 + {\ell}^{2} \cdot \left(\frac{1}{3} + \frac{1}{60} \cdot {\ell}^{2}\right)\right)}\right)\right) \]
        4. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \left(1 + \frac{-1}{8} \cdot {K}^{2}\right)\right), \left(\color{blue}{2} + {\ell}^{2} \cdot \left(\frac{1}{3} + \frac{1}{60} \cdot {\ell}^{2}\right)\right)\right)\right) \]
        5. +-lowering-+.f64N/A

          \[\leadsto \mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(1, \left(\frac{-1}{8} \cdot {K}^{2}\right)\right)\right), \left(2 + {\ell}^{2} \cdot \left(\frac{1}{3} + \frac{1}{60} \cdot {\ell}^{2}\right)\right)\right)\right) \]
        6. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{8}, \left({K}^{2}\right)\right)\right)\right), \left(2 + {\ell}^{2} \cdot \left(\frac{1}{3} + \frac{1}{60} \cdot {\ell}^{2}\right)\right)\right)\right) \]
        7. unpow2N/A

          \[\leadsto \mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{8}, \left(K \cdot K\right)\right)\right)\right), \left(2 + {\ell}^{2} \cdot \left(\frac{1}{3} + \frac{1}{60} \cdot {\ell}^{2}\right)\right)\right)\right) \]
        8. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{*.f64}\left(K, K\right)\right)\right)\right), \left(2 + {\ell}^{2} \cdot \left(\frac{1}{3} + \frac{1}{60} \cdot {\ell}^{2}\right)\right)\right)\right) \]
        9. +-lowering-+.f64N/A

          \[\leadsto \mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{*.f64}\left(K, K\right)\right)\right)\right), \mathsf{+.f64}\left(2, \color{blue}{\left({\ell}^{2} \cdot \left(\frac{1}{3} + \frac{1}{60} \cdot {\ell}^{2}\right)\right)}\right)\right)\right) \]
        10. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{*.f64}\left(K, K\right)\right)\right)\right), \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\left({\ell}^{2}\right), \color{blue}{\left(\frac{1}{3} + \frac{1}{60} \cdot {\ell}^{2}\right)}\right)\right)\right)\right) \]
        11. unpow2N/A

          \[\leadsto \mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{*.f64}\left(K, K\right)\right)\right)\right), \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\left(\ell \cdot \ell\right), \left(\color{blue}{\frac{1}{3}} + \frac{1}{60} \cdot {\ell}^{2}\right)\right)\right)\right)\right) \]
        12. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{*.f64}\left(K, K\right)\right)\right)\right), \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \left(\color{blue}{\frac{1}{3}} + \frac{1}{60} \cdot {\ell}^{2}\right)\right)\right)\right)\right) \]
        13. +-lowering-+.f64N/A

          \[\leadsto \mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{*.f64}\left(K, K\right)\right)\right)\right), \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \color{blue}{\left(\frac{1}{60} \cdot {\ell}^{2}\right)}\right)\right)\right)\right)\right) \]
        14. *-commutativeN/A

          \[\leadsto \mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{*.f64}\left(K, K\right)\right)\right)\right), \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \left({\ell}^{2} \cdot \color{blue}{\frac{1}{60}}\right)\right)\right)\right)\right)\right) \]
        15. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{*.f64}\left(K, K\right)\right)\right)\right), \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\left({\ell}^{2}\right), \color{blue}{\frac{1}{60}}\right)\right)\right)\right)\right)\right) \]
        16. unpow2N/A

          \[\leadsto \mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{*.f64}\left(K, K\right)\right)\right)\right), \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\left(\ell \cdot \ell\right), \frac{1}{60}\right)\right)\right)\right)\right)\right) \]
        17. *-lowering-*.f6467.4%

          \[\leadsto \mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{*.f64}\left(K, K\right)\right)\right)\right), \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \frac{1}{60}\right)\right)\right)\right)\right)\right) \]
      13. Simplified67.4%

        \[\leadsto \color{blue}{J \cdot \left(\left(\ell \cdot \left(1 + -0.125 \cdot \left(K \cdot K\right)\right)\right) \cdot \left(2 + \left(\ell \cdot \ell\right) \cdot \left(0.3333333333333333 + \left(\ell \cdot \ell\right) \cdot 0.016666666666666666\right)\right)\right)} \]
    3. Recombined 4 regimes into one program.
    4. Final simplification92.7%

      \[\leadsto \begin{array}{l} \mathbf{if}\;\ell \leq -2.3 \cdot 10^{+131}:\\ \;\;\;\;\left(\cos \left(K \cdot 0.5\right) \cdot \left(J \cdot \left(\ell \cdot \ell\right)\right)\right) \cdot \left(\ell \cdot 0.3333333333333333\right)\\ \mathbf{elif}\;\ell \leq -0.14:\\ \;\;\;\;U \cdot \left(1 + \frac{\ell \cdot \left(J \cdot \left(2 + \ell \cdot \left(\ell \cdot \left(0.3333333333333333 + \ell \cdot \left(\ell \cdot \left(0.016666666666666666 + \left(\ell \cdot \ell\right) \cdot 0.0003968253968253968\right)\right)\right)\right)\right)\right)}{U}\right)\\ \mathbf{elif}\;\ell \leq 950:\\ \;\;\;\;U + \left(J \cdot \cos \left(\frac{K}{2}\right)\right) \cdot \left(2 \cdot \ell\right)\\ \mathbf{elif}\;\ell \leq 3.6 \cdot 10^{+149}:\\ \;\;\;\;J \cdot \left(\left(2 + \left(\ell \cdot \ell\right) \cdot \left(0.3333333333333333 + \left(\ell \cdot \ell\right) \cdot 0.016666666666666666\right)\right) \cdot \left(\ell \cdot \left(1 + -0.125 \cdot \left(K \cdot K\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\cos \left(K \cdot 0.5\right) \cdot \left(J \cdot \left(\ell \cdot \ell\right)\right)\right) \cdot \left(\ell \cdot 0.3333333333333333\right)\\ \end{array} \]
    5. Add Preprocessing

    Alternative 10: 93.9% accurate, 2.4× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;\ell \leq -950:\\ \;\;\;\;\left(\ell \cdot \cos \left(K \cdot 0.5\right)\right) \cdot \left(J \cdot \left(2 + \ell \cdot \left(\ell \cdot \left(0.3333333333333333 + \ell \cdot \left(\ell \cdot \left(0.016666666666666666 + \left(\ell \cdot \ell\right) \cdot 0.0003968253968253968\right)\right)\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;U + \left(J \cdot \cos \left(\frac{K}{2}\right)\right) \cdot \left(\ell \cdot \left(2 + \left(\ell \cdot \ell\right) \cdot \left(0.3333333333333333 + \left(\ell \cdot \ell\right) \cdot 0.016666666666666666\right)\right)\right)\\ \end{array} \end{array} \]
    (FPCore (J l K U)
     :precision binary64
     (if (<= l -950.0)
       (*
        (* l (cos (* K 0.5)))
        (*
         J
         (+
          2.0
          (*
           l
           (*
            l
            (+
             0.3333333333333333
             (*
              l
              (*
               l
               (+ 0.016666666666666666 (* (* l l) 0.0003968253968253968))))))))))
       (+
        U
        (*
         (* J (cos (/ K 2.0)))
         (*
          l
          (+
           2.0
           (*
            (* l l)
            (+ 0.3333333333333333 (* (* l l) 0.016666666666666666)))))))))
    double code(double J, double l, double K, double U) {
    	double tmp;
    	if (l <= -950.0) {
    		tmp = (l * cos((K * 0.5))) * (J * (2.0 + (l * (l * (0.3333333333333333 + (l * (l * (0.016666666666666666 + ((l * l) * 0.0003968253968253968)))))))));
    	} else {
    		tmp = U + ((J * cos((K / 2.0))) * (l * (2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * 0.016666666666666666))))));
    	}
    	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 <= (-950.0d0)) then
            tmp = (l * cos((k * 0.5d0))) * (j * (2.0d0 + (l * (l * (0.3333333333333333d0 + (l * (l * (0.016666666666666666d0 + ((l * l) * 0.0003968253968253968d0)))))))))
        else
            tmp = u + ((j * cos((k / 2.0d0))) * (l * (2.0d0 + ((l * l) * (0.3333333333333333d0 + ((l * l) * 0.016666666666666666d0))))))
        end if
        code = tmp
    end function
    
    public static double code(double J, double l, double K, double U) {
    	double tmp;
    	if (l <= -950.0) {
    		tmp = (l * Math.cos((K * 0.5))) * (J * (2.0 + (l * (l * (0.3333333333333333 + (l * (l * (0.016666666666666666 + ((l * l) * 0.0003968253968253968)))))))));
    	} else {
    		tmp = U + ((J * Math.cos((K / 2.0))) * (l * (2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * 0.016666666666666666))))));
    	}
    	return tmp;
    }
    
    def code(J, l, K, U):
    	tmp = 0
    	if l <= -950.0:
    		tmp = (l * math.cos((K * 0.5))) * (J * (2.0 + (l * (l * (0.3333333333333333 + (l * (l * (0.016666666666666666 + ((l * l) * 0.0003968253968253968)))))))))
    	else:
    		tmp = U + ((J * math.cos((K / 2.0))) * (l * (2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * 0.016666666666666666))))))
    	return tmp
    
    function code(J, l, K, U)
    	tmp = 0.0
    	if (l <= -950.0)
    		tmp = Float64(Float64(l * cos(Float64(K * 0.5))) * Float64(J * Float64(2.0 + Float64(l * Float64(l * Float64(0.3333333333333333 + Float64(l * Float64(l * Float64(0.016666666666666666 + Float64(Float64(l * l) * 0.0003968253968253968))))))))));
    	else
    		tmp = Float64(U + Float64(Float64(J * cos(Float64(K / 2.0))) * Float64(l * Float64(2.0 + Float64(Float64(l * l) * Float64(0.3333333333333333 + Float64(Float64(l * l) * 0.016666666666666666)))))));
    	end
    	return tmp
    end
    
    function tmp_2 = code(J, l, K, U)
    	tmp = 0.0;
    	if (l <= -950.0)
    		tmp = (l * cos((K * 0.5))) * (J * (2.0 + (l * (l * (0.3333333333333333 + (l * (l * (0.016666666666666666 + ((l * l) * 0.0003968253968253968)))))))));
    	else
    		tmp = U + ((J * cos((K / 2.0))) * (l * (2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * 0.016666666666666666))))));
    	end
    	tmp_2 = tmp;
    end
    
    code[J_, l_, K_, U_] := If[LessEqual[l, -950.0], N[(N[(l * N[Cos[N[(K * 0.5), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(J * N[(2.0 + N[(l * N[(l * N[(0.3333333333333333 + N[(l * N[(l * N[(0.016666666666666666 + N[(N[(l * l), $MachinePrecision] * 0.0003968253968253968), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(U + N[(N[(J * N[Cos[N[(K / 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(l * N[(2.0 + N[(N[(l * l), $MachinePrecision] * N[(0.3333333333333333 + N[(N[(l * l), $MachinePrecision] * 0.016666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    \mathbf{if}\;\ell \leq -950:\\
    \;\;\;\;\left(\ell \cdot \cos \left(K \cdot 0.5\right)\right) \cdot \left(J \cdot \left(2 + \ell \cdot \left(\ell \cdot \left(0.3333333333333333 + \ell \cdot \left(\ell \cdot \left(0.016666666666666666 + \left(\ell \cdot \ell\right) \cdot 0.0003968253968253968\right)\right)\right)\right)\right)\right)\\
    
    \mathbf{else}:\\
    \;\;\;\;U + \left(J \cdot \cos \left(\frac{K}{2}\right)\right) \cdot \left(\ell \cdot \left(2 + \left(\ell \cdot \ell\right) \cdot \left(0.3333333333333333 + \left(\ell \cdot \ell\right) \cdot 0.016666666666666666\right)\right)\right)\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if l < -950

      1. Initial program 100.0%

        \[\left(J \cdot \left(e^{\ell} - e^{-\ell}\right)\right) \cdot \cos \left(\frac{K}{2}\right) + U \]
      2. Step-by-step derivation
        1. +-lowering-+.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\left(\left(J \cdot \left(e^{\ell} - e^{\mathsf{neg}\left(\ell\right)}\right)\right) \cdot \cos \left(\frac{K}{2}\right)\right), \color{blue}{U}\right) \]
        2. associate-*l*N/A

          \[\leadsto \mathsf{+.f64}\left(\left(J \cdot \left(\left(e^{\ell} - e^{\mathsf{neg}\left(\ell\right)}\right) \cdot \cos \left(\frac{K}{2}\right)\right)\right), U\right) \]
        3. *-commutativeN/A

          \[\leadsto \mathsf{+.f64}\left(\left(\left(\left(e^{\ell} - e^{\mathsf{neg}\left(\ell\right)}\right) \cdot \cos \left(\frac{K}{2}\right)\right) \cdot J\right), U\right) \]
        4. associate-*l*N/A

          \[\leadsto \mathsf{+.f64}\left(\left(\left(e^{\ell} - e^{\mathsf{neg}\left(\ell\right)}\right) \cdot \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
        5. *-lowering-*.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(e^{\ell} - e^{\mathsf{neg}\left(\ell\right)}\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
        6. sub-negN/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(e^{\ell} + \left(\mathsf{neg}\left(e^{\mathsf{neg}\left(\ell\right)}\right)\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
        7. +-lowering-+.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\left(e^{\ell}\right), \left(\mathsf{neg}\left(e^{\mathsf{neg}\left(\ell\right)}\right)\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
        8. exp-lowering-exp.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \left(\mathsf{neg}\left(e^{\mathsf{neg}\left(\ell\right)}\right)\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
        9. exp-negN/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \left(\mathsf{neg}\left(\frac{1}{e^{\ell}}\right)\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
        10. distribute-neg-fracN/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \left(\frac{\mathsf{neg}\left(1\right)}{e^{\ell}}\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
        11. metadata-evalN/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \left(\frac{-1}{e^{\ell}}\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
        12. /-lowering-/.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \mathsf{/.f64}\left(-1, \left(e^{\ell}\right)\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
        13. exp-lowering-exp.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \mathsf{/.f64}\left(-1, \mathsf{exp.f64}\left(\ell\right)\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
        14. *-commutativeN/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \mathsf{/.f64}\left(-1, \mathsf{exp.f64}\left(\ell\right)\right)\right), \left(J \cdot \cos \left(\frac{K}{2}\right)\right)\right), U\right) \]
        15. *-lowering-*.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \mathsf{/.f64}\left(-1, \mathsf{exp.f64}\left(\ell\right)\right)\right), \mathsf{*.f64}\left(J, \cos \left(\frac{K}{2}\right)\right)\right), U\right) \]
        16. cos-lowering-cos.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \mathsf{/.f64}\left(-1, \mathsf{exp.f64}\left(\ell\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\left(\frac{K}{2}\right)\right)\right)\right), U\right) \]
        17. /-lowering-/.f64100.0%

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \mathsf{/.f64}\left(-1, \mathsf{exp.f64}\left(\ell\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
      3. Simplified100.0%

        \[\leadsto \color{blue}{\left(e^{\ell} + \frac{-1}{e^{\ell}}\right) \cdot \left(J \cdot \cos \left(\frac{K}{2}\right)\right) + U} \]
      4. Add Preprocessing
      5. Taylor expanded in l around 0

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\color{blue}{\left(\ell \cdot \left(2 + {\ell}^{2} \cdot \left(\frac{1}{3} + {\ell}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)}, \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
      6. Step-by-step derivation
        1. *-lowering-*.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \left(2 + {\ell}^{2} \cdot \left(\frac{1}{3} + {\ell}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
        2. +-lowering-+.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \left({\ell}^{2} \cdot \left(\frac{1}{3} + {\ell}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
        3. *-lowering-*.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\left({\ell}^{2}\right), \left(\frac{1}{3} + {\ell}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
        4. unpow2N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\left(\ell \cdot \ell\right), \left(\frac{1}{3} + {\ell}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
        5. *-lowering-*.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \left(\frac{1}{3} + {\ell}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
        6. +-lowering-+.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \left({\ell}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
        7. unpow2N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \left(\left(\ell \cdot \ell\right) \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
        8. associate-*l*N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \left(\ell \cdot \left(\ell \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
        9. *-commutativeN/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \left(\ell \cdot \left(\left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right) \cdot \ell\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
        10. *-lowering-*.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\ell, \left(\left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right) \cdot \ell\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
        11. *-commutativeN/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\ell, \left(\ell \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
        12. *-lowering-*.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
        13. +-lowering-+.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(\frac{1}{60}, \left(\frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
        14. *-commutativeN/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(\frac{1}{60}, \left({\ell}^{2} \cdot \frac{1}{2520}\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
        15. *-lowering-*.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(\frac{1}{60}, \mathsf{*.f64}\left(\left({\ell}^{2}\right), \frac{1}{2520}\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
        16. unpow2N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(\frac{1}{60}, \mathsf{*.f64}\left(\left(\ell \cdot \ell\right), \frac{1}{2520}\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
        17. *-lowering-*.f6491.4%

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(\frac{1}{60}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \frac{1}{2520}\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
      7. Simplified91.4%

        \[\leadsto \color{blue}{\left(\ell \cdot \left(2 + \left(\ell \cdot \ell\right) \cdot \left(0.3333333333333333 + \ell \cdot \left(\ell \cdot \left(0.016666666666666666 + \left(\ell \cdot \ell\right) \cdot 0.0003968253968253968\right)\right)\right)\right)\right)} \cdot \left(J \cdot \cos \left(\frac{K}{2}\right)\right) + U \]
      8. Taylor expanded in J around inf

        \[\leadsto \color{blue}{J \cdot \left(\ell \cdot \left(\cos \left(\frac{1}{2} \cdot K\right) \cdot \left(2 + {\ell}^{2} \cdot \left(\frac{1}{3} + {\ell}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right)} \]
      9. Step-by-step derivation
        1. *-commutativeN/A

          \[\leadsto \left(\ell \cdot \left(\cos \left(\frac{1}{2} \cdot K\right) \cdot \left(2 + {\ell}^{2} \cdot \left(\frac{1}{3} + {\ell}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right) \cdot \color{blue}{J} \]
        2. associate-*r*N/A

          \[\leadsto \left(\left(\ell \cdot \cos \left(\frac{1}{2} \cdot K\right)\right) \cdot \left(2 + {\ell}^{2} \cdot \left(\frac{1}{3} + {\ell}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right) \cdot J \]
        3. associate-*l*N/A

          \[\leadsto \left(\ell \cdot \cos \left(\frac{1}{2} \cdot K\right)\right) \cdot \color{blue}{\left(\left(2 + {\ell}^{2} \cdot \left(\frac{1}{3} + {\ell}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right) \cdot J\right)} \]
        4. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\left(\ell \cdot \cos \left(\frac{1}{2} \cdot K\right)\right), \color{blue}{\left(\left(2 + {\ell}^{2} \cdot \left(\frac{1}{3} + {\ell}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right) \cdot J\right)}\right) \]
        5. *-commutativeN/A

          \[\leadsto \mathsf{*.f64}\left(\left(\cos \left(\frac{1}{2} \cdot K\right) \cdot \ell\right), \left(\color{blue}{\left(2 + {\ell}^{2} \cdot \left(\frac{1}{3} + {\ell}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)} \cdot J\right)\right) \]
        6. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\cos \left(\frac{1}{2} \cdot K\right), \ell\right), \left(\color{blue}{\left(2 + {\ell}^{2} \cdot \left(\frac{1}{3} + {\ell}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)} \cdot J\right)\right) \]
        7. cos-lowering-cos.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{cos.f64}\left(\left(\frac{1}{2} \cdot K\right)\right), \ell\right), \left(\left(\color{blue}{2} + {\ell}^{2} \cdot \left(\frac{1}{3} + {\ell}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right) \cdot J\right)\right) \]
        8. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, K\right)\right), \ell\right), \left(\left(2 + {\ell}^{2} \cdot \left(\frac{1}{3} + {\ell}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right) \cdot J\right)\right) \]
        9. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, K\right)\right), \ell\right), \mathsf{*.f64}\left(\left(2 + {\ell}^{2} \cdot \left(\frac{1}{3} + {\ell}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right), \color{blue}{J}\right)\right) \]
      10. Simplified88.5%

        \[\leadsto \color{blue}{\left(\cos \left(0.5 \cdot K\right) \cdot \ell\right) \cdot \left(\left(2 + \ell \cdot \left(\ell \cdot \left(0.3333333333333333 + \ell \cdot \left(\ell \cdot \left(0.016666666666666666 + \left(\ell \cdot \ell\right) \cdot 0.0003968253968253968\right)\right)\right)\right)\right) \cdot J\right)} \]

      if -950 < l

      1. Initial program 85.6%

        \[\left(J \cdot \left(e^{\ell} - e^{-\ell}\right)\right) \cdot \cos \left(\frac{K}{2}\right) + U \]
      2. Step-by-step derivation
        1. +-lowering-+.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\left(\left(J \cdot \left(e^{\ell} - e^{\mathsf{neg}\left(\ell\right)}\right)\right) \cdot \cos \left(\frac{K}{2}\right)\right), \color{blue}{U}\right) \]
        2. associate-*l*N/A

          \[\leadsto \mathsf{+.f64}\left(\left(J \cdot \left(\left(e^{\ell} - e^{\mathsf{neg}\left(\ell\right)}\right) \cdot \cos \left(\frac{K}{2}\right)\right)\right), U\right) \]
        3. *-commutativeN/A

          \[\leadsto \mathsf{+.f64}\left(\left(\left(\left(e^{\ell} - e^{\mathsf{neg}\left(\ell\right)}\right) \cdot \cos \left(\frac{K}{2}\right)\right) \cdot J\right), U\right) \]
        4. associate-*l*N/A

          \[\leadsto \mathsf{+.f64}\left(\left(\left(e^{\ell} - e^{\mathsf{neg}\left(\ell\right)}\right) \cdot \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
        5. *-lowering-*.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(e^{\ell} - e^{\mathsf{neg}\left(\ell\right)}\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
        6. sub-negN/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(e^{\ell} + \left(\mathsf{neg}\left(e^{\mathsf{neg}\left(\ell\right)}\right)\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
        7. +-lowering-+.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\left(e^{\ell}\right), \left(\mathsf{neg}\left(e^{\mathsf{neg}\left(\ell\right)}\right)\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
        8. exp-lowering-exp.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \left(\mathsf{neg}\left(e^{\mathsf{neg}\left(\ell\right)}\right)\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
        9. exp-negN/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \left(\mathsf{neg}\left(\frac{1}{e^{\ell}}\right)\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
        10. distribute-neg-fracN/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \left(\frac{\mathsf{neg}\left(1\right)}{e^{\ell}}\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
        11. metadata-evalN/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \left(\frac{-1}{e^{\ell}}\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
        12. /-lowering-/.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \mathsf{/.f64}\left(-1, \left(e^{\ell}\right)\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
        13. exp-lowering-exp.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \mathsf{/.f64}\left(-1, \mathsf{exp.f64}\left(\ell\right)\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
        14. *-commutativeN/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \mathsf{/.f64}\left(-1, \mathsf{exp.f64}\left(\ell\right)\right)\right), \left(J \cdot \cos \left(\frac{K}{2}\right)\right)\right), U\right) \]
        15. *-lowering-*.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \mathsf{/.f64}\left(-1, \mathsf{exp.f64}\left(\ell\right)\right)\right), \mathsf{*.f64}\left(J, \cos \left(\frac{K}{2}\right)\right)\right), U\right) \]
        16. cos-lowering-cos.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \mathsf{/.f64}\left(-1, \mathsf{exp.f64}\left(\ell\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\left(\frac{K}{2}\right)\right)\right)\right), U\right) \]
        17. /-lowering-/.f6485.6%

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \mathsf{/.f64}\left(-1, \mathsf{exp.f64}\left(\ell\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
      3. Simplified85.6%

        \[\leadsto \color{blue}{\left(e^{\ell} + \frac{-1}{e^{\ell}}\right) \cdot \left(J \cdot \cos \left(\frac{K}{2}\right)\right) + U} \]
      4. Add Preprocessing
      5. Taylor expanded in l around 0

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\color{blue}{\left(\ell \cdot \left(2 + {\ell}^{2} \cdot \left(\frac{1}{3} + \frac{1}{60} \cdot {\ell}^{2}\right)\right)\right)}, \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
      6. Step-by-step derivation
        1. *-lowering-*.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \left(2 + {\ell}^{2} \cdot \left(\frac{1}{3} + \frac{1}{60} \cdot {\ell}^{2}\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
        2. +-lowering-+.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \left({\ell}^{2} \cdot \left(\frac{1}{3} + \frac{1}{60} \cdot {\ell}^{2}\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
        3. *-lowering-*.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\left({\ell}^{2}\right), \left(\frac{1}{3} + \frac{1}{60} \cdot {\ell}^{2}\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
        4. unpow2N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\left(\ell \cdot \ell\right), \left(\frac{1}{3} + \frac{1}{60} \cdot {\ell}^{2}\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
        5. *-lowering-*.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \left(\frac{1}{3} + \frac{1}{60} \cdot {\ell}^{2}\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
        6. +-lowering-+.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \left(\frac{1}{60} \cdot {\ell}^{2}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
        7. *-commutativeN/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \left({\ell}^{2} \cdot \frac{1}{60}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
        8. *-lowering-*.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\left({\ell}^{2}\right), \frac{1}{60}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
        9. unpow2N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\left(\ell \cdot \ell\right), \frac{1}{60}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
        10. *-lowering-*.f6496.4%

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \frac{1}{60}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
      7. Simplified96.4%

        \[\leadsto \color{blue}{\left(\ell \cdot \left(2 + \left(\ell \cdot \ell\right) \cdot \left(0.3333333333333333 + \left(\ell \cdot \ell\right) \cdot 0.016666666666666666\right)\right)\right)} \cdot \left(J \cdot \cos \left(\frac{K}{2}\right)\right) + U \]
    3. Recombined 2 regimes into one program.
    4. Final simplification94.3%

      \[\leadsto \begin{array}{l} \mathbf{if}\;\ell \leq -950:\\ \;\;\;\;\left(\ell \cdot \cos \left(K \cdot 0.5\right)\right) \cdot \left(J \cdot \left(2 + \ell \cdot \left(\ell \cdot \left(0.3333333333333333 + \ell \cdot \left(\ell \cdot \left(0.016666666666666666 + \left(\ell \cdot \ell\right) \cdot 0.0003968253968253968\right)\right)\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;U + \left(J \cdot \cos \left(\frac{K}{2}\right)\right) \cdot \left(\ell \cdot \left(2 + \left(\ell \cdot \ell\right) \cdot \left(0.3333333333333333 + \left(\ell \cdot \ell\right) \cdot 0.016666666666666666\right)\right)\right)\\ \end{array} \]
    5. Add Preprocessing

    Alternative 11: 95.2% accurate, 2.4× speedup?

    \[\begin{array}{l} \\ U + \left(J \cdot \cos \left(\frac{K}{2}\right)\right) \cdot \left(\ell \cdot \left(2 + \left(\ell \cdot \ell\right) \cdot \left(0.3333333333333333 + \ell \cdot \left(\ell \cdot \left(0.016666666666666666 + \left(\ell \cdot \ell\right) \cdot 0.0003968253968253968\right)\right)\right)\right)\right) \end{array} \]
    (FPCore (J l K U)
     :precision binary64
     (+
      U
      (*
       (* J (cos (/ K 2.0)))
       (*
        l
        (+
         2.0
         (*
          (* l l)
          (+
           0.3333333333333333
           (*
            l
            (*
             l
             (+ 0.016666666666666666 (* (* l l) 0.0003968253968253968)))))))))))
    double code(double J, double l, double K, double U) {
    	return U + ((J * cos((K / 2.0))) * (l * (2.0 + ((l * l) * (0.3333333333333333 + (l * (l * (0.016666666666666666 + ((l * l) * 0.0003968253968253968)))))))));
    }
    
    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 + ((j * cos((k / 2.0d0))) * (l * (2.0d0 + ((l * l) * (0.3333333333333333d0 + (l * (l * (0.016666666666666666d0 + ((l * l) * 0.0003968253968253968d0)))))))))
    end function
    
    public static double code(double J, double l, double K, double U) {
    	return U + ((J * Math.cos((K / 2.0))) * (l * (2.0 + ((l * l) * (0.3333333333333333 + (l * (l * (0.016666666666666666 + ((l * l) * 0.0003968253968253968)))))))));
    }
    
    def code(J, l, K, U):
    	return U + ((J * math.cos((K / 2.0))) * (l * (2.0 + ((l * l) * (0.3333333333333333 + (l * (l * (0.016666666666666666 + ((l * l) * 0.0003968253968253968)))))))))
    
    function code(J, l, K, U)
    	return Float64(U + Float64(Float64(J * cos(Float64(K / 2.0))) * Float64(l * Float64(2.0 + Float64(Float64(l * l) * Float64(0.3333333333333333 + Float64(l * Float64(l * Float64(0.016666666666666666 + Float64(Float64(l * l) * 0.0003968253968253968))))))))))
    end
    
    function tmp = code(J, l, K, U)
    	tmp = U + ((J * cos((K / 2.0))) * (l * (2.0 + ((l * l) * (0.3333333333333333 + (l * (l * (0.016666666666666666 + ((l * l) * 0.0003968253968253968)))))))));
    end
    
    code[J_, l_, K_, U_] := N[(U + N[(N[(J * N[Cos[N[(K / 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(l * N[(2.0 + N[(N[(l * l), $MachinePrecision] * N[(0.3333333333333333 + N[(l * N[(l * N[(0.016666666666666666 + N[(N[(l * l), $MachinePrecision] * 0.0003968253968253968), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
    
    \begin{array}{l}
    
    \\
    U + \left(J \cdot \cos \left(\frac{K}{2}\right)\right) \cdot \left(\ell \cdot \left(2 + \left(\ell \cdot \ell\right) \cdot \left(0.3333333333333333 + \ell \cdot \left(\ell \cdot \left(0.016666666666666666 + \left(\ell \cdot \ell\right) \cdot 0.0003968253968253968\right)\right)\right)\right)\right)
    \end{array}
    
    Derivation
    1. Initial program 89.3%

      \[\left(J \cdot \left(e^{\ell} - e^{-\ell}\right)\right) \cdot \cos \left(\frac{K}{2}\right) + U \]
    2. Step-by-step derivation
      1. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\left(\left(J \cdot \left(e^{\ell} - e^{\mathsf{neg}\left(\ell\right)}\right)\right) \cdot \cos \left(\frac{K}{2}\right)\right), \color{blue}{U}\right) \]
      2. associate-*l*N/A

        \[\leadsto \mathsf{+.f64}\left(\left(J \cdot \left(\left(e^{\ell} - e^{\mathsf{neg}\left(\ell\right)}\right) \cdot \cos \left(\frac{K}{2}\right)\right)\right), U\right) \]
      3. *-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\left(\left(\left(e^{\ell} - e^{\mathsf{neg}\left(\ell\right)}\right) \cdot \cos \left(\frac{K}{2}\right)\right) \cdot J\right), U\right) \]
      4. associate-*l*N/A

        \[\leadsto \mathsf{+.f64}\left(\left(\left(e^{\ell} - e^{\mathsf{neg}\left(\ell\right)}\right) \cdot \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(e^{\ell} - e^{\mathsf{neg}\left(\ell\right)}\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
      6. sub-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(e^{\ell} + \left(\mathsf{neg}\left(e^{\mathsf{neg}\left(\ell\right)}\right)\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
      7. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\left(e^{\ell}\right), \left(\mathsf{neg}\left(e^{\mathsf{neg}\left(\ell\right)}\right)\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
      8. exp-lowering-exp.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \left(\mathsf{neg}\left(e^{\mathsf{neg}\left(\ell\right)}\right)\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
      9. exp-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \left(\mathsf{neg}\left(\frac{1}{e^{\ell}}\right)\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
      10. distribute-neg-fracN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \left(\frac{\mathsf{neg}\left(1\right)}{e^{\ell}}\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
      11. metadata-evalN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \left(\frac{-1}{e^{\ell}}\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
      12. /-lowering-/.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \mathsf{/.f64}\left(-1, \left(e^{\ell}\right)\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
      13. exp-lowering-exp.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \mathsf{/.f64}\left(-1, \mathsf{exp.f64}\left(\ell\right)\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
      14. *-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \mathsf{/.f64}\left(-1, \mathsf{exp.f64}\left(\ell\right)\right)\right), \left(J \cdot \cos \left(\frac{K}{2}\right)\right)\right), U\right) \]
      15. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \mathsf{/.f64}\left(-1, \mathsf{exp.f64}\left(\ell\right)\right)\right), \mathsf{*.f64}\left(J, \cos \left(\frac{K}{2}\right)\right)\right), U\right) \]
      16. cos-lowering-cos.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \mathsf{/.f64}\left(-1, \mathsf{exp.f64}\left(\ell\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\left(\frac{K}{2}\right)\right)\right)\right), U\right) \]
      17. /-lowering-/.f6489.3%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \mathsf{/.f64}\left(-1, \mathsf{exp.f64}\left(\ell\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
    3. Simplified89.3%

      \[\leadsto \color{blue}{\left(e^{\ell} + \frac{-1}{e^{\ell}}\right) \cdot \left(J \cdot \cos \left(\frac{K}{2}\right)\right) + U} \]
    4. Add Preprocessing
    5. Taylor expanded in l around 0

      \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\color{blue}{\left(\ell \cdot \left(2 + {\ell}^{2} \cdot \left(\frac{1}{3} + {\ell}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)}, \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
    6. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \left(2 + {\ell}^{2} \cdot \left(\frac{1}{3} + {\ell}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
      2. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \left({\ell}^{2} \cdot \left(\frac{1}{3} + {\ell}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\left({\ell}^{2}\right), \left(\frac{1}{3} + {\ell}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
      4. unpow2N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\left(\ell \cdot \ell\right), \left(\frac{1}{3} + {\ell}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \left(\frac{1}{3} + {\ell}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
      6. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \left({\ell}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
      7. unpow2N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \left(\left(\ell \cdot \ell\right) \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
      8. associate-*l*N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \left(\ell \cdot \left(\ell \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
      9. *-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \left(\ell \cdot \left(\left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right) \cdot \ell\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\ell, \left(\left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right) \cdot \ell\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
      11. *-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\ell, \left(\ell \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
      12. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
      13. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(\frac{1}{60}, \left(\frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
      14. *-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(\frac{1}{60}, \left({\ell}^{2} \cdot \frac{1}{2520}\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
      15. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(\frac{1}{60}, \mathsf{*.f64}\left(\left({\ell}^{2}\right), \frac{1}{2520}\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
      16. unpow2N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(\frac{1}{60}, \mathsf{*.f64}\left(\left(\ell \cdot \ell\right), \frac{1}{2520}\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
      17. *-lowering-*.f6495.5%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(\frac{1}{60}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \frac{1}{2520}\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
    7. Simplified95.5%

      \[\leadsto \color{blue}{\left(\ell \cdot \left(2 + \left(\ell \cdot \ell\right) \cdot \left(0.3333333333333333 + \ell \cdot \left(\ell \cdot \left(0.016666666666666666 + \left(\ell \cdot \ell\right) \cdot 0.0003968253968253968\right)\right)\right)\right)\right)} \cdot \left(J \cdot \cos \left(\frac{K}{2}\right)\right) + U \]
    8. Final simplification95.5%

      \[\leadsto U + \left(J \cdot \cos \left(\frac{K}{2}\right)\right) \cdot \left(\ell \cdot \left(2 + \left(\ell \cdot \ell\right) \cdot \left(0.3333333333333333 + \ell \cdot \left(\ell \cdot \left(0.016666666666666666 + \left(\ell \cdot \ell\right) \cdot 0.0003968253968253968\right)\right)\right)\right)\right) \]
    9. Add Preprocessing

    Alternative 12: 95.2% accurate, 2.4× speedup?

    \[\begin{array}{l} \\ U + \cos \left(\frac{K}{2}\right) \cdot \left(J \cdot \left(\ell \cdot \left(2 + \left(\ell \cdot \ell\right) \cdot \left(0.3333333333333333 + \ell \cdot \left(\ell \cdot \left(0.016666666666666666 + \left(\ell \cdot \ell\right) \cdot 0.0003968253968253968\right)\right)\right)\right)\right)\right) \end{array} \]
    (FPCore (J l K U)
     :precision binary64
     (+
      U
      (*
       (cos (/ K 2.0))
       (*
        J
        (*
         l
         (+
          2.0
          (*
           (* l l)
           (+
            0.3333333333333333
            (*
             l
             (*
              l
              (+ 0.016666666666666666 (* (* l l) 0.0003968253968253968))))))))))))
    double code(double J, double l, double K, double U) {
    	return U + (cos((K / 2.0)) * (J * (l * (2.0 + ((l * l) * (0.3333333333333333 + (l * (l * (0.016666666666666666 + ((l * l) * 0.0003968253968253968))))))))));
    }
    
    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 + (cos((k / 2.0d0)) * (j * (l * (2.0d0 + ((l * l) * (0.3333333333333333d0 + (l * (l * (0.016666666666666666d0 + ((l * l) * 0.0003968253968253968d0))))))))))
    end function
    
    public static double code(double J, double l, double K, double U) {
    	return U + (Math.cos((K / 2.0)) * (J * (l * (2.0 + ((l * l) * (0.3333333333333333 + (l * (l * (0.016666666666666666 + ((l * l) * 0.0003968253968253968))))))))));
    }
    
    def code(J, l, K, U):
    	return U + (math.cos((K / 2.0)) * (J * (l * (2.0 + ((l * l) * (0.3333333333333333 + (l * (l * (0.016666666666666666 + ((l * l) * 0.0003968253968253968))))))))))
    
    function code(J, l, K, U)
    	return Float64(U + Float64(cos(Float64(K / 2.0)) * Float64(J * Float64(l * Float64(2.0 + Float64(Float64(l * l) * Float64(0.3333333333333333 + Float64(l * Float64(l * Float64(0.016666666666666666 + Float64(Float64(l * l) * 0.0003968253968253968)))))))))))
    end
    
    function tmp = code(J, l, K, U)
    	tmp = U + (cos((K / 2.0)) * (J * (l * (2.0 + ((l * l) * (0.3333333333333333 + (l * (l * (0.016666666666666666 + ((l * l) * 0.0003968253968253968))))))))));
    end
    
    code[J_, l_, K_, U_] := N[(U + N[(N[Cos[N[(K / 2.0), $MachinePrecision]], $MachinePrecision] * N[(J * N[(l * N[(2.0 + N[(N[(l * l), $MachinePrecision] * N[(0.3333333333333333 + N[(l * N[(l * N[(0.016666666666666666 + N[(N[(l * l), $MachinePrecision] * 0.0003968253968253968), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
    
    \begin{array}{l}
    
    \\
    U + \cos \left(\frac{K}{2}\right) \cdot \left(J \cdot \left(\ell \cdot \left(2 + \left(\ell \cdot \ell\right) \cdot \left(0.3333333333333333 + \ell \cdot \left(\ell \cdot \left(0.016666666666666666 + \left(\ell \cdot \ell\right) \cdot 0.0003968253968253968\right)\right)\right)\right)\right)\right)
    \end{array}
    
    Derivation
    1. Initial program 89.3%

      \[\left(J \cdot \left(e^{\ell} - e^{-\ell}\right)\right) \cdot \cos \left(\frac{K}{2}\right) + U \]
    2. Add Preprocessing
    3. Taylor expanded in l around 0

      \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(J, \color{blue}{\left(\ell \cdot \left(2 + {\ell}^{2} \cdot \left(\frac{1}{3} + {\ell}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)}\right), \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right), U\right) \]
    4. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\ell, \left(2 + {\ell}^{2} \cdot \left(\frac{1}{3} + {\ell}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right), \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right), U\right) \]
      2. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \left({\ell}^{2} \cdot \left(\frac{1}{3} + {\ell}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right)\right), \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right), U\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\left({\ell}^{2}\right), \left(\frac{1}{3} + {\ell}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right)\right), \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right), U\right) \]
      4. unpow2N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\left(\ell \cdot \ell\right), \left(\frac{1}{3} + {\ell}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right)\right), \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right), U\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \left(\frac{1}{3} + {\ell}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right)\right), \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right), U\right) \]
      6. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \left({\ell}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right)\right)\right), \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right), U\right) \]
      7. unpow2N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \left(\left(\ell \cdot \ell\right) \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right)\right)\right), \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right), U\right) \]
      8. associate-*l*N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \left(\ell \cdot \left(\ell \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right), U\right) \]
      9. *-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \left(\ell \cdot \left(\left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right) \cdot \ell\right)\right)\right)\right)\right)\right)\right), \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right), U\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\ell, \left(\left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right) \cdot \ell\right)\right)\right)\right)\right)\right)\right), \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right), U\right) \]
      11. *-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\ell, \left(\ell \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right), U\right) \]
      12. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right), U\right) \]
      13. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(\frac{1}{60}, \left(\frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right), U\right) \]
      14. *-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(\frac{1}{60}, \left({\ell}^{2} \cdot \frac{1}{2520}\right)\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right), U\right) \]
      15. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(\frac{1}{60}, \mathsf{*.f64}\left(\left({\ell}^{2}\right), \frac{1}{2520}\right)\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right), U\right) \]
      16. unpow2N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(\frac{1}{60}, \mathsf{*.f64}\left(\left(\ell \cdot \ell\right), \frac{1}{2520}\right)\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right), U\right) \]
      17. *-lowering-*.f6495.5%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(\frac{1}{60}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \frac{1}{2520}\right)\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right), U\right) \]
    5. Simplified95.5%

      \[\leadsto \left(J \cdot \color{blue}{\left(\ell \cdot \left(2 + \left(\ell \cdot \ell\right) \cdot \left(0.3333333333333333 + \ell \cdot \left(\ell \cdot \left(0.016666666666666666 + \left(\ell \cdot \ell\right) \cdot 0.0003968253968253968\right)\right)\right)\right)\right)}\right) \cdot \cos \left(\frac{K}{2}\right) + U \]
    6. Final simplification95.5%

      \[\leadsto U + \cos \left(\frac{K}{2}\right) \cdot \left(J \cdot \left(\ell \cdot \left(2 + \left(\ell \cdot \ell\right) \cdot \left(0.3333333333333333 + \ell \cdot \left(\ell \cdot \left(0.016666666666666666 + \left(\ell \cdot \ell\right) \cdot 0.0003968253968253968\right)\right)\right)\right)\right)\right) \]
    7. Add Preprocessing

    Alternative 13: 93.1% accurate, 2.5× speedup?

    \[\begin{array}{l} \\ U + \left(J \cdot \cos \left(\frac{K}{2}\right)\right) \cdot \left(\ell \cdot \left(2 + \left(\ell \cdot \ell\right) \cdot \left(0.3333333333333333 + \left(\ell \cdot \ell\right) \cdot 0.016666666666666666\right)\right)\right) \end{array} \]
    (FPCore (J l K U)
     :precision binary64
     (+
      U
      (*
       (* J (cos (/ K 2.0)))
       (*
        l
        (+
         2.0
         (* (* l l) (+ 0.3333333333333333 (* (* l l) 0.016666666666666666))))))))
    double code(double J, double l, double K, double U) {
    	return U + ((J * cos((K / 2.0))) * (l * (2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * 0.016666666666666666))))));
    }
    
    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 + ((j * cos((k / 2.0d0))) * (l * (2.0d0 + ((l * l) * (0.3333333333333333d0 + ((l * l) * 0.016666666666666666d0))))))
    end function
    
    public static double code(double J, double l, double K, double U) {
    	return U + ((J * Math.cos((K / 2.0))) * (l * (2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * 0.016666666666666666))))));
    }
    
    def code(J, l, K, U):
    	return U + ((J * math.cos((K / 2.0))) * (l * (2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * 0.016666666666666666))))))
    
    function code(J, l, K, U)
    	return Float64(U + Float64(Float64(J * cos(Float64(K / 2.0))) * Float64(l * Float64(2.0 + Float64(Float64(l * l) * Float64(0.3333333333333333 + Float64(Float64(l * l) * 0.016666666666666666)))))))
    end
    
    function tmp = code(J, l, K, U)
    	tmp = U + ((J * cos((K / 2.0))) * (l * (2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * 0.016666666666666666))))));
    end
    
    code[J_, l_, K_, U_] := N[(U + N[(N[(J * N[Cos[N[(K / 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(l * N[(2.0 + N[(N[(l * l), $MachinePrecision] * N[(0.3333333333333333 + N[(N[(l * l), $MachinePrecision] * 0.016666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
    
    \begin{array}{l}
    
    \\
    U + \left(J \cdot \cos \left(\frac{K}{2}\right)\right) \cdot \left(\ell \cdot \left(2 + \left(\ell \cdot \ell\right) \cdot \left(0.3333333333333333 + \left(\ell \cdot \ell\right) \cdot 0.016666666666666666\right)\right)\right)
    \end{array}
    
    Derivation
    1. Initial program 89.3%

      \[\left(J \cdot \left(e^{\ell} - e^{-\ell}\right)\right) \cdot \cos \left(\frac{K}{2}\right) + U \]
    2. Step-by-step derivation
      1. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\left(\left(J \cdot \left(e^{\ell} - e^{\mathsf{neg}\left(\ell\right)}\right)\right) \cdot \cos \left(\frac{K}{2}\right)\right), \color{blue}{U}\right) \]
      2. associate-*l*N/A

        \[\leadsto \mathsf{+.f64}\left(\left(J \cdot \left(\left(e^{\ell} - e^{\mathsf{neg}\left(\ell\right)}\right) \cdot \cos \left(\frac{K}{2}\right)\right)\right), U\right) \]
      3. *-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\left(\left(\left(e^{\ell} - e^{\mathsf{neg}\left(\ell\right)}\right) \cdot \cos \left(\frac{K}{2}\right)\right) \cdot J\right), U\right) \]
      4. associate-*l*N/A

        \[\leadsto \mathsf{+.f64}\left(\left(\left(e^{\ell} - e^{\mathsf{neg}\left(\ell\right)}\right) \cdot \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(e^{\ell} - e^{\mathsf{neg}\left(\ell\right)}\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
      6. sub-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(e^{\ell} + \left(\mathsf{neg}\left(e^{\mathsf{neg}\left(\ell\right)}\right)\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
      7. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\left(e^{\ell}\right), \left(\mathsf{neg}\left(e^{\mathsf{neg}\left(\ell\right)}\right)\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
      8. exp-lowering-exp.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \left(\mathsf{neg}\left(e^{\mathsf{neg}\left(\ell\right)}\right)\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
      9. exp-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \left(\mathsf{neg}\left(\frac{1}{e^{\ell}}\right)\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
      10. distribute-neg-fracN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \left(\frac{\mathsf{neg}\left(1\right)}{e^{\ell}}\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
      11. metadata-evalN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \left(\frac{-1}{e^{\ell}}\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
      12. /-lowering-/.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \mathsf{/.f64}\left(-1, \left(e^{\ell}\right)\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
      13. exp-lowering-exp.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \mathsf{/.f64}\left(-1, \mathsf{exp.f64}\left(\ell\right)\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
      14. *-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \mathsf{/.f64}\left(-1, \mathsf{exp.f64}\left(\ell\right)\right)\right), \left(J \cdot \cos \left(\frac{K}{2}\right)\right)\right), U\right) \]
      15. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \mathsf{/.f64}\left(-1, \mathsf{exp.f64}\left(\ell\right)\right)\right), \mathsf{*.f64}\left(J, \cos \left(\frac{K}{2}\right)\right)\right), U\right) \]
      16. cos-lowering-cos.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \mathsf{/.f64}\left(-1, \mathsf{exp.f64}\left(\ell\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\left(\frac{K}{2}\right)\right)\right)\right), U\right) \]
      17. /-lowering-/.f6489.3%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \mathsf{/.f64}\left(-1, \mathsf{exp.f64}\left(\ell\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
    3. Simplified89.3%

      \[\leadsto \color{blue}{\left(e^{\ell} + \frac{-1}{e^{\ell}}\right) \cdot \left(J \cdot \cos \left(\frac{K}{2}\right)\right) + U} \]
    4. Add Preprocessing
    5. Taylor expanded in l around 0

      \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\color{blue}{\left(\ell \cdot \left(2 + {\ell}^{2} \cdot \left(\frac{1}{3} + \frac{1}{60} \cdot {\ell}^{2}\right)\right)\right)}, \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
    6. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \left(2 + {\ell}^{2} \cdot \left(\frac{1}{3} + \frac{1}{60} \cdot {\ell}^{2}\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
      2. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \left({\ell}^{2} \cdot \left(\frac{1}{3} + \frac{1}{60} \cdot {\ell}^{2}\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\left({\ell}^{2}\right), \left(\frac{1}{3} + \frac{1}{60} \cdot {\ell}^{2}\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
      4. unpow2N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\left(\ell \cdot \ell\right), \left(\frac{1}{3} + \frac{1}{60} \cdot {\ell}^{2}\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \left(\frac{1}{3} + \frac{1}{60} \cdot {\ell}^{2}\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
      6. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \left(\frac{1}{60} \cdot {\ell}^{2}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
      7. *-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \left({\ell}^{2} \cdot \frac{1}{60}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\left({\ell}^{2}\right), \frac{1}{60}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
      9. unpow2N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\left(\ell \cdot \ell\right), \frac{1}{60}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
      10. *-lowering-*.f6492.5%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \frac{1}{60}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
    7. Simplified92.5%

      \[\leadsto \color{blue}{\left(\ell \cdot \left(2 + \left(\ell \cdot \ell\right) \cdot \left(0.3333333333333333 + \left(\ell \cdot \ell\right) \cdot 0.016666666666666666\right)\right)\right)} \cdot \left(J \cdot \cos \left(\frac{K}{2}\right)\right) + U \]
    8. Final simplification92.5%

      \[\leadsto U + \left(J \cdot \cos \left(\frac{K}{2}\right)\right) \cdot \left(\ell \cdot \left(2 + \left(\ell \cdot \ell\right) \cdot \left(0.3333333333333333 + \left(\ell \cdot \ell\right) \cdot 0.016666666666666666\right)\right)\right) \]
    9. Add Preprocessing

    Alternative 14: 93.1% accurate, 2.5× speedup?

    \[\begin{array}{l} \\ U + \cos \left(\frac{K}{2}\right) \cdot \left(J \cdot \left(\ell \cdot \left(2 + \left(\ell \cdot \ell\right) \cdot \left(0.3333333333333333 + \left(\ell \cdot \ell\right) \cdot 0.016666666666666666\right)\right)\right)\right) \end{array} \]
    (FPCore (J l K U)
     :precision binary64
     (+
      U
      (*
       (cos (/ K 2.0))
       (*
        J
        (*
         l
         (+
          2.0
          (* (* l l) (+ 0.3333333333333333 (* (* l l) 0.016666666666666666)))))))))
    double code(double J, double l, double K, double U) {
    	return U + (cos((K / 2.0)) * (J * (l * (2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * 0.016666666666666666)))))));
    }
    
    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 + (cos((k / 2.0d0)) * (j * (l * (2.0d0 + ((l * l) * (0.3333333333333333d0 + ((l * l) * 0.016666666666666666d0)))))))
    end function
    
    public static double code(double J, double l, double K, double U) {
    	return U + (Math.cos((K / 2.0)) * (J * (l * (2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * 0.016666666666666666)))))));
    }
    
    def code(J, l, K, U):
    	return U + (math.cos((K / 2.0)) * (J * (l * (2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * 0.016666666666666666)))))))
    
    function code(J, l, K, U)
    	return Float64(U + Float64(cos(Float64(K / 2.0)) * Float64(J * Float64(l * Float64(2.0 + Float64(Float64(l * l) * Float64(0.3333333333333333 + Float64(Float64(l * l) * 0.016666666666666666))))))))
    end
    
    function tmp = code(J, l, K, U)
    	tmp = U + (cos((K / 2.0)) * (J * (l * (2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * 0.016666666666666666)))))));
    end
    
    code[J_, l_, K_, U_] := N[(U + N[(N[Cos[N[(K / 2.0), $MachinePrecision]], $MachinePrecision] * N[(J * N[(l * N[(2.0 + N[(N[(l * l), $MachinePrecision] * N[(0.3333333333333333 + N[(N[(l * l), $MachinePrecision] * 0.016666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
    
    \begin{array}{l}
    
    \\
    U + \cos \left(\frac{K}{2}\right) \cdot \left(J \cdot \left(\ell \cdot \left(2 + \left(\ell \cdot \ell\right) \cdot \left(0.3333333333333333 + \left(\ell \cdot \ell\right) \cdot 0.016666666666666666\right)\right)\right)\right)
    \end{array}
    
    Derivation
    1. Initial program 89.3%

      \[\left(J \cdot \left(e^{\ell} - e^{-\ell}\right)\right) \cdot \cos \left(\frac{K}{2}\right) + U \]
    2. Add Preprocessing
    3. Taylor expanded in l around 0

      \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(J, \color{blue}{\left(\ell \cdot \left(2 + {\ell}^{2} \cdot \left(\frac{1}{3} + \frac{1}{60} \cdot {\ell}^{2}\right)\right)\right)}\right), \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right), U\right) \]
    4. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\ell, \left(2 + {\ell}^{2} \cdot \left(\frac{1}{3} + \frac{1}{60} \cdot {\ell}^{2}\right)\right)\right)\right), \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right), U\right) \]
      2. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \left({\ell}^{2} \cdot \left(\frac{1}{3} + \frac{1}{60} \cdot {\ell}^{2}\right)\right)\right)\right)\right), \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right), U\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\left({\ell}^{2}\right), \left(\frac{1}{3} + \frac{1}{60} \cdot {\ell}^{2}\right)\right)\right)\right)\right), \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right), U\right) \]
      4. unpow2N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\left(\ell \cdot \ell\right), \left(\frac{1}{3} + \frac{1}{60} \cdot {\ell}^{2}\right)\right)\right)\right)\right), \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right), U\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \left(\frac{1}{3} + \frac{1}{60} \cdot {\ell}^{2}\right)\right)\right)\right)\right), \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right), U\right) \]
      6. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \left(\frac{1}{60} \cdot {\ell}^{2}\right)\right)\right)\right)\right)\right), \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right), U\right) \]
      7. *-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \left({\ell}^{2} \cdot \frac{1}{60}\right)\right)\right)\right)\right)\right), \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right), U\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\left({\ell}^{2}\right), \frac{1}{60}\right)\right)\right)\right)\right)\right), \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right), U\right) \]
      9. unpow2N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\left(\ell \cdot \ell\right), \frac{1}{60}\right)\right)\right)\right)\right)\right), \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right), U\right) \]
      10. *-lowering-*.f6492.5%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \frac{1}{60}\right)\right)\right)\right)\right)\right), \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right), U\right) \]
    5. Simplified92.5%

      \[\leadsto \left(J \cdot \color{blue}{\left(\ell \cdot \left(2 + \left(\ell \cdot \ell\right) \cdot \left(0.3333333333333333 + \left(\ell \cdot \ell\right) \cdot 0.016666666666666666\right)\right)\right)}\right) \cdot \cos \left(\frac{K}{2}\right) + U \]
    6. Final simplification92.5%

      \[\leadsto U + \cos \left(\frac{K}{2}\right) \cdot \left(J \cdot \left(\ell \cdot \left(2 + \left(\ell \cdot \ell\right) \cdot \left(0.3333333333333333 + \left(\ell \cdot \ell\right) \cdot 0.016666666666666666\right)\right)\right)\right) \]
    7. Add Preprocessing

    Alternative 15: 79.1% accurate, 2.6× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_0 := 2 \cdot \left(\cos \left(K \cdot 0.5\right) \cdot \left(J \cdot \ell\right)\right)\\ \mathbf{if}\;J \leq -6 \cdot 10^{+205}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;J \leq 6 \cdot 10^{+258}:\\ \;\;\;\;U \cdot \left(1 + \frac{\ell \cdot \left(J \cdot \left(2 + \ell \cdot \left(\ell \cdot \left(0.3333333333333333 + \ell \cdot \left(\ell \cdot \left(0.016666666666666666 + \left(\ell \cdot \ell\right) \cdot 0.0003968253968253968\right)\right)\right)\right)\right)\right)}{U}\right)\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \]
    (FPCore (J l K U)
     :precision binary64
     (let* ((t_0 (* 2.0 (* (cos (* K 0.5)) (* J l)))))
       (if (<= J -6e+205)
         t_0
         (if (<= J 6e+258)
           (*
            U
            (+
             1.0
             (/
              (*
               l
               (*
                J
                (+
                 2.0
                 (*
                  l
                  (*
                   l
                   (+
                    0.3333333333333333
                    (*
                     l
                     (*
                      l
                      (+
                       0.016666666666666666
                       (* (* l l) 0.0003968253968253968))))))))))
              U)))
           t_0))))
    double code(double J, double l, double K, double U) {
    	double t_0 = 2.0 * (cos((K * 0.5)) * (J * l));
    	double tmp;
    	if (J <= -6e+205) {
    		tmp = t_0;
    	} else if (J <= 6e+258) {
    		tmp = U * (1.0 + ((l * (J * (2.0 + (l * (l * (0.3333333333333333 + (l * (l * (0.016666666666666666 + ((l * l) * 0.0003968253968253968)))))))))) / U));
    	} 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) :: tmp
        t_0 = 2.0d0 * (cos((k * 0.5d0)) * (j * l))
        if (j <= (-6d+205)) then
            tmp = t_0
        else if (j <= 6d+258) then
            tmp = u * (1.0d0 + ((l * (j * (2.0d0 + (l * (l * (0.3333333333333333d0 + (l * (l * (0.016666666666666666d0 + ((l * l) * 0.0003968253968253968d0)))))))))) / u))
        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 = 2.0 * (Math.cos((K * 0.5)) * (J * l));
    	double tmp;
    	if (J <= -6e+205) {
    		tmp = t_0;
    	} else if (J <= 6e+258) {
    		tmp = U * (1.0 + ((l * (J * (2.0 + (l * (l * (0.3333333333333333 + (l * (l * (0.016666666666666666 + ((l * l) * 0.0003968253968253968)))))))))) / U));
    	} else {
    		tmp = t_0;
    	}
    	return tmp;
    }
    
    def code(J, l, K, U):
    	t_0 = 2.0 * (math.cos((K * 0.5)) * (J * l))
    	tmp = 0
    	if J <= -6e+205:
    		tmp = t_0
    	elif J <= 6e+258:
    		tmp = U * (1.0 + ((l * (J * (2.0 + (l * (l * (0.3333333333333333 + (l * (l * (0.016666666666666666 + ((l * l) * 0.0003968253968253968)))))))))) / U))
    	else:
    		tmp = t_0
    	return tmp
    
    function code(J, l, K, U)
    	t_0 = Float64(2.0 * Float64(cos(Float64(K * 0.5)) * Float64(J * l)))
    	tmp = 0.0
    	if (J <= -6e+205)
    		tmp = t_0;
    	elseif (J <= 6e+258)
    		tmp = Float64(U * Float64(1.0 + Float64(Float64(l * Float64(J * Float64(2.0 + Float64(l * Float64(l * Float64(0.3333333333333333 + Float64(l * Float64(l * Float64(0.016666666666666666 + Float64(Float64(l * l) * 0.0003968253968253968)))))))))) / U)));
    	else
    		tmp = t_0;
    	end
    	return tmp
    end
    
    function tmp_2 = code(J, l, K, U)
    	t_0 = 2.0 * (cos((K * 0.5)) * (J * l));
    	tmp = 0.0;
    	if (J <= -6e+205)
    		tmp = t_0;
    	elseif (J <= 6e+258)
    		tmp = U * (1.0 + ((l * (J * (2.0 + (l * (l * (0.3333333333333333 + (l * (l * (0.016666666666666666 + ((l * l) * 0.0003968253968253968)))))))))) / U));
    	else
    		tmp = t_0;
    	end
    	tmp_2 = tmp;
    end
    
    code[J_, l_, K_, U_] := Block[{t$95$0 = N[(2.0 * N[(N[Cos[N[(K * 0.5), $MachinePrecision]], $MachinePrecision] * N[(J * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[J, -6e+205], t$95$0, If[LessEqual[J, 6e+258], N[(U * N[(1.0 + N[(N[(l * N[(J * N[(2.0 + N[(l * N[(l * N[(0.3333333333333333 + N[(l * N[(l * N[(0.016666666666666666 + N[(N[(l * l), $MachinePrecision] * 0.0003968253968253968), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_0 := 2 \cdot \left(\cos \left(K \cdot 0.5\right) \cdot \left(J \cdot \ell\right)\right)\\
    \mathbf{if}\;J \leq -6 \cdot 10^{+205}:\\
    \;\;\;\;t\_0\\
    
    \mathbf{elif}\;J \leq 6 \cdot 10^{+258}:\\
    \;\;\;\;U \cdot \left(1 + \frac{\ell \cdot \left(J \cdot \left(2 + \ell \cdot \left(\ell \cdot \left(0.3333333333333333 + \ell \cdot \left(\ell \cdot \left(0.016666666666666666 + \left(\ell \cdot \ell\right) \cdot 0.0003968253968253968\right)\right)\right)\right)\right)\right)}{U}\right)\\
    
    \mathbf{else}:\\
    \;\;\;\;t\_0\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if J < -5.9999999999999999e205 or 5.9999999999999999e258 < J

      1. Initial program 61.3%

        \[\left(J \cdot \left(e^{\ell} - e^{-\ell}\right)\right) \cdot \cos \left(\frac{K}{2}\right) + U \]
      2. Add Preprocessing
      3. Taylor expanded in l around 0

        \[\leadsto \mathsf{+.f64}\left(\color{blue}{\left(\ell \cdot \left(\frac{1}{3} \cdot \left(J \cdot \left({\ell}^{2} \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) + 2 \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right)\right)}, U\right) \]
      4. Step-by-step derivation
        1. distribute-rgt-inN/A

          \[\leadsto \mathsf{+.f64}\left(\left(\left(\frac{1}{3} \cdot \left(J \cdot \left({\ell}^{2} \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right)\right) \cdot \ell + \left(2 \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) \cdot \ell\right), U\right) \]
        2. fma-defineN/A

          \[\leadsto \mathsf{+.f64}\left(\left(\mathsf{fma}\left(\frac{1}{3} \cdot \left(J \cdot \left({\ell}^{2} \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right), \ell, \left(2 \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) \cdot \ell\right)\right), U\right) \]
        3. *-commutativeN/A

          \[\leadsto \mathsf{+.f64}\left(\left(\mathsf{fma}\left(\frac{1}{3} \cdot \left(J \cdot \left(\cos \left(\frac{1}{2} \cdot K\right) \cdot {\ell}^{2}\right)\right), \ell, \left(2 \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) \cdot \ell\right)\right), U\right) \]
        4. associate-*r*N/A

          \[\leadsto \mathsf{+.f64}\left(\left(\mathsf{fma}\left(\frac{1}{3} \cdot \left(\left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right) \cdot {\ell}^{2}\right), \ell, \left(2 \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) \cdot \ell\right)\right), U\right) \]
        5. associate-*l*N/A

          \[\leadsto \mathsf{+.f64}\left(\left(\mathsf{fma}\left(\left(\frac{1}{3} \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) \cdot {\ell}^{2}, \ell, \left(2 \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) \cdot \ell\right)\right), U\right) \]
        6. *-commutativeN/A

          \[\leadsto \mathsf{+.f64}\left(\left(\mathsf{fma}\left({\ell}^{2} \cdot \left(\frac{1}{3} \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right), \ell, \left(2 \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) \cdot \ell\right)\right), U\right) \]
        7. fma-undefineN/A

          \[\leadsto \mathsf{+.f64}\left(\left(\left({\ell}^{2} \cdot \left(\frac{1}{3} \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right)\right) \cdot \ell + \left(2 \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) \cdot \ell\right), U\right) \]
        8. distribute-rgt-inN/A

          \[\leadsto \mathsf{+.f64}\left(\left(\ell \cdot \left({\ell}^{2} \cdot \left(\frac{1}{3} \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) + 2 \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right)\right), U\right) \]
        9. *-lowering-*.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\ell, \left({\ell}^{2} \cdot \left(\frac{1}{3} \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) + 2 \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right)\right), U\right) \]
      5. Simplified99.9%

        \[\leadsto \color{blue}{\ell \cdot \left(\cos \left(0.5 \cdot K\right) \cdot \left(J \cdot \left(2 + 0.3333333333333333 \cdot \left(\ell \cdot \ell\right)\right)\right)\right)} + U \]
      6. Taylor expanded in J around inf

        \[\leadsto \color{blue}{J \cdot \left(\ell \cdot \left(\cos \left(\frac{1}{2} \cdot K\right) \cdot \left(2 + \frac{1}{3} \cdot {\ell}^{2}\right)\right)\right)} \]
      7. Step-by-step derivation
        1. associate-*r*N/A

          \[\leadsto J \cdot \left(\left(\ell \cdot \cos \left(\frac{1}{2} \cdot K\right)\right) \cdot \color{blue}{\left(2 + \frac{1}{3} \cdot {\ell}^{2}\right)}\right) \]
        2. associate-*r*N/A

          \[\leadsto \left(J \cdot \left(\ell \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) \cdot \color{blue}{\left(2 + \frac{1}{3} \cdot {\ell}^{2}\right)} \]
        3. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\left(J \cdot \left(\ell \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right), \color{blue}{\left(2 + \frac{1}{3} \cdot {\ell}^{2}\right)}\right) \]
        4. associate-*r*N/A

          \[\leadsto \mathsf{*.f64}\left(\left(\left(J \cdot \ell\right) \cdot \cos \left(\frac{1}{2} \cdot K\right)\right), \left(\color{blue}{2} + \frac{1}{3} \cdot {\ell}^{2}\right)\right) \]
        5. *-commutativeN/A

          \[\leadsto \mathsf{*.f64}\left(\left(\cos \left(\frac{1}{2} \cdot K\right) \cdot \left(J \cdot \ell\right)\right), \left(\color{blue}{2} + \frac{1}{3} \cdot {\ell}^{2}\right)\right) \]
        6. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\cos \left(\frac{1}{2} \cdot K\right), \left(J \cdot \ell\right)\right), \left(\color{blue}{2} + \frac{1}{3} \cdot {\ell}^{2}\right)\right) \]
        7. cos-lowering-cos.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{cos.f64}\left(\left(\frac{1}{2} \cdot K\right)\right), \left(J \cdot \ell\right)\right), \left(2 + \frac{1}{3} \cdot {\ell}^{2}\right)\right) \]
        8. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, K\right)\right), \left(J \cdot \ell\right)\right), \left(2 + \frac{1}{3} \cdot {\ell}^{2}\right)\right) \]
        9. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, K\right)\right), \mathsf{*.f64}\left(J, \ell\right)\right), \left(2 + \frac{1}{3} \cdot {\ell}^{2}\right)\right) \]
        10. +-lowering-+.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, K\right)\right), \mathsf{*.f64}\left(J, \ell\right)\right), \mathsf{+.f64}\left(2, \color{blue}{\left(\frac{1}{3} \cdot {\ell}^{2}\right)}\right)\right) \]
        11. *-commutativeN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, K\right)\right), \mathsf{*.f64}\left(J, \ell\right)\right), \mathsf{+.f64}\left(2, \left({\ell}^{2} \cdot \color{blue}{\frac{1}{3}}\right)\right)\right) \]
        12. unpow2N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, K\right)\right), \mathsf{*.f64}\left(J, \ell\right)\right), \mathsf{+.f64}\left(2, \left(\left(\ell \cdot \ell\right) \cdot \frac{1}{3}\right)\right)\right) \]
        13. associate-*l*N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, K\right)\right), \mathsf{*.f64}\left(J, \ell\right)\right), \mathsf{+.f64}\left(2, \left(\ell \cdot \color{blue}{\left(\ell \cdot \frac{1}{3}\right)}\right)\right)\right) \]
        14. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, K\right)\right), \mathsf{*.f64}\left(J, \ell\right)\right), \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\ell, \color{blue}{\left(\ell \cdot \frac{1}{3}\right)}\right)\right)\right) \]
        15. *-lowering-*.f6487.2%

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, K\right)\right), \mathsf{*.f64}\left(J, \ell\right)\right), \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \color{blue}{\frac{1}{3}}\right)\right)\right)\right) \]
      8. Simplified87.2%

        \[\leadsto \color{blue}{\left(\cos \left(0.5 \cdot K\right) \cdot \left(J \cdot \ell\right)\right) \cdot \left(2 + \ell \cdot \left(\ell \cdot 0.3333333333333333\right)\right)} \]
      9. Taylor expanded in l around 0

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, K\right)\right), \mathsf{*.f64}\left(J, \ell\right)\right), \color{blue}{2}\right) \]
      10. Step-by-step derivation
        1. Simplified87.2%

          \[\leadsto \left(\cos \left(0.5 \cdot K\right) \cdot \left(J \cdot \ell\right)\right) \cdot \color{blue}{2} \]

        if -5.9999999999999999e205 < J < 5.9999999999999999e258

        1. Initial program 93.0%

          \[\left(J \cdot \left(e^{\ell} - e^{-\ell}\right)\right) \cdot \cos \left(\frac{K}{2}\right) + U \]
        2. Step-by-step derivation
          1. +-lowering-+.f64N/A

            \[\leadsto \mathsf{+.f64}\left(\left(\left(J \cdot \left(e^{\ell} - e^{\mathsf{neg}\left(\ell\right)}\right)\right) \cdot \cos \left(\frac{K}{2}\right)\right), \color{blue}{U}\right) \]
          2. associate-*l*N/A

            \[\leadsto \mathsf{+.f64}\left(\left(J \cdot \left(\left(e^{\ell} - e^{\mathsf{neg}\left(\ell\right)}\right) \cdot \cos \left(\frac{K}{2}\right)\right)\right), U\right) \]
          3. *-commutativeN/A

            \[\leadsto \mathsf{+.f64}\left(\left(\left(\left(e^{\ell} - e^{\mathsf{neg}\left(\ell\right)}\right) \cdot \cos \left(\frac{K}{2}\right)\right) \cdot J\right), U\right) \]
          4. associate-*l*N/A

            \[\leadsto \mathsf{+.f64}\left(\left(\left(e^{\ell} - e^{\mathsf{neg}\left(\ell\right)}\right) \cdot \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
          5. *-lowering-*.f64N/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(e^{\ell} - e^{\mathsf{neg}\left(\ell\right)}\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
          6. sub-negN/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(e^{\ell} + \left(\mathsf{neg}\left(e^{\mathsf{neg}\left(\ell\right)}\right)\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
          7. +-lowering-+.f64N/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\left(e^{\ell}\right), \left(\mathsf{neg}\left(e^{\mathsf{neg}\left(\ell\right)}\right)\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
          8. exp-lowering-exp.f64N/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \left(\mathsf{neg}\left(e^{\mathsf{neg}\left(\ell\right)}\right)\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
          9. exp-negN/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \left(\mathsf{neg}\left(\frac{1}{e^{\ell}}\right)\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
          10. distribute-neg-fracN/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \left(\frac{\mathsf{neg}\left(1\right)}{e^{\ell}}\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
          11. metadata-evalN/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \left(\frac{-1}{e^{\ell}}\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
          12. /-lowering-/.f64N/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \mathsf{/.f64}\left(-1, \left(e^{\ell}\right)\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
          13. exp-lowering-exp.f64N/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \mathsf{/.f64}\left(-1, \mathsf{exp.f64}\left(\ell\right)\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
          14. *-commutativeN/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \mathsf{/.f64}\left(-1, \mathsf{exp.f64}\left(\ell\right)\right)\right), \left(J \cdot \cos \left(\frac{K}{2}\right)\right)\right), U\right) \]
          15. *-lowering-*.f64N/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \mathsf{/.f64}\left(-1, \mathsf{exp.f64}\left(\ell\right)\right)\right), \mathsf{*.f64}\left(J, \cos \left(\frac{K}{2}\right)\right)\right), U\right) \]
          16. cos-lowering-cos.f64N/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \mathsf{/.f64}\left(-1, \mathsf{exp.f64}\left(\ell\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\left(\frac{K}{2}\right)\right)\right)\right), U\right) \]
          17. /-lowering-/.f6493.0%

            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \mathsf{/.f64}\left(-1, \mathsf{exp.f64}\left(\ell\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
        3. Simplified93.0%

          \[\leadsto \color{blue}{\left(e^{\ell} + \frac{-1}{e^{\ell}}\right) \cdot \left(J \cdot \cos \left(\frac{K}{2}\right)\right) + U} \]
        4. Add Preprocessing
        5. Taylor expanded in l around 0

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\color{blue}{\left(\ell \cdot \left(2 + {\ell}^{2} \cdot \left(\frac{1}{3} + {\ell}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)}, \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
        6. Step-by-step derivation
          1. *-lowering-*.f64N/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \left(2 + {\ell}^{2} \cdot \left(\frac{1}{3} + {\ell}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
          2. +-lowering-+.f64N/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \left({\ell}^{2} \cdot \left(\frac{1}{3} + {\ell}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
          3. *-lowering-*.f64N/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\left({\ell}^{2}\right), \left(\frac{1}{3} + {\ell}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
          4. unpow2N/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\left(\ell \cdot \ell\right), \left(\frac{1}{3} + {\ell}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
          5. *-lowering-*.f64N/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \left(\frac{1}{3} + {\ell}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
          6. +-lowering-+.f64N/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \left({\ell}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
          7. unpow2N/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \left(\left(\ell \cdot \ell\right) \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
          8. associate-*l*N/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \left(\ell \cdot \left(\ell \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
          9. *-commutativeN/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \left(\ell \cdot \left(\left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right) \cdot \ell\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
          10. *-lowering-*.f64N/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\ell, \left(\left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right) \cdot \ell\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
          11. *-commutativeN/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\ell, \left(\ell \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
          12. *-lowering-*.f64N/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
          13. +-lowering-+.f64N/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(\frac{1}{60}, \left(\frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
          14. *-commutativeN/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(\frac{1}{60}, \left({\ell}^{2} \cdot \frac{1}{2520}\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
          15. *-lowering-*.f64N/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(\frac{1}{60}, \mathsf{*.f64}\left(\left({\ell}^{2}\right), \frac{1}{2520}\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
          16. unpow2N/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(\frac{1}{60}, \mathsf{*.f64}\left(\left(\ell \cdot \ell\right), \frac{1}{2520}\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
          17. *-lowering-*.f6494.9%

            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(\frac{1}{60}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \frac{1}{2520}\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
        7. Simplified94.9%

          \[\leadsto \color{blue}{\left(\ell \cdot \left(2 + \left(\ell \cdot \ell\right) \cdot \left(0.3333333333333333 + \ell \cdot \left(\ell \cdot \left(0.016666666666666666 + \left(\ell \cdot \ell\right) \cdot 0.0003968253968253968\right)\right)\right)\right)\right)} \cdot \left(J \cdot \cos \left(\frac{K}{2}\right)\right) + U \]
        8. Taylor expanded in U around inf

          \[\leadsto \color{blue}{U \cdot \left(1 + \frac{J \cdot \left(\ell \cdot \left(\cos \left(\frac{1}{2} \cdot K\right) \cdot \left(2 + {\ell}^{2} \cdot \left(\frac{1}{3} + {\ell}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right)}{U}\right)} \]
        9. Step-by-step derivation
          1. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(U, \color{blue}{\left(1 + \frac{J \cdot \left(\ell \cdot \left(\cos \left(\frac{1}{2} \cdot K\right) \cdot \left(2 + {\ell}^{2} \cdot \left(\frac{1}{3} + {\ell}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right)}{U}\right)}\right) \]
          2. +-lowering-+.f64N/A

            \[\leadsto \mathsf{*.f64}\left(U, \mathsf{+.f64}\left(1, \color{blue}{\left(\frac{J \cdot \left(\ell \cdot \left(\cos \left(\frac{1}{2} \cdot K\right) \cdot \left(2 + {\ell}^{2} \cdot \left(\frac{1}{3} + {\ell}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right)}{U}\right)}\right)\right) \]
          3. /-lowering-/.f64N/A

            \[\leadsto \mathsf{*.f64}\left(U, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\left(J \cdot \left(\ell \cdot \left(\cos \left(\frac{1}{2} \cdot K\right) \cdot \left(2 + {\ell}^{2} \cdot \left(\frac{1}{3} + {\ell}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right)\right), \color{blue}{U}\right)\right)\right) \]
        10. Simplified95.7%

          \[\leadsto \color{blue}{U \cdot \left(1 + \frac{\left(\cos \left(0.5 \cdot K\right) \cdot \ell\right) \cdot \left(\left(2 + \ell \cdot \left(\ell \cdot \left(0.3333333333333333 + \ell \cdot \left(\ell \cdot \left(0.016666666666666666 + \left(\ell \cdot \ell\right) \cdot 0.0003968253968253968\right)\right)\right)\right)\right) \cdot J\right)}{U}\right)} \]
        11. Taylor expanded in K around 0

          \[\leadsto \color{blue}{U \cdot \left(1 + \frac{J \cdot \left(\ell \cdot \left(2 + {\ell}^{2} \cdot \left(\frac{1}{3} + {\ell}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)}{U}\right)} \]
        12. Step-by-step derivation
          1. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(U, \color{blue}{\left(1 + \frac{J \cdot \left(\ell \cdot \left(2 + {\ell}^{2} \cdot \left(\frac{1}{3} + {\ell}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)}{U}\right)}\right) \]
          2. +-lowering-+.f64N/A

            \[\leadsto \mathsf{*.f64}\left(U, \mathsf{+.f64}\left(1, \color{blue}{\left(\frac{J \cdot \left(\ell \cdot \left(2 + {\ell}^{2} \cdot \left(\frac{1}{3} + {\ell}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)}{U}\right)}\right)\right) \]
          3. /-lowering-/.f64N/A

            \[\leadsto \mathsf{*.f64}\left(U, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\left(J \cdot \left(\ell \cdot \left(2 + {\ell}^{2} \cdot \left(\frac{1}{3} + {\ell}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right), \color{blue}{U}\right)\right)\right) \]
        13. Simplified79.0%

          \[\leadsto \color{blue}{U \cdot \left(1 + \frac{\ell \cdot \left(J \cdot \left(2 + \ell \cdot \left(\ell \cdot \left(0.3333333333333333 + \ell \cdot \left(\ell \cdot \left(0.016666666666666666 + \left(\ell \cdot \ell\right) \cdot 0.0003968253968253968\right)\right)\right)\right)\right)\right)}{U}\right)} \]
      11. Recombined 2 regimes into one program.
      12. Final simplification80.0%

        \[\leadsto \begin{array}{l} \mathbf{if}\;J \leq -6 \cdot 10^{+205}:\\ \;\;\;\;2 \cdot \left(\cos \left(K \cdot 0.5\right) \cdot \left(J \cdot \ell\right)\right)\\ \mathbf{elif}\;J \leq 6 \cdot 10^{+258}:\\ \;\;\;\;U \cdot \left(1 + \frac{\ell \cdot \left(J \cdot \left(2 + \ell \cdot \left(\ell \cdot \left(0.3333333333333333 + \ell \cdot \left(\ell \cdot \left(0.016666666666666666 + \left(\ell \cdot \ell\right) \cdot 0.0003968253968253968\right)\right)\right)\right)\right)\right)}{U}\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(\cos \left(K \cdot 0.5\right) \cdot \left(J \cdot \ell\right)\right)\\ \end{array} \]
      13. Add Preprocessing

      Alternative 16: 77.4% accurate, 9.2× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;\ell \leq 3.8 \cdot 10^{+47}:\\ \;\;\;\;U \cdot \left(1 + \frac{\ell \cdot \left(J \cdot \left(2 + \ell \cdot \left(\ell \cdot \left(0.3333333333333333 + \ell \cdot \left(\ell \cdot \left(0.016666666666666666 + \left(\ell \cdot \ell\right) \cdot 0.0003968253968253968\right)\right)\right)\right)\right)\right)}{U}\right)\\ \mathbf{else}:\\ \;\;\;\;J \cdot \left(\left(2 + \left(\ell \cdot \ell\right) \cdot \left(0.3333333333333333 + \left(\ell \cdot \ell\right) \cdot 0.016666666666666666\right)\right) \cdot \left(\ell \cdot \left(1 + -0.125 \cdot \left(K \cdot K\right)\right)\right)\right)\\ \end{array} \end{array} \]
      (FPCore (J l K U)
       :precision binary64
       (if (<= l 3.8e+47)
         (*
          U
          (+
           1.0
           (/
            (*
             l
             (*
              J
              (+
               2.0
               (*
                l
                (*
                 l
                 (+
                  0.3333333333333333
                  (*
                   l
                   (*
                    l
                    (+
                     0.016666666666666666
                     (* (* l l) 0.0003968253968253968))))))))))
            U)))
         (*
          J
          (*
           (+
            2.0
            (* (* l l) (+ 0.3333333333333333 (* (* l l) 0.016666666666666666))))
           (* l (+ 1.0 (* -0.125 (* K K))))))))
      double code(double J, double l, double K, double U) {
      	double tmp;
      	if (l <= 3.8e+47) {
      		tmp = U * (1.0 + ((l * (J * (2.0 + (l * (l * (0.3333333333333333 + (l * (l * (0.016666666666666666 + ((l * l) * 0.0003968253968253968)))))))))) / U));
      	} else {
      		tmp = J * ((2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * 0.016666666666666666)))) * (l * (1.0 + (-0.125 * (K * 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 <= 3.8d+47) then
              tmp = u * (1.0d0 + ((l * (j * (2.0d0 + (l * (l * (0.3333333333333333d0 + (l * (l * (0.016666666666666666d0 + ((l * l) * 0.0003968253968253968d0)))))))))) / u))
          else
              tmp = j * ((2.0d0 + ((l * l) * (0.3333333333333333d0 + ((l * l) * 0.016666666666666666d0)))) * (l * (1.0d0 + ((-0.125d0) * (k * k)))))
          end if
          code = tmp
      end function
      
      public static double code(double J, double l, double K, double U) {
      	double tmp;
      	if (l <= 3.8e+47) {
      		tmp = U * (1.0 + ((l * (J * (2.0 + (l * (l * (0.3333333333333333 + (l * (l * (0.016666666666666666 + ((l * l) * 0.0003968253968253968)))))))))) / U));
      	} else {
      		tmp = J * ((2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * 0.016666666666666666)))) * (l * (1.0 + (-0.125 * (K * K)))));
      	}
      	return tmp;
      }
      
      def code(J, l, K, U):
      	tmp = 0
      	if l <= 3.8e+47:
      		tmp = U * (1.0 + ((l * (J * (2.0 + (l * (l * (0.3333333333333333 + (l * (l * (0.016666666666666666 + ((l * l) * 0.0003968253968253968)))))))))) / U))
      	else:
      		tmp = J * ((2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * 0.016666666666666666)))) * (l * (1.0 + (-0.125 * (K * K)))))
      	return tmp
      
      function code(J, l, K, U)
      	tmp = 0.0
      	if (l <= 3.8e+47)
      		tmp = Float64(U * Float64(1.0 + Float64(Float64(l * Float64(J * Float64(2.0 + Float64(l * Float64(l * Float64(0.3333333333333333 + Float64(l * Float64(l * Float64(0.016666666666666666 + Float64(Float64(l * l) * 0.0003968253968253968)))))))))) / U)));
      	else
      		tmp = Float64(J * Float64(Float64(2.0 + Float64(Float64(l * l) * Float64(0.3333333333333333 + Float64(Float64(l * l) * 0.016666666666666666)))) * Float64(l * Float64(1.0 + Float64(-0.125 * Float64(K * K))))));
      	end
      	return tmp
      end
      
      function tmp_2 = code(J, l, K, U)
      	tmp = 0.0;
      	if (l <= 3.8e+47)
      		tmp = U * (1.0 + ((l * (J * (2.0 + (l * (l * (0.3333333333333333 + (l * (l * (0.016666666666666666 + ((l * l) * 0.0003968253968253968)))))))))) / U));
      	else
      		tmp = J * ((2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * 0.016666666666666666)))) * (l * (1.0 + (-0.125 * (K * K)))));
      	end
      	tmp_2 = tmp;
      end
      
      code[J_, l_, K_, U_] := If[LessEqual[l, 3.8e+47], N[(U * N[(1.0 + N[(N[(l * N[(J * N[(2.0 + N[(l * N[(l * N[(0.3333333333333333 + N[(l * N[(l * N[(0.016666666666666666 + N[(N[(l * l), $MachinePrecision] * 0.0003968253968253968), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(J * N[(N[(2.0 + N[(N[(l * l), $MachinePrecision] * N[(0.3333333333333333 + N[(N[(l * l), $MachinePrecision] * 0.016666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(l * N[(1.0 + N[(-0.125 * N[(K * K), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      \mathbf{if}\;\ell \leq 3.8 \cdot 10^{+47}:\\
      \;\;\;\;U \cdot \left(1 + \frac{\ell \cdot \left(J \cdot \left(2 + \ell \cdot \left(\ell \cdot \left(0.3333333333333333 + \ell \cdot \left(\ell \cdot \left(0.016666666666666666 + \left(\ell \cdot \ell\right) \cdot 0.0003968253968253968\right)\right)\right)\right)\right)\right)}{U}\right)\\
      
      \mathbf{else}:\\
      \;\;\;\;J \cdot \left(\left(2 + \left(\ell \cdot \ell\right) \cdot \left(0.3333333333333333 + \left(\ell \cdot \ell\right) \cdot 0.016666666666666666\right)\right) \cdot \left(\ell \cdot \left(1 + -0.125 \cdot \left(K \cdot K\right)\right)\right)\right)\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if l < 3.8000000000000003e47

        1. Initial program 86.0%

          \[\left(J \cdot \left(e^{\ell} - e^{-\ell}\right)\right) \cdot \cos \left(\frac{K}{2}\right) + U \]
        2. Step-by-step derivation
          1. +-lowering-+.f64N/A

            \[\leadsto \mathsf{+.f64}\left(\left(\left(J \cdot \left(e^{\ell} - e^{\mathsf{neg}\left(\ell\right)}\right)\right) \cdot \cos \left(\frac{K}{2}\right)\right), \color{blue}{U}\right) \]
          2. associate-*l*N/A

            \[\leadsto \mathsf{+.f64}\left(\left(J \cdot \left(\left(e^{\ell} - e^{\mathsf{neg}\left(\ell\right)}\right) \cdot \cos \left(\frac{K}{2}\right)\right)\right), U\right) \]
          3. *-commutativeN/A

            \[\leadsto \mathsf{+.f64}\left(\left(\left(\left(e^{\ell} - e^{\mathsf{neg}\left(\ell\right)}\right) \cdot \cos \left(\frac{K}{2}\right)\right) \cdot J\right), U\right) \]
          4. associate-*l*N/A

            \[\leadsto \mathsf{+.f64}\left(\left(\left(e^{\ell} - e^{\mathsf{neg}\left(\ell\right)}\right) \cdot \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
          5. *-lowering-*.f64N/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(e^{\ell} - e^{\mathsf{neg}\left(\ell\right)}\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
          6. sub-negN/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(e^{\ell} + \left(\mathsf{neg}\left(e^{\mathsf{neg}\left(\ell\right)}\right)\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
          7. +-lowering-+.f64N/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\left(e^{\ell}\right), \left(\mathsf{neg}\left(e^{\mathsf{neg}\left(\ell\right)}\right)\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
          8. exp-lowering-exp.f64N/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \left(\mathsf{neg}\left(e^{\mathsf{neg}\left(\ell\right)}\right)\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
          9. exp-negN/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \left(\mathsf{neg}\left(\frac{1}{e^{\ell}}\right)\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
          10. distribute-neg-fracN/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \left(\frac{\mathsf{neg}\left(1\right)}{e^{\ell}}\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
          11. metadata-evalN/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \left(\frac{-1}{e^{\ell}}\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
          12. /-lowering-/.f64N/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \mathsf{/.f64}\left(-1, \left(e^{\ell}\right)\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
          13. exp-lowering-exp.f64N/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \mathsf{/.f64}\left(-1, \mathsf{exp.f64}\left(\ell\right)\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
          14. *-commutativeN/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \mathsf{/.f64}\left(-1, \mathsf{exp.f64}\left(\ell\right)\right)\right), \left(J \cdot \cos \left(\frac{K}{2}\right)\right)\right), U\right) \]
          15. *-lowering-*.f64N/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \mathsf{/.f64}\left(-1, \mathsf{exp.f64}\left(\ell\right)\right)\right), \mathsf{*.f64}\left(J, \cos \left(\frac{K}{2}\right)\right)\right), U\right) \]
          16. cos-lowering-cos.f64N/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \mathsf{/.f64}\left(-1, \mathsf{exp.f64}\left(\ell\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\left(\frac{K}{2}\right)\right)\right)\right), U\right) \]
          17. /-lowering-/.f6486.0%

            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \mathsf{/.f64}\left(-1, \mathsf{exp.f64}\left(\ell\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
        3. Simplified86.0%

          \[\leadsto \color{blue}{\left(e^{\ell} + \frac{-1}{e^{\ell}}\right) \cdot \left(J \cdot \cos \left(\frac{K}{2}\right)\right) + U} \]
        4. Add Preprocessing
        5. Taylor expanded in l around 0

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\color{blue}{\left(\ell \cdot \left(2 + {\ell}^{2} \cdot \left(\frac{1}{3} + {\ell}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)}, \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
        6. Step-by-step derivation
          1. *-lowering-*.f64N/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \left(2 + {\ell}^{2} \cdot \left(\frac{1}{3} + {\ell}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
          2. +-lowering-+.f64N/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \left({\ell}^{2} \cdot \left(\frac{1}{3} + {\ell}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
          3. *-lowering-*.f64N/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\left({\ell}^{2}\right), \left(\frac{1}{3} + {\ell}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
          4. unpow2N/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\left(\ell \cdot \ell\right), \left(\frac{1}{3} + {\ell}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
          5. *-lowering-*.f64N/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \left(\frac{1}{3} + {\ell}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
          6. +-lowering-+.f64N/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \left({\ell}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
          7. unpow2N/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \left(\left(\ell \cdot \ell\right) \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
          8. associate-*l*N/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \left(\ell \cdot \left(\ell \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
          9. *-commutativeN/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \left(\ell \cdot \left(\left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right) \cdot \ell\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
          10. *-lowering-*.f64N/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\ell, \left(\left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right) \cdot \ell\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
          11. *-commutativeN/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\ell, \left(\ell \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
          12. *-lowering-*.f64N/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
          13. +-lowering-+.f64N/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(\frac{1}{60}, \left(\frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
          14. *-commutativeN/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(\frac{1}{60}, \left({\ell}^{2} \cdot \frac{1}{2520}\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
          15. *-lowering-*.f64N/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(\frac{1}{60}, \mathsf{*.f64}\left(\left({\ell}^{2}\right), \frac{1}{2520}\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
          16. unpow2N/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(\frac{1}{60}, \mathsf{*.f64}\left(\left(\ell \cdot \ell\right), \frac{1}{2520}\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
          17. *-lowering-*.f6494.1%

            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(\frac{1}{60}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \frac{1}{2520}\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
        7. Simplified94.1%

          \[\leadsto \color{blue}{\left(\ell \cdot \left(2 + \left(\ell \cdot \ell\right) \cdot \left(0.3333333333333333 + \ell \cdot \left(\ell \cdot \left(0.016666666666666666 + \left(\ell \cdot \ell\right) \cdot 0.0003968253968253968\right)\right)\right)\right)\right)} \cdot \left(J \cdot \cos \left(\frac{K}{2}\right)\right) + U \]
        8. Taylor expanded in U around inf

          \[\leadsto \color{blue}{U \cdot \left(1 + \frac{J \cdot \left(\ell \cdot \left(\cos \left(\frac{1}{2} \cdot K\right) \cdot \left(2 + {\ell}^{2} \cdot \left(\frac{1}{3} + {\ell}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right)}{U}\right)} \]
        9. Step-by-step derivation
          1. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(U, \color{blue}{\left(1 + \frac{J \cdot \left(\ell \cdot \left(\cos \left(\frac{1}{2} \cdot K\right) \cdot \left(2 + {\ell}^{2} \cdot \left(\frac{1}{3} + {\ell}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right)}{U}\right)}\right) \]
          2. +-lowering-+.f64N/A

            \[\leadsto \mathsf{*.f64}\left(U, \mathsf{+.f64}\left(1, \color{blue}{\left(\frac{J \cdot \left(\ell \cdot \left(\cos \left(\frac{1}{2} \cdot K\right) \cdot \left(2 + {\ell}^{2} \cdot \left(\frac{1}{3} + {\ell}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right)}{U}\right)}\right)\right) \]
          3. /-lowering-/.f64N/A

            \[\leadsto \mathsf{*.f64}\left(U, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\left(J \cdot \left(\ell \cdot \left(\cos \left(\frac{1}{2} \cdot K\right) \cdot \left(2 + {\ell}^{2} \cdot \left(\frac{1}{3} + {\ell}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right)\right), \color{blue}{U}\right)\right)\right) \]
        10. Simplified93.6%

          \[\leadsto \color{blue}{U \cdot \left(1 + \frac{\left(\cos \left(0.5 \cdot K\right) \cdot \ell\right) \cdot \left(\left(2 + \ell \cdot \left(\ell \cdot \left(0.3333333333333333 + \ell \cdot \left(\ell \cdot \left(0.016666666666666666 + \left(\ell \cdot \ell\right) \cdot 0.0003968253968253968\right)\right)\right)\right)\right) \cdot J\right)}{U}\right)} \]
        11. Taylor expanded in K around 0

          \[\leadsto \color{blue}{U \cdot \left(1 + \frac{J \cdot \left(\ell \cdot \left(2 + {\ell}^{2} \cdot \left(\frac{1}{3} + {\ell}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)}{U}\right)} \]
        12. Step-by-step derivation
          1. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(U, \color{blue}{\left(1 + \frac{J \cdot \left(\ell \cdot \left(2 + {\ell}^{2} \cdot \left(\frac{1}{3} + {\ell}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)}{U}\right)}\right) \]
          2. +-lowering-+.f64N/A

            \[\leadsto \mathsf{*.f64}\left(U, \mathsf{+.f64}\left(1, \color{blue}{\left(\frac{J \cdot \left(\ell \cdot \left(2 + {\ell}^{2} \cdot \left(\frac{1}{3} + {\ell}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)}{U}\right)}\right)\right) \]
          3. /-lowering-/.f64N/A

            \[\leadsto \mathsf{*.f64}\left(U, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\left(J \cdot \left(\ell \cdot \left(2 + {\ell}^{2} \cdot \left(\frac{1}{3} + {\ell}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right), \color{blue}{U}\right)\right)\right) \]
        13. Simplified78.7%

          \[\leadsto \color{blue}{U \cdot \left(1 + \frac{\ell \cdot \left(J \cdot \left(2 + \ell \cdot \left(\ell \cdot \left(0.3333333333333333 + \ell \cdot \left(\ell \cdot \left(0.016666666666666666 + \left(\ell \cdot \ell\right) \cdot 0.0003968253968253968\right)\right)\right)\right)\right)\right)}{U}\right)} \]

        if 3.8000000000000003e47 < l

        1. Initial program 100.0%

          \[\left(J \cdot \left(e^{\ell} - e^{-\ell}\right)\right) \cdot \cos \left(\frac{K}{2}\right) + U \]
        2. Step-by-step derivation
          1. +-lowering-+.f64N/A

            \[\leadsto \mathsf{+.f64}\left(\left(\left(J \cdot \left(e^{\ell} - e^{\mathsf{neg}\left(\ell\right)}\right)\right) \cdot \cos \left(\frac{K}{2}\right)\right), \color{blue}{U}\right) \]
          2. associate-*l*N/A

            \[\leadsto \mathsf{+.f64}\left(\left(J \cdot \left(\left(e^{\ell} - e^{\mathsf{neg}\left(\ell\right)}\right) \cdot \cos \left(\frac{K}{2}\right)\right)\right), U\right) \]
          3. *-commutativeN/A

            \[\leadsto \mathsf{+.f64}\left(\left(\left(\left(e^{\ell} - e^{\mathsf{neg}\left(\ell\right)}\right) \cdot \cos \left(\frac{K}{2}\right)\right) \cdot J\right), U\right) \]
          4. associate-*l*N/A

            \[\leadsto \mathsf{+.f64}\left(\left(\left(e^{\ell} - e^{\mathsf{neg}\left(\ell\right)}\right) \cdot \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
          5. *-lowering-*.f64N/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(e^{\ell} - e^{\mathsf{neg}\left(\ell\right)}\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
          6. sub-negN/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(e^{\ell} + \left(\mathsf{neg}\left(e^{\mathsf{neg}\left(\ell\right)}\right)\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
          7. +-lowering-+.f64N/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\left(e^{\ell}\right), \left(\mathsf{neg}\left(e^{\mathsf{neg}\left(\ell\right)}\right)\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
          8. exp-lowering-exp.f64N/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \left(\mathsf{neg}\left(e^{\mathsf{neg}\left(\ell\right)}\right)\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
          9. exp-negN/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \left(\mathsf{neg}\left(\frac{1}{e^{\ell}}\right)\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
          10. distribute-neg-fracN/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \left(\frac{\mathsf{neg}\left(1\right)}{e^{\ell}}\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
          11. metadata-evalN/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \left(\frac{-1}{e^{\ell}}\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
          12. /-lowering-/.f64N/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \mathsf{/.f64}\left(-1, \left(e^{\ell}\right)\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
          13. exp-lowering-exp.f64N/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \mathsf{/.f64}\left(-1, \mathsf{exp.f64}\left(\ell\right)\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
          14. *-commutativeN/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \mathsf{/.f64}\left(-1, \mathsf{exp.f64}\left(\ell\right)\right)\right), \left(J \cdot \cos \left(\frac{K}{2}\right)\right)\right), U\right) \]
          15. *-lowering-*.f64N/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \mathsf{/.f64}\left(-1, \mathsf{exp.f64}\left(\ell\right)\right)\right), \mathsf{*.f64}\left(J, \cos \left(\frac{K}{2}\right)\right)\right), U\right) \]
          16. cos-lowering-cos.f64N/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \mathsf{/.f64}\left(-1, \mathsf{exp.f64}\left(\ell\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\left(\frac{K}{2}\right)\right)\right)\right), U\right) \]
          17. /-lowering-/.f64100.0%

            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \mathsf{/.f64}\left(-1, \mathsf{exp.f64}\left(\ell\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
        3. Simplified100.0%

          \[\leadsto \color{blue}{\left(e^{\ell} + \frac{-1}{e^{\ell}}\right) \cdot \left(J \cdot \cos \left(\frac{K}{2}\right)\right) + U} \]
        4. Add Preprocessing
        5. Taylor expanded in l around 0

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\color{blue}{\left(\ell \cdot \left(2 + {\ell}^{2} \cdot \left(\frac{1}{3} + \frac{1}{60} \cdot {\ell}^{2}\right)\right)\right)}, \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
        6. Step-by-step derivation
          1. *-lowering-*.f64N/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \left(2 + {\ell}^{2} \cdot \left(\frac{1}{3} + \frac{1}{60} \cdot {\ell}^{2}\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
          2. +-lowering-+.f64N/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \left({\ell}^{2} \cdot \left(\frac{1}{3} + \frac{1}{60} \cdot {\ell}^{2}\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
          3. *-lowering-*.f64N/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\left({\ell}^{2}\right), \left(\frac{1}{3} + \frac{1}{60} \cdot {\ell}^{2}\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
          4. unpow2N/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\left(\ell \cdot \ell\right), \left(\frac{1}{3} + \frac{1}{60} \cdot {\ell}^{2}\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
          5. *-lowering-*.f64N/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \left(\frac{1}{3} + \frac{1}{60} \cdot {\ell}^{2}\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
          6. +-lowering-+.f64N/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \left(\frac{1}{60} \cdot {\ell}^{2}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
          7. *-commutativeN/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \left({\ell}^{2} \cdot \frac{1}{60}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
          8. *-lowering-*.f64N/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\left({\ell}^{2}\right), \frac{1}{60}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
          9. unpow2N/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\left(\ell \cdot \ell\right), \frac{1}{60}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
          10. *-lowering-*.f6498.3%

            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \frac{1}{60}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
        7. Simplified98.3%

          \[\leadsto \color{blue}{\left(\ell \cdot \left(2 + \left(\ell \cdot \ell\right) \cdot \left(0.3333333333333333 + \left(\ell \cdot \ell\right) \cdot 0.016666666666666666\right)\right)\right)} \cdot \left(J \cdot \cos \left(\frac{K}{2}\right)\right) + U \]
        8. Taylor expanded in K around 0

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \frac{1}{60}\right)\right)\right)\right)\right), \color{blue}{\left(J + \frac{-1}{8} \cdot \left(J \cdot {K}^{2}\right)\right)}\right), U\right) \]
        9. Step-by-step derivation
          1. associate-*r*N/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \frac{1}{60}\right)\right)\right)\right)\right), \left(J + \left(\frac{-1}{8} \cdot J\right) \cdot {K}^{2}\right)\right), U\right) \]
          2. +-lowering-+.f64N/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \frac{1}{60}\right)\right)\right)\right)\right), \mathsf{+.f64}\left(J, \left(\left(\frac{-1}{8} \cdot J\right) \cdot {K}^{2}\right)\right)\right), U\right) \]
          3. *-commutativeN/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \frac{1}{60}\right)\right)\right)\right)\right), \mathsf{+.f64}\left(J, \left(\left(J \cdot \frac{-1}{8}\right) \cdot {K}^{2}\right)\right)\right), U\right) \]
          4. associate-*l*N/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \frac{1}{60}\right)\right)\right)\right)\right), \mathsf{+.f64}\left(J, \left(J \cdot \left(\frac{-1}{8} \cdot {K}^{2}\right)\right)\right)\right), U\right) \]
          5. *-lowering-*.f64N/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \frac{1}{60}\right)\right)\right)\right)\right), \mathsf{+.f64}\left(J, \mathsf{*.f64}\left(J, \left(\frac{-1}{8} \cdot {K}^{2}\right)\right)\right)\right), U\right) \]
          6. *-lowering-*.f64N/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \frac{1}{60}\right)\right)\right)\right)\right), \mathsf{+.f64}\left(J, \mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\frac{-1}{8}, \left({K}^{2}\right)\right)\right)\right)\right), U\right) \]
          7. unpow2N/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \frac{1}{60}\right)\right)\right)\right)\right), \mathsf{+.f64}\left(J, \mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\frac{-1}{8}, \left(K \cdot K\right)\right)\right)\right)\right), U\right) \]
          8. *-lowering-*.f6475.0%

            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \frac{1}{60}\right)\right)\right)\right)\right), \mathsf{+.f64}\left(J, \mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{*.f64}\left(K, K\right)\right)\right)\right)\right), U\right) \]
        10. Simplified75.0%

          \[\leadsto \left(\ell \cdot \left(2 + \left(\ell \cdot \ell\right) \cdot \left(0.3333333333333333 + \left(\ell \cdot \ell\right) \cdot 0.016666666666666666\right)\right)\right) \cdot \color{blue}{\left(J + J \cdot \left(-0.125 \cdot \left(K \cdot K\right)\right)\right)} + U \]
        11. Taylor expanded in J around inf

          \[\leadsto \color{blue}{J \cdot \left(\ell \cdot \left(\left(1 + \frac{-1}{8} \cdot {K}^{2}\right) \cdot \left(2 + {\ell}^{2} \cdot \left(\frac{1}{3} + \frac{1}{60} \cdot {\ell}^{2}\right)\right)\right)\right)} \]
        12. Step-by-step derivation
          1. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(J, \color{blue}{\left(\ell \cdot \left(\left(1 + \frac{-1}{8} \cdot {K}^{2}\right) \cdot \left(2 + {\ell}^{2} \cdot \left(\frac{1}{3} + \frac{1}{60} \cdot {\ell}^{2}\right)\right)\right)\right)}\right) \]
          2. associate-*r*N/A

            \[\leadsto \mathsf{*.f64}\left(J, \left(\left(\ell \cdot \left(1 + \frac{-1}{8} \cdot {K}^{2}\right)\right) \cdot \color{blue}{\left(2 + {\ell}^{2} \cdot \left(\frac{1}{3} + \frac{1}{60} \cdot {\ell}^{2}\right)\right)}\right)\right) \]
          3. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\left(\ell \cdot \left(1 + \frac{-1}{8} \cdot {K}^{2}\right)\right), \color{blue}{\left(2 + {\ell}^{2} \cdot \left(\frac{1}{3} + \frac{1}{60} \cdot {\ell}^{2}\right)\right)}\right)\right) \]
          4. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \left(1 + \frac{-1}{8} \cdot {K}^{2}\right)\right), \left(\color{blue}{2} + {\ell}^{2} \cdot \left(\frac{1}{3} + \frac{1}{60} \cdot {\ell}^{2}\right)\right)\right)\right) \]
          5. +-lowering-+.f64N/A

            \[\leadsto \mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(1, \left(\frac{-1}{8} \cdot {K}^{2}\right)\right)\right), \left(2 + {\ell}^{2} \cdot \left(\frac{1}{3} + \frac{1}{60} \cdot {\ell}^{2}\right)\right)\right)\right) \]
          6. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{8}, \left({K}^{2}\right)\right)\right)\right), \left(2 + {\ell}^{2} \cdot \left(\frac{1}{3} + \frac{1}{60} \cdot {\ell}^{2}\right)\right)\right)\right) \]
          7. unpow2N/A

            \[\leadsto \mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{8}, \left(K \cdot K\right)\right)\right)\right), \left(2 + {\ell}^{2} \cdot \left(\frac{1}{3} + \frac{1}{60} \cdot {\ell}^{2}\right)\right)\right)\right) \]
          8. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{*.f64}\left(K, K\right)\right)\right)\right), \left(2 + {\ell}^{2} \cdot \left(\frac{1}{3} + \frac{1}{60} \cdot {\ell}^{2}\right)\right)\right)\right) \]
          9. +-lowering-+.f64N/A

            \[\leadsto \mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{*.f64}\left(K, K\right)\right)\right)\right), \mathsf{+.f64}\left(2, \color{blue}{\left({\ell}^{2} \cdot \left(\frac{1}{3} + \frac{1}{60} \cdot {\ell}^{2}\right)\right)}\right)\right)\right) \]
          10. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{*.f64}\left(K, K\right)\right)\right)\right), \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\left({\ell}^{2}\right), \color{blue}{\left(\frac{1}{3} + \frac{1}{60} \cdot {\ell}^{2}\right)}\right)\right)\right)\right) \]
          11. unpow2N/A

            \[\leadsto \mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{*.f64}\left(K, K\right)\right)\right)\right), \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\left(\ell \cdot \ell\right), \left(\color{blue}{\frac{1}{3}} + \frac{1}{60} \cdot {\ell}^{2}\right)\right)\right)\right)\right) \]
          12. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{*.f64}\left(K, K\right)\right)\right)\right), \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \left(\color{blue}{\frac{1}{3}} + \frac{1}{60} \cdot {\ell}^{2}\right)\right)\right)\right)\right) \]
          13. +-lowering-+.f64N/A

            \[\leadsto \mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{*.f64}\left(K, K\right)\right)\right)\right), \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \color{blue}{\left(\frac{1}{60} \cdot {\ell}^{2}\right)}\right)\right)\right)\right)\right) \]
          14. *-commutativeN/A

            \[\leadsto \mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{*.f64}\left(K, K\right)\right)\right)\right), \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \left({\ell}^{2} \cdot \color{blue}{\frac{1}{60}}\right)\right)\right)\right)\right)\right) \]
          15. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{*.f64}\left(K, K\right)\right)\right)\right), \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\left({\ell}^{2}\right), \color{blue}{\frac{1}{60}}\right)\right)\right)\right)\right)\right) \]
          16. unpow2N/A

            \[\leadsto \mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{*.f64}\left(K, K\right)\right)\right)\right), \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\left(\ell \cdot \ell\right), \frac{1}{60}\right)\right)\right)\right)\right)\right) \]
          17. *-lowering-*.f6475.0%

            \[\leadsto \mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{*.f64}\left(K, K\right)\right)\right)\right), \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \frac{1}{60}\right)\right)\right)\right)\right)\right) \]
        13. Simplified75.0%

          \[\leadsto \color{blue}{J \cdot \left(\left(\ell \cdot \left(1 + -0.125 \cdot \left(K \cdot K\right)\right)\right) \cdot \left(2 + \left(\ell \cdot \ell\right) \cdot \left(0.3333333333333333 + \left(\ell \cdot \ell\right) \cdot 0.016666666666666666\right)\right)\right)} \]
      3. Recombined 2 regimes into one program.
      4. Final simplification77.8%

        \[\leadsto \begin{array}{l} \mathbf{if}\;\ell \leq 3.8 \cdot 10^{+47}:\\ \;\;\;\;U \cdot \left(1 + \frac{\ell \cdot \left(J \cdot \left(2 + \ell \cdot \left(\ell \cdot \left(0.3333333333333333 + \ell \cdot \left(\ell \cdot \left(0.016666666666666666 + \left(\ell \cdot \ell\right) \cdot 0.0003968253968253968\right)\right)\right)\right)\right)\right)}{U}\right)\\ \mathbf{else}:\\ \;\;\;\;J \cdot \left(\left(2 + \left(\ell \cdot \ell\right) \cdot \left(0.3333333333333333 + \left(\ell \cdot \ell\right) \cdot 0.016666666666666666\right)\right) \cdot \left(\ell \cdot \left(1 + -0.125 \cdot \left(K \cdot K\right)\right)\right)\right)\\ \end{array} \]
      5. Add Preprocessing

      Alternative 17: 78.1% accurate, 10.4× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;\ell \leq 2.65 \cdot 10^{+50}:\\ \;\;\;\;U + J \cdot \left(\ell \cdot \left(2 + \left(\ell \cdot \ell\right) \cdot \left(0.3333333333333333 + \ell \cdot \left(\ell \cdot \left(0.016666666666666666 + \left(\ell \cdot \ell\right) \cdot 0.0003968253968253968\right)\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;J \cdot \left(\left(2 + \left(\ell \cdot \ell\right) \cdot \left(0.3333333333333333 + \left(\ell \cdot \ell\right) \cdot 0.016666666666666666\right)\right) \cdot \left(\ell \cdot \left(1 + -0.125 \cdot \left(K \cdot K\right)\right)\right)\right)\\ \end{array} \end{array} \]
      (FPCore (J l K U)
       :precision binary64
       (if (<= l 2.65e+50)
         (+
          U
          (*
           J
           (*
            l
            (+
             2.0
             (*
              (* l l)
              (+
               0.3333333333333333
               (*
                l
                (*
                 l
                 (+ 0.016666666666666666 (* (* l l) 0.0003968253968253968))))))))))
         (*
          J
          (*
           (+
            2.0
            (* (* l l) (+ 0.3333333333333333 (* (* l l) 0.016666666666666666))))
           (* l (+ 1.0 (* -0.125 (* K K))))))))
      double code(double J, double l, double K, double U) {
      	double tmp;
      	if (l <= 2.65e+50) {
      		tmp = U + (J * (l * (2.0 + ((l * l) * (0.3333333333333333 + (l * (l * (0.016666666666666666 + ((l * l) * 0.0003968253968253968)))))))));
      	} else {
      		tmp = J * ((2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * 0.016666666666666666)))) * (l * (1.0 + (-0.125 * (K * 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 <= 2.65d+50) then
              tmp = u + (j * (l * (2.0d0 + ((l * l) * (0.3333333333333333d0 + (l * (l * (0.016666666666666666d0 + ((l * l) * 0.0003968253968253968d0)))))))))
          else
              tmp = j * ((2.0d0 + ((l * l) * (0.3333333333333333d0 + ((l * l) * 0.016666666666666666d0)))) * (l * (1.0d0 + ((-0.125d0) * (k * k)))))
          end if
          code = tmp
      end function
      
      public static double code(double J, double l, double K, double U) {
      	double tmp;
      	if (l <= 2.65e+50) {
      		tmp = U + (J * (l * (2.0 + ((l * l) * (0.3333333333333333 + (l * (l * (0.016666666666666666 + ((l * l) * 0.0003968253968253968)))))))));
      	} else {
      		tmp = J * ((2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * 0.016666666666666666)))) * (l * (1.0 + (-0.125 * (K * K)))));
      	}
      	return tmp;
      }
      
      def code(J, l, K, U):
      	tmp = 0
      	if l <= 2.65e+50:
      		tmp = U + (J * (l * (2.0 + ((l * l) * (0.3333333333333333 + (l * (l * (0.016666666666666666 + ((l * l) * 0.0003968253968253968)))))))))
      	else:
      		tmp = J * ((2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * 0.016666666666666666)))) * (l * (1.0 + (-0.125 * (K * K)))))
      	return tmp
      
      function code(J, l, K, U)
      	tmp = 0.0
      	if (l <= 2.65e+50)
      		tmp = Float64(U + Float64(J * Float64(l * Float64(2.0 + Float64(Float64(l * l) * Float64(0.3333333333333333 + Float64(l * Float64(l * Float64(0.016666666666666666 + Float64(Float64(l * l) * 0.0003968253968253968))))))))));
      	else
      		tmp = Float64(J * Float64(Float64(2.0 + Float64(Float64(l * l) * Float64(0.3333333333333333 + Float64(Float64(l * l) * 0.016666666666666666)))) * Float64(l * Float64(1.0 + Float64(-0.125 * Float64(K * K))))));
      	end
      	return tmp
      end
      
      function tmp_2 = code(J, l, K, U)
      	tmp = 0.0;
      	if (l <= 2.65e+50)
      		tmp = U + (J * (l * (2.0 + ((l * l) * (0.3333333333333333 + (l * (l * (0.016666666666666666 + ((l * l) * 0.0003968253968253968)))))))));
      	else
      		tmp = J * ((2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * 0.016666666666666666)))) * (l * (1.0 + (-0.125 * (K * K)))));
      	end
      	tmp_2 = tmp;
      end
      
      code[J_, l_, K_, U_] := If[LessEqual[l, 2.65e+50], N[(U + N[(J * N[(l * N[(2.0 + N[(N[(l * l), $MachinePrecision] * N[(0.3333333333333333 + N[(l * N[(l * N[(0.016666666666666666 + N[(N[(l * l), $MachinePrecision] * 0.0003968253968253968), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(J * N[(N[(2.0 + N[(N[(l * l), $MachinePrecision] * N[(0.3333333333333333 + N[(N[(l * l), $MachinePrecision] * 0.016666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(l * N[(1.0 + N[(-0.125 * N[(K * K), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      \mathbf{if}\;\ell \leq 2.65 \cdot 10^{+50}:\\
      \;\;\;\;U + J \cdot \left(\ell \cdot \left(2 + \left(\ell \cdot \ell\right) \cdot \left(0.3333333333333333 + \ell \cdot \left(\ell \cdot \left(0.016666666666666666 + \left(\ell \cdot \ell\right) \cdot 0.0003968253968253968\right)\right)\right)\right)\right)\\
      
      \mathbf{else}:\\
      \;\;\;\;J \cdot \left(\left(2 + \left(\ell \cdot \ell\right) \cdot \left(0.3333333333333333 + \left(\ell \cdot \ell\right) \cdot 0.016666666666666666\right)\right) \cdot \left(\ell \cdot \left(1 + -0.125 \cdot \left(K \cdot K\right)\right)\right)\right)\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if l < 2.6500000000000001e50

        1. Initial program 86.0%

          \[\left(J \cdot \left(e^{\ell} - e^{-\ell}\right)\right) \cdot \cos \left(\frac{K}{2}\right) + U \]
        2. Step-by-step derivation
          1. +-lowering-+.f64N/A

            \[\leadsto \mathsf{+.f64}\left(\left(\left(J \cdot \left(e^{\ell} - e^{\mathsf{neg}\left(\ell\right)}\right)\right) \cdot \cos \left(\frac{K}{2}\right)\right), \color{blue}{U}\right) \]
          2. associate-*l*N/A

            \[\leadsto \mathsf{+.f64}\left(\left(J \cdot \left(\left(e^{\ell} - e^{\mathsf{neg}\left(\ell\right)}\right) \cdot \cos \left(\frac{K}{2}\right)\right)\right), U\right) \]
          3. *-commutativeN/A

            \[\leadsto \mathsf{+.f64}\left(\left(\left(\left(e^{\ell} - e^{\mathsf{neg}\left(\ell\right)}\right) \cdot \cos \left(\frac{K}{2}\right)\right) \cdot J\right), U\right) \]
          4. associate-*l*N/A

            \[\leadsto \mathsf{+.f64}\left(\left(\left(e^{\ell} - e^{\mathsf{neg}\left(\ell\right)}\right) \cdot \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
          5. *-lowering-*.f64N/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(e^{\ell} - e^{\mathsf{neg}\left(\ell\right)}\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
          6. sub-negN/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(e^{\ell} + \left(\mathsf{neg}\left(e^{\mathsf{neg}\left(\ell\right)}\right)\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
          7. +-lowering-+.f64N/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\left(e^{\ell}\right), \left(\mathsf{neg}\left(e^{\mathsf{neg}\left(\ell\right)}\right)\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
          8. exp-lowering-exp.f64N/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \left(\mathsf{neg}\left(e^{\mathsf{neg}\left(\ell\right)}\right)\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
          9. exp-negN/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \left(\mathsf{neg}\left(\frac{1}{e^{\ell}}\right)\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
          10. distribute-neg-fracN/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \left(\frac{\mathsf{neg}\left(1\right)}{e^{\ell}}\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
          11. metadata-evalN/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \left(\frac{-1}{e^{\ell}}\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
          12. /-lowering-/.f64N/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \mathsf{/.f64}\left(-1, \left(e^{\ell}\right)\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
          13. exp-lowering-exp.f64N/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \mathsf{/.f64}\left(-1, \mathsf{exp.f64}\left(\ell\right)\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
          14. *-commutativeN/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \mathsf{/.f64}\left(-1, \mathsf{exp.f64}\left(\ell\right)\right)\right), \left(J \cdot \cos \left(\frac{K}{2}\right)\right)\right), U\right) \]
          15. *-lowering-*.f64N/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \mathsf{/.f64}\left(-1, \mathsf{exp.f64}\left(\ell\right)\right)\right), \mathsf{*.f64}\left(J, \cos \left(\frac{K}{2}\right)\right)\right), U\right) \]
          16. cos-lowering-cos.f64N/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \mathsf{/.f64}\left(-1, \mathsf{exp.f64}\left(\ell\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\left(\frac{K}{2}\right)\right)\right)\right), U\right) \]
          17. /-lowering-/.f6486.0%

            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \mathsf{/.f64}\left(-1, \mathsf{exp.f64}\left(\ell\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
        3. Simplified86.0%

          \[\leadsto \color{blue}{\left(e^{\ell} + \frac{-1}{e^{\ell}}\right) \cdot \left(J \cdot \cos \left(\frac{K}{2}\right)\right) + U} \]
        4. Add Preprocessing
        5. Taylor expanded in l around 0

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\color{blue}{\left(\ell \cdot \left(2 + {\ell}^{2} \cdot \left(\frac{1}{3} + {\ell}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)}, \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
        6. Step-by-step derivation
          1. *-lowering-*.f64N/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \left(2 + {\ell}^{2} \cdot \left(\frac{1}{3} + {\ell}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
          2. +-lowering-+.f64N/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \left({\ell}^{2} \cdot \left(\frac{1}{3} + {\ell}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
          3. *-lowering-*.f64N/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\left({\ell}^{2}\right), \left(\frac{1}{3} + {\ell}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
          4. unpow2N/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\left(\ell \cdot \ell\right), \left(\frac{1}{3} + {\ell}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
          5. *-lowering-*.f64N/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \left(\frac{1}{3} + {\ell}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
          6. +-lowering-+.f64N/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \left({\ell}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
          7. unpow2N/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \left(\left(\ell \cdot \ell\right) \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
          8. associate-*l*N/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \left(\ell \cdot \left(\ell \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
          9. *-commutativeN/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \left(\ell \cdot \left(\left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right) \cdot \ell\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
          10. *-lowering-*.f64N/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\ell, \left(\left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right) \cdot \ell\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
          11. *-commutativeN/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\ell, \left(\ell \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
          12. *-lowering-*.f64N/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
          13. +-lowering-+.f64N/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(\frac{1}{60}, \left(\frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
          14. *-commutativeN/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(\frac{1}{60}, \left({\ell}^{2} \cdot \frac{1}{2520}\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
          15. *-lowering-*.f64N/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(\frac{1}{60}, \mathsf{*.f64}\left(\left({\ell}^{2}\right), \frac{1}{2520}\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
          16. unpow2N/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(\frac{1}{60}, \mathsf{*.f64}\left(\left(\ell \cdot \ell\right), \frac{1}{2520}\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
          17. *-lowering-*.f6494.1%

            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(\frac{1}{60}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \frac{1}{2520}\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
        7. Simplified94.1%

          \[\leadsto \color{blue}{\left(\ell \cdot \left(2 + \left(\ell \cdot \ell\right) \cdot \left(0.3333333333333333 + \ell \cdot \left(\ell \cdot \left(0.016666666666666666 + \left(\ell \cdot \ell\right) \cdot 0.0003968253968253968\right)\right)\right)\right)\right)} \cdot \left(J \cdot \cos \left(\frac{K}{2}\right)\right) + U \]
        8. Taylor expanded in K around 0

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(\frac{1}{60}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \frac{1}{2520}\right)\right)\right)\right)\right)\right)\right)\right), \color{blue}{J}\right), U\right) \]
        9. Step-by-step derivation
          1. Simplified77.9%

            \[\leadsto \left(\ell \cdot \left(2 + \left(\ell \cdot \ell\right) \cdot \left(0.3333333333333333 + \ell \cdot \left(\ell \cdot \left(0.016666666666666666 + \left(\ell \cdot \ell\right) \cdot 0.0003968253968253968\right)\right)\right)\right)\right) \cdot \color{blue}{J} + U \]

          if 2.6500000000000001e50 < l

          1. Initial program 100.0%

            \[\left(J \cdot \left(e^{\ell} - e^{-\ell}\right)\right) \cdot \cos \left(\frac{K}{2}\right) + U \]
          2. Step-by-step derivation
            1. +-lowering-+.f64N/A

              \[\leadsto \mathsf{+.f64}\left(\left(\left(J \cdot \left(e^{\ell} - e^{\mathsf{neg}\left(\ell\right)}\right)\right) \cdot \cos \left(\frac{K}{2}\right)\right), \color{blue}{U}\right) \]
            2. associate-*l*N/A

              \[\leadsto \mathsf{+.f64}\left(\left(J \cdot \left(\left(e^{\ell} - e^{\mathsf{neg}\left(\ell\right)}\right) \cdot \cos \left(\frac{K}{2}\right)\right)\right), U\right) \]
            3. *-commutativeN/A

              \[\leadsto \mathsf{+.f64}\left(\left(\left(\left(e^{\ell} - e^{\mathsf{neg}\left(\ell\right)}\right) \cdot \cos \left(\frac{K}{2}\right)\right) \cdot J\right), U\right) \]
            4. associate-*l*N/A

              \[\leadsto \mathsf{+.f64}\left(\left(\left(e^{\ell} - e^{\mathsf{neg}\left(\ell\right)}\right) \cdot \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
            5. *-lowering-*.f64N/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(e^{\ell} - e^{\mathsf{neg}\left(\ell\right)}\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
            6. sub-negN/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(e^{\ell} + \left(\mathsf{neg}\left(e^{\mathsf{neg}\left(\ell\right)}\right)\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
            7. +-lowering-+.f64N/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\left(e^{\ell}\right), \left(\mathsf{neg}\left(e^{\mathsf{neg}\left(\ell\right)}\right)\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
            8. exp-lowering-exp.f64N/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \left(\mathsf{neg}\left(e^{\mathsf{neg}\left(\ell\right)}\right)\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
            9. exp-negN/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \left(\mathsf{neg}\left(\frac{1}{e^{\ell}}\right)\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
            10. distribute-neg-fracN/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \left(\frac{\mathsf{neg}\left(1\right)}{e^{\ell}}\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
            11. metadata-evalN/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \left(\frac{-1}{e^{\ell}}\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
            12. /-lowering-/.f64N/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \mathsf{/.f64}\left(-1, \left(e^{\ell}\right)\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
            13. exp-lowering-exp.f64N/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \mathsf{/.f64}\left(-1, \mathsf{exp.f64}\left(\ell\right)\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
            14. *-commutativeN/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \mathsf{/.f64}\left(-1, \mathsf{exp.f64}\left(\ell\right)\right)\right), \left(J \cdot \cos \left(\frac{K}{2}\right)\right)\right), U\right) \]
            15. *-lowering-*.f64N/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \mathsf{/.f64}\left(-1, \mathsf{exp.f64}\left(\ell\right)\right)\right), \mathsf{*.f64}\left(J, \cos \left(\frac{K}{2}\right)\right)\right), U\right) \]
            16. cos-lowering-cos.f64N/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \mathsf{/.f64}\left(-1, \mathsf{exp.f64}\left(\ell\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\left(\frac{K}{2}\right)\right)\right)\right), U\right) \]
            17. /-lowering-/.f64100.0%

              \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \mathsf{/.f64}\left(-1, \mathsf{exp.f64}\left(\ell\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
          3. Simplified100.0%

            \[\leadsto \color{blue}{\left(e^{\ell} + \frac{-1}{e^{\ell}}\right) \cdot \left(J \cdot \cos \left(\frac{K}{2}\right)\right) + U} \]
          4. Add Preprocessing
          5. Taylor expanded in l around 0

            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\color{blue}{\left(\ell \cdot \left(2 + {\ell}^{2} \cdot \left(\frac{1}{3} + \frac{1}{60} \cdot {\ell}^{2}\right)\right)\right)}, \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
          6. Step-by-step derivation
            1. *-lowering-*.f64N/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \left(2 + {\ell}^{2} \cdot \left(\frac{1}{3} + \frac{1}{60} \cdot {\ell}^{2}\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
            2. +-lowering-+.f64N/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \left({\ell}^{2} \cdot \left(\frac{1}{3} + \frac{1}{60} \cdot {\ell}^{2}\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
            3. *-lowering-*.f64N/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\left({\ell}^{2}\right), \left(\frac{1}{3} + \frac{1}{60} \cdot {\ell}^{2}\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
            4. unpow2N/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\left(\ell \cdot \ell\right), \left(\frac{1}{3} + \frac{1}{60} \cdot {\ell}^{2}\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
            5. *-lowering-*.f64N/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \left(\frac{1}{3} + \frac{1}{60} \cdot {\ell}^{2}\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
            6. +-lowering-+.f64N/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \left(\frac{1}{60} \cdot {\ell}^{2}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
            7. *-commutativeN/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \left({\ell}^{2} \cdot \frac{1}{60}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
            8. *-lowering-*.f64N/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\left({\ell}^{2}\right), \frac{1}{60}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
            9. unpow2N/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\left(\ell \cdot \ell\right), \frac{1}{60}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
            10. *-lowering-*.f6498.3%

              \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \frac{1}{60}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
          7. Simplified98.3%

            \[\leadsto \color{blue}{\left(\ell \cdot \left(2 + \left(\ell \cdot \ell\right) \cdot \left(0.3333333333333333 + \left(\ell \cdot \ell\right) \cdot 0.016666666666666666\right)\right)\right)} \cdot \left(J \cdot \cos \left(\frac{K}{2}\right)\right) + U \]
          8. Taylor expanded in K around 0

            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \frac{1}{60}\right)\right)\right)\right)\right), \color{blue}{\left(J + \frac{-1}{8} \cdot \left(J \cdot {K}^{2}\right)\right)}\right), U\right) \]
          9. Step-by-step derivation
            1. associate-*r*N/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \frac{1}{60}\right)\right)\right)\right)\right), \left(J + \left(\frac{-1}{8} \cdot J\right) \cdot {K}^{2}\right)\right), U\right) \]
            2. +-lowering-+.f64N/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \frac{1}{60}\right)\right)\right)\right)\right), \mathsf{+.f64}\left(J, \left(\left(\frac{-1}{8} \cdot J\right) \cdot {K}^{2}\right)\right)\right), U\right) \]
            3. *-commutativeN/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \frac{1}{60}\right)\right)\right)\right)\right), \mathsf{+.f64}\left(J, \left(\left(J \cdot \frac{-1}{8}\right) \cdot {K}^{2}\right)\right)\right), U\right) \]
            4. associate-*l*N/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \frac{1}{60}\right)\right)\right)\right)\right), \mathsf{+.f64}\left(J, \left(J \cdot \left(\frac{-1}{8} \cdot {K}^{2}\right)\right)\right)\right), U\right) \]
            5. *-lowering-*.f64N/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \frac{1}{60}\right)\right)\right)\right)\right), \mathsf{+.f64}\left(J, \mathsf{*.f64}\left(J, \left(\frac{-1}{8} \cdot {K}^{2}\right)\right)\right)\right), U\right) \]
            6. *-lowering-*.f64N/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \frac{1}{60}\right)\right)\right)\right)\right), \mathsf{+.f64}\left(J, \mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\frac{-1}{8}, \left({K}^{2}\right)\right)\right)\right)\right), U\right) \]
            7. unpow2N/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \frac{1}{60}\right)\right)\right)\right)\right), \mathsf{+.f64}\left(J, \mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\frac{-1}{8}, \left(K \cdot K\right)\right)\right)\right)\right), U\right) \]
            8. *-lowering-*.f6475.0%

              \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \frac{1}{60}\right)\right)\right)\right)\right), \mathsf{+.f64}\left(J, \mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{*.f64}\left(K, K\right)\right)\right)\right)\right), U\right) \]
          10. Simplified75.0%

            \[\leadsto \left(\ell \cdot \left(2 + \left(\ell \cdot \ell\right) \cdot \left(0.3333333333333333 + \left(\ell \cdot \ell\right) \cdot 0.016666666666666666\right)\right)\right) \cdot \color{blue}{\left(J + J \cdot \left(-0.125 \cdot \left(K \cdot K\right)\right)\right)} + U \]
          11. Taylor expanded in J around inf

            \[\leadsto \color{blue}{J \cdot \left(\ell \cdot \left(\left(1 + \frac{-1}{8} \cdot {K}^{2}\right) \cdot \left(2 + {\ell}^{2} \cdot \left(\frac{1}{3} + \frac{1}{60} \cdot {\ell}^{2}\right)\right)\right)\right)} \]
          12. Step-by-step derivation
            1. *-lowering-*.f64N/A

              \[\leadsto \mathsf{*.f64}\left(J, \color{blue}{\left(\ell \cdot \left(\left(1 + \frac{-1}{8} \cdot {K}^{2}\right) \cdot \left(2 + {\ell}^{2} \cdot \left(\frac{1}{3} + \frac{1}{60} \cdot {\ell}^{2}\right)\right)\right)\right)}\right) \]
            2. associate-*r*N/A

              \[\leadsto \mathsf{*.f64}\left(J, \left(\left(\ell \cdot \left(1 + \frac{-1}{8} \cdot {K}^{2}\right)\right) \cdot \color{blue}{\left(2 + {\ell}^{2} \cdot \left(\frac{1}{3} + \frac{1}{60} \cdot {\ell}^{2}\right)\right)}\right)\right) \]
            3. *-lowering-*.f64N/A

              \[\leadsto \mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\left(\ell \cdot \left(1 + \frac{-1}{8} \cdot {K}^{2}\right)\right), \color{blue}{\left(2 + {\ell}^{2} \cdot \left(\frac{1}{3} + \frac{1}{60} \cdot {\ell}^{2}\right)\right)}\right)\right) \]
            4. *-lowering-*.f64N/A

              \[\leadsto \mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \left(1 + \frac{-1}{8} \cdot {K}^{2}\right)\right), \left(\color{blue}{2} + {\ell}^{2} \cdot \left(\frac{1}{3} + \frac{1}{60} \cdot {\ell}^{2}\right)\right)\right)\right) \]
            5. +-lowering-+.f64N/A

              \[\leadsto \mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(1, \left(\frac{-1}{8} \cdot {K}^{2}\right)\right)\right), \left(2 + {\ell}^{2} \cdot \left(\frac{1}{3} + \frac{1}{60} \cdot {\ell}^{2}\right)\right)\right)\right) \]
            6. *-lowering-*.f64N/A

              \[\leadsto \mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{8}, \left({K}^{2}\right)\right)\right)\right), \left(2 + {\ell}^{2} \cdot \left(\frac{1}{3} + \frac{1}{60} \cdot {\ell}^{2}\right)\right)\right)\right) \]
            7. unpow2N/A

              \[\leadsto \mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{8}, \left(K \cdot K\right)\right)\right)\right), \left(2 + {\ell}^{2} \cdot \left(\frac{1}{3} + \frac{1}{60} \cdot {\ell}^{2}\right)\right)\right)\right) \]
            8. *-lowering-*.f64N/A

              \[\leadsto \mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{*.f64}\left(K, K\right)\right)\right)\right), \left(2 + {\ell}^{2} \cdot \left(\frac{1}{3} + \frac{1}{60} \cdot {\ell}^{2}\right)\right)\right)\right) \]
            9. +-lowering-+.f64N/A

              \[\leadsto \mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{*.f64}\left(K, K\right)\right)\right)\right), \mathsf{+.f64}\left(2, \color{blue}{\left({\ell}^{2} \cdot \left(\frac{1}{3} + \frac{1}{60} \cdot {\ell}^{2}\right)\right)}\right)\right)\right) \]
            10. *-lowering-*.f64N/A

              \[\leadsto \mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{*.f64}\left(K, K\right)\right)\right)\right), \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\left({\ell}^{2}\right), \color{blue}{\left(\frac{1}{3} + \frac{1}{60} \cdot {\ell}^{2}\right)}\right)\right)\right)\right) \]
            11. unpow2N/A

              \[\leadsto \mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{*.f64}\left(K, K\right)\right)\right)\right), \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\left(\ell \cdot \ell\right), \left(\color{blue}{\frac{1}{3}} + \frac{1}{60} \cdot {\ell}^{2}\right)\right)\right)\right)\right) \]
            12. *-lowering-*.f64N/A

              \[\leadsto \mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{*.f64}\left(K, K\right)\right)\right)\right), \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \left(\color{blue}{\frac{1}{3}} + \frac{1}{60} \cdot {\ell}^{2}\right)\right)\right)\right)\right) \]
            13. +-lowering-+.f64N/A

              \[\leadsto \mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{*.f64}\left(K, K\right)\right)\right)\right), \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \color{blue}{\left(\frac{1}{60} \cdot {\ell}^{2}\right)}\right)\right)\right)\right)\right) \]
            14. *-commutativeN/A

              \[\leadsto \mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{*.f64}\left(K, K\right)\right)\right)\right), \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \left({\ell}^{2} \cdot \color{blue}{\frac{1}{60}}\right)\right)\right)\right)\right)\right) \]
            15. *-lowering-*.f64N/A

              \[\leadsto \mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{*.f64}\left(K, K\right)\right)\right)\right), \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\left({\ell}^{2}\right), \color{blue}{\frac{1}{60}}\right)\right)\right)\right)\right)\right) \]
            16. unpow2N/A

              \[\leadsto \mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{*.f64}\left(K, K\right)\right)\right)\right), \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\left(\ell \cdot \ell\right), \frac{1}{60}\right)\right)\right)\right)\right)\right) \]
            17. *-lowering-*.f6475.0%

              \[\leadsto \mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{*.f64}\left(K, K\right)\right)\right)\right), \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \frac{1}{60}\right)\right)\right)\right)\right)\right) \]
          13. Simplified75.0%

            \[\leadsto \color{blue}{J \cdot \left(\left(\ell \cdot \left(1 + -0.125 \cdot \left(K \cdot K\right)\right)\right) \cdot \left(2 + \left(\ell \cdot \ell\right) \cdot \left(0.3333333333333333 + \left(\ell \cdot \ell\right) \cdot 0.016666666666666666\right)\right)\right)} \]
        10. Recombined 2 regimes into one program.
        11. Final simplification77.2%

          \[\leadsto \begin{array}{l} \mathbf{if}\;\ell \leq 2.65 \cdot 10^{+50}:\\ \;\;\;\;U + J \cdot \left(\ell \cdot \left(2 + \left(\ell \cdot \ell\right) \cdot \left(0.3333333333333333 + \ell \cdot \left(\ell \cdot \left(0.016666666666666666 + \left(\ell \cdot \ell\right) \cdot 0.0003968253968253968\right)\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;J \cdot \left(\left(2 + \left(\ell \cdot \ell\right) \cdot \left(0.3333333333333333 + \left(\ell \cdot \ell\right) \cdot 0.016666666666666666\right)\right) \cdot \left(\ell \cdot \left(1 + -0.125 \cdot \left(K \cdot K\right)\right)\right)\right)\\ \end{array} \]
        12. Add Preprocessing

        Alternative 18: 77.7% accurate, 10.4× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;\ell \leq 1.8 \cdot 10^{+44}:\\ \;\;\;\;U + \ell \cdot \left(J \cdot \left(2 + \ell \cdot \left(\ell \cdot \left(0.3333333333333333 + \ell \cdot \left(\ell \cdot \left(0.016666666666666666 + \left(\ell \cdot \ell\right) \cdot 0.0003968253968253968\right)\right)\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;J \cdot \left(\left(2 + \left(\ell \cdot \ell\right) \cdot \left(0.3333333333333333 + \left(\ell \cdot \ell\right) \cdot 0.016666666666666666\right)\right) \cdot \left(\ell \cdot \left(1 + -0.125 \cdot \left(K \cdot K\right)\right)\right)\right)\\ \end{array} \end{array} \]
        (FPCore (J l K U)
         :precision binary64
         (if (<= l 1.8e+44)
           (+
            U
            (*
             l
             (*
              J
              (+
               2.0
               (*
                l
                (*
                 l
                 (+
                  0.3333333333333333
                  (*
                   l
                   (*
                    l
                    (+ 0.016666666666666666 (* (* l l) 0.0003968253968253968)))))))))))
           (*
            J
            (*
             (+
              2.0
              (* (* l l) (+ 0.3333333333333333 (* (* l l) 0.016666666666666666))))
             (* l (+ 1.0 (* -0.125 (* K K))))))))
        double code(double J, double l, double K, double U) {
        	double tmp;
        	if (l <= 1.8e+44) {
        		tmp = U + (l * (J * (2.0 + (l * (l * (0.3333333333333333 + (l * (l * (0.016666666666666666 + ((l * l) * 0.0003968253968253968))))))))));
        	} else {
        		tmp = J * ((2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * 0.016666666666666666)))) * (l * (1.0 + (-0.125 * (K * 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 <= 1.8d+44) then
                tmp = u + (l * (j * (2.0d0 + (l * (l * (0.3333333333333333d0 + (l * (l * (0.016666666666666666d0 + ((l * l) * 0.0003968253968253968d0))))))))))
            else
                tmp = j * ((2.0d0 + ((l * l) * (0.3333333333333333d0 + ((l * l) * 0.016666666666666666d0)))) * (l * (1.0d0 + ((-0.125d0) * (k * k)))))
            end if
            code = tmp
        end function
        
        public static double code(double J, double l, double K, double U) {
        	double tmp;
        	if (l <= 1.8e+44) {
        		tmp = U + (l * (J * (2.0 + (l * (l * (0.3333333333333333 + (l * (l * (0.016666666666666666 + ((l * l) * 0.0003968253968253968))))))))));
        	} else {
        		tmp = J * ((2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * 0.016666666666666666)))) * (l * (1.0 + (-0.125 * (K * K)))));
        	}
        	return tmp;
        }
        
        def code(J, l, K, U):
        	tmp = 0
        	if l <= 1.8e+44:
        		tmp = U + (l * (J * (2.0 + (l * (l * (0.3333333333333333 + (l * (l * (0.016666666666666666 + ((l * l) * 0.0003968253968253968))))))))))
        	else:
        		tmp = J * ((2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * 0.016666666666666666)))) * (l * (1.0 + (-0.125 * (K * K)))))
        	return tmp
        
        function code(J, l, K, U)
        	tmp = 0.0
        	if (l <= 1.8e+44)
        		tmp = Float64(U + Float64(l * Float64(J * Float64(2.0 + Float64(l * Float64(l * Float64(0.3333333333333333 + Float64(l * Float64(l * Float64(0.016666666666666666 + Float64(Float64(l * l) * 0.0003968253968253968)))))))))));
        	else
        		tmp = Float64(J * Float64(Float64(2.0 + Float64(Float64(l * l) * Float64(0.3333333333333333 + Float64(Float64(l * l) * 0.016666666666666666)))) * Float64(l * Float64(1.0 + Float64(-0.125 * Float64(K * K))))));
        	end
        	return tmp
        end
        
        function tmp_2 = code(J, l, K, U)
        	tmp = 0.0;
        	if (l <= 1.8e+44)
        		tmp = U + (l * (J * (2.0 + (l * (l * (0.3333333333333333 + (l * (l * (0.016666666666666666 + ((l * l) * 0.0003968253968253968))))))))));
        	else
        		tmp = J * ((2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * 0.016666666666666666)))) * (l * (1.0 + (-0.125 * (K * K)))));
        	end
        	tmp_2 = tmp;
        end
        
        code[J_, l_, K_, U_] := If[LessEqual[l, 1.8e+44], N[(U + N[(l * N[(J * N[(2.0 + N[(l * N[(l * N[(0.3333333333333333 + N[(l * N[(l * N[(0.016666666666666666 + N[(N[(l * l), $MachinePrecision] * 0.0003968253968253968), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(J * N[(N[(2.0 + N[(N[(l * l), $MachinePrecision] * N[(0.3333333333333333 + N[(N[(l * l), $MachinePrecision] * 0.016666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(l * N[(1.0 + N[(-0.125 * N[(K * K), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        \mathbf{if}\;\ell \leq 1.8 \cdot 10^{+44}:\\
        \;\;\;\;U + \ell \cdot \left(J \cdot \left(2 + \ell \cdot \left(\ell \cdot \left(0.3333333333333333 + \ell \cdot \left(\ell \cdot \left(0.016666666666666666 + \left(\ell \cdot \ell\right) \cdot 0.0003968253968253968\right)\right)\right)\right)\right)\right)\\
        
        \mathbf{else}:\\
        \;\;\;\;J \cdot \left(\left(2 + \left(\ell \cdot \ell\right) \cdot \left(0.3333333333333333 + \left(\ell \cdot \ell\right) \cdot 0.016666666666666666\right)\right) \cdot \left(\ell \cdot \left(1 + -0.125 \cdot \left(K \cdot K\right)\right)\right)\right)\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if l < 1.8e44

          1. Initial program 86.0%

            \[\left(J \cdot \left(e^{\ell} - e^{-\ell}\right)\right) \cdot \cos \left(\frac{K}{2}\right) + U \]
          2. Step-by-step derivation
            1. +-lowering-+.f64N/A

              \[\leadsto \mathsf{+.f64}\left(\left(\left(J \cdot \left(e^{\ell} - e^{\mathsf{neg}\left(\ell\right)}\right)\right) \cdot \cos \left(\frac{K}{2}\right)\right), \color{blue}{U}\right) \]
            2. associate-*l*N/A

              \[\leadsto \mathsf{+.f64}\left(\left(J \cdot \left(\left(e^{\ell} - e^{\mathsf{neg}\left(\ell\right)}\right) \cdot \cos \left(\frac{K}{2}\right)\right)\right), U\right) \]
            3. *-commutativeN/A

              \[\leadsto \mathsf{+.f64}\left(\left(\left(\left(e^{\ell} - e^{\mathsf{neg}\left(\ell\right)}\right) \cdot \cos \left(\frac{K}{2}\right)\right) \cdot J\right), U\right) \]
            4. associate-*l*N/A

              \[\leadsto \mathsf{+.f64}\left(\left(\left(e^{\ell} - e^{\mathsf{neg}\left(\ell\right)}\right) \cdot \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
            5. *-lowering-*.f64N/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(e^{\ell} - e^{\mathsf{neg}\left(\ell\right)}\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
            6. sub-negN/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(e^{\ell} + \left(\mathsf{neg}\left(e^{\mathsf{neg}\left(\ell\right)}\right)\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
            7. +-lowering-+.f64N/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\left(e^{\ell}\right), \left(\mathsf{neg}\left(e^{\mathsf{neg}\left(\ell\right)}\right)\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
            8. exp-lowering-exp.f64N/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \left(\mathsf{neg}\left(e^{\mathsf{neg}\left(\ell\right)}\right)\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
            9. exp-negN/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \left(\mathsf{neg}\left(\frac{1}{e^{\ell}}\right)\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
            10. distribute-neg-fracN/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \left(\frac{\mathsf{neg}\left(1\right)}{e^{\ell}}\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
            11. metadata-evalN/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \left(\frac{-1}{e^{\ell}}\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
            12. /-lowering-/.f64N/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \mathsf{/.f64}\left(-1, \left(e^{\ell}\right)\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
            13. exp-lowering-exp.f64N/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \mathsf{/.f64}\left(-1, \mathsf{exp.f64}\left(\ell\right)\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
            14. *-commutativeN/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \mathsf{/.f64}\left(-1, \mathsf{exp.f64}\left(\ell\right)\right)\right), \left(J \cdot \cos \left(\frac{K}{2}\right)\right)\right), U\right) \]
            15. *-lowering-*.f64N/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \mathsf{/.f64}\left(-1, \mathsf{exp.f64}\left(\ell\right)\right)\right), \mathsf{*.f64}\left(J, \cos \left(\frac{K}{2}\right)\right)\right), U\right) \]
            16. cos-lowering-cos.f64N/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \mathsf{/.f64}\left(-1, \mathsf{exp.f64}\left(\ell\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\left(\frac{K}{2}\right)\right)\right)\right), U\right) \]
            17. /-lowering-/.f6486.0%

              \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \mathsf{/.f64}\left(-1, \mathsf{exp.f64}\left(\ell\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
          3. Simplified86.0%

            \[\leadsto \color{blue}{\left(e^{\ell} + \frac{-1}{e^{\ell}}\right) \cdot \left(J \cdot \cos \left(\frac{K}{2}\right)\right) + U} \]
          4. Add Preprocessing
          5. Taylor expanded in l around 0

            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\color{blue}{\left(\ell \cdot \left(2 + {\ell}^{2} \cdot \left(\frac{1}{3} + {\ell}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)}, \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
          6. Step-by-step derivation
            1. *-lowering-*.f64N/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \left(2 + {\ell}^{2} \cdot \left(\frac{1}{3} + {\ell}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
            2. +-lowering-+.f64N/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \left({\ell}^{2} \cdot \left(\frac{1}{3} + {\ell}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
            3. *-lowering-*.f64N/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\left({\ell}^{2}\right), \left(\frac{1}{3} + {\ell}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
            4. unpow2N/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\left(\ell \cdot \ell\right), \left(\frac{1}{3} + {\ell}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
            5. *-lowering-*.f64N/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \left(\frac{1}{3} + {\ell}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
            6. +-lowering-+.f64N/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \left({\ell}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
            7. unpow2N/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \left(\left(\ell \cdot \ell\right) \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
            8. associate-*l*N/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \left(\ell \cdot \left(\ell \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
            9. *-commutativeN/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \left(\ell \cdot \left(\left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right) \cdot \ell\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
            10. *-lowering-*.f64N/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\ell, \left(\left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right) \cdot \ell\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
            11. *-commutativeN/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\ell, \left(\ell \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
            12. *-lowering-*.f64N/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
            13. +-lowering-+.f64N/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(\frac{1}{60}, \left(\frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
            14. *-commutativeN/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(\frac{1}{60}, \left({\ell}^{2} \cdot \frac{1}{2520}\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
            15. *-lowering-*.f64N/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(\frac{1}{60}, \mathsf{*.f64}\left(\left({\ell}^{2}\right), \frac{1}{2520}\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
            16. unpow2N/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(\frac{1}{60}, \mathsf{*.f64}\left(\left(\ell \cdot \ell\right), \frac{1}{2520}\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
            17. *-lowering-*.f6494.1%

              \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(\frac{1}{60}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \frac{1}{2520}\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
          7. Simplified94.1%

            \[\leadsto \color{blue}{\left(\ell \cdot \left(2 + \left(\ell \cdot \ell\right) \cdot \left(0.3333333333333333 + \ell \cdot \left(\ell \cdot \left(0.016666666666666666 + \left(\ell \cdot \ell\right) \cdot 0.0003968253968253968\right)\right)\right)\right)\right)} \cdot \left(J \cdot \cos \left(\frac{K}{2}\right)\right) + U \]
          8. Taylor expanded in K around 0

            \[\leadsto \mathsf{+.f64}\left(\color{blue}{\left(J \cdot \left(\ell \cdot \left(2 + {\ell}^{2} \cdot \left(\frac{1}{3} + {\ell}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right)\right)}, U\right) \]
          9. Step-by-step derivation
            1. *-commutativeN/A

              \[\leadsto \mathsf{+.f64}\left(\left(\left(\ell \cdot \left(2 + {\ell}^{2} \cdot \left(\frac{1}{3} + {\ell}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right)\right) \cdot J\right), U\right) \]
            2. associate-*l*N/A

              \[\leadsto \mathsf{+.f64}\left(\left(\ell \cdot \left(\left(2 + {\ell}^{2} \cdot \left(\frac{1}{3} + {\ell}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right) \cdot J\right)\right), U\right) \]
            3. *-lowering-*.f64N/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\ell, \left(\left(2 + {\ell}^{2} \cdot \left(\frac{1}{3} + {\ell}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right) \cdot J\right)\right), U\right) \]
            4. *-lowering-*.f64N/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\left(2 + {\ell}^{2} \cdot \left(\frac{1}{3} + {\ell}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {\ell}^{2}\right)\right)\right), J\right)\right), U\right) \]
          10. Simplified77.4%

            \[\leadsto \color{blue}{\ell \cdot \left(\left(2 + \ell \cdot \left(\ell \cdot \left(0.3333333333333333 + \ell \cdot \left(\ell \cdot \left(0.016666666666666666 + \left(\ell \cdot \ell\right) \cdot 0.0003968253968253968\right)\right)\right)\right)\right) \cdot J\right)} + U \]

          if 1.8e44 < l

          1. Initial program 100.0%

            \[\left(J \cdot \left(e^{\ell} - e^{-\ell}\right)\right) \cdot \cos \left(\frac{K}{2}\right) + U \]
          2. Step-by-step derivation
            1. +-lowering-+.f64N/A

              \[\leadsto \mathsf{+.f64}\left(\left(\left(J \cdot \left(e^{\ell} - e^{\mathsf{neg}\left(\ell\right)}\right)\right) \cdot \cos \left(\frac{K}{2}\right)\right), \color{blue}{U}\right) \]
            2. associate-*l*N/A

              \[\leadsto \mathsf{+.f64}\left(\left(J \cdot \left(\left(e^{\ell} - e^{\mathsf{neg}\left(\ell\right)}\right) \cdot \cos \left(\frac{K}{2}\right)\right)\right), U\right) \]
            3. *-commutativeN/A

              \[\leadsto \mathsf{+.f64}\left(\left(\left(\left(e^{\ell} - e^{\mathsf{neg}\left(\ell\right)}\right) \cdot \cos \left(\frac{K}{2}\right)\right) \cdot J\right), U\right) \]
            4. associate-*l*N/A

              \[\leadsto \mathsf{+.f64}\left(\left(\left(e^{\ell} - e^{\mathsf{neg}\left(\ell\right)}\right) \cdot \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
            5. *-lowering-*.f64N/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(e^{\ell} - e^{\mathsf{neg}\left(\ell\right)}\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
            6. sub-negN/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(e^{\ell} + \left(\mathsf{neg}\left(e^{\mathsf{neg}\left(\ell\right)}\right)\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
            7. +-lowering-+.f64N/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\left(e^{\ell}\right), \left(\mathsf{neg}\left(e^{\mathsf{neg}\left(\ell\right)}\right)\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
            8. exp-lowering-exp.f64N/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \left(\mathsf{neg}\left(e^{\mathsf{neg}\left(\ell\right)}\right)\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
            9. exp-negN/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \left(\mathsf{neg}\left(\frac{1}{e^{\ell}}\right)\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
            10. distribute-neg-fracN/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \left(\frac{\mathsf{neg}\left(1\right)}{e^{\ell}}\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
            11. metadata-evalN/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \left(\frac{-1}{e^{\ell}}\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
            12. /-lowering-/.f64N/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \mathsf{/.f64}\left(-1, \left(e^{\ell}\right)\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
            13. exp-lowering-exp.f64N/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \mathsf{/.f64}\left(-1, \mathsf{exp.f64}\left(\ell\right)\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
            14. *-commutativeN/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \mathsf{/.f64}\left(-1, \mathsf{exp.f64}\left(\ell\right)\right)\right), \left(J \cdot \cos \left(\frac{K}{2}\right)\right)\right), U\right) \]
            15. *-lowering-*.f64N/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \mathsf{/.f64}\left(-1, \mathsf{exp.f64}\left(\ell\right)\right)\right), \mathsf{*.f64}\left(J, \cos \left(\frac{K}{2}\right)\right)\right), U\right) \]
            16. cos-lowering-cos.f64N/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \mathsf{/.f64}\left(-1, \mathsf{exp.f64}\left(\ell\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\left(\frac{K}{2}\right)\right)\right)\right), U\right) \]
            17. /-lowering-/.f64100.0%

              \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \mathsf{/.f64}\left(-1, \mathsf{exp.f64}\left(\ell\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
          3. Simplified100.0%

            \[\leadsto \color{blue}{\left(e^{\ell} + \frac{-1}{e^{\ell}}\right) \cdot \left(J \cdot \cos \left(\frac{K}{2}\right)\right) + U} \]
          4. Add Preprocessing
          5. Taylor expanded in l around 0

            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\color{blue}{\left(\ell \cdot \left(2 + {\ell}^{2} \cdot \left(\frac{1}{3} + \frac{1}{60} \cdot {\ell}^{2}\right)\right)\right)}, \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
          6. Step-by-step derivation
            1. *-lowering-*.f64N/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \left(2 + {\ell}^{2} \cdot \left(\frac{1}{3} + \frac{1}{60} \cdot {\ell}^{2}\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
            2. +-lowering-+.f64N/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \left({\ell}^{2} \cdot \left(\frac{1}{3} + \frac{1}{60} \cdot {\ell}^{2}\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
            3. *-lowering-*.f64N/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\left({\ell}^{2}\right), \left(\frac{1}{3} + \frac{1}{60} \cdot {\ell}^{2}\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
            4. unpow2N/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\left(\ell \cdot \ell\right), \left(\frac{1}{3} + \frac{1}{60} \cdot {\ell}^{2}\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
            5. *-lowering-*.f64N/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \left(\frac{1}{3} + \frac{1}{60} \cdot {\ell}^{2}\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
            6. +-lowering-+.f64N/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \left(\frac{1}{60} \cdot {\ell}^{2}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
            7. *-commutativeN/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \left({\ell}^{2} \cdot \frac{1}{60}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
            8. *-lowering-*.f64N/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\left({\ell}^{2}\right), \frac{1}{60}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
            9. unpow2N/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\left(\ell \cdot \ell\right), \frac{1}{60}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
            10. *-lowering-*.f6498.3%

              \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \frac{1}{60}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
          7. Simplified98.3%

            \[\leadsto \color{blue}{\left(\ell \cdot \left(2 + \left(\ell \cdot \ell\right) \cdot \left(0.3333333333333333 + \left(\ell \cdot \ell\right) \cdot 0.016666666666666666\right)\right)\right)} \cdot \left(J \cdot \cos \left(\frac{K}{2}\right)\right) + U \]
          8. Taylor expanded in K around 0

            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \frac{1}{60}\right)\right)\right)\right)\right), \color{blue}{\left(J + \frac{-1}{8} \cdot \left(J \cdot {K}^{2}\right)\right)}\right), U\right) \]
          9. Step-by-step derivation
            1. associate-*r*N/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \frac{1}{60}\right)\right)\right)\right)\right), \left(J + \left(\frac{-1}{8} \cdot J\right) \cdot {K}^{2}\right)\right), U\right) \]
            2. +-lowering-+.f64N/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \frac{1}{60}\right)\right)\right)\right)\right), \mathsf{+.f64}\left(J, \left(\left(\frac{-1}{8} \cdot J\right) \cdot {K}^{2}\right)\right)\right), U\right) \]
            3. *-commutativeN/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \frac{1}{60}\right)\right)\right)\right)\right), \mathsf{+.f64}\left(J, \left(\left(J \cdot \frac{-1}{8}\right) \cdot {K}^{2}\right)\right)\right), U\right) \]
            4. associate-*l*N/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \frac{1}{60}\right)\right)\right)\right)\right), \mathsf{+.f64}\left(J, \left(J \cdot \left(\frac{-1}{8} \cdot {K}^{2}\right)\right)\right)\right), U\right) \]
            5. *-lowering-*.f64N/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \frac{1}{60}\right)\right)\right)\right)\right), \mathsf{+.f64}\left(J, \mathsf{*.f64}\left(J, \left(\frac{-1}{8} \cdot {K}^{2}\right)\right)\right)\right), U\right) \]
            6. *-lowering-*.f64N/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \frac{1}{60}\right)\right)\right)\right)\right), \mathsf{+.f64}\left(J, \mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\frac{-1}{8}, \left({K}^{2}\right)\right)\right)\right)\right), U\right) \]
            7. unpow2N/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \frac{1}{60}\right)\right)\right)\right)\right), \mathsf{+.f64}\left(J, \mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\frac{-1}{8}, \left(K \cdot K\right)\right)\right)\right)\right), U\right) \]
            8. *-lowering-*.f6475.0%

              \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \frac{1}{60}\right)\right)\right)\right)\right), \mathsf{+.f64}\left(J, \mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{*.f64}\left(K, K\right)\right)\right)\right)\right), U\right) \]
          10. Simplified75.0%

            \[\leadsto \left(\ell \cdot \left(2 + \left(\ell \cdot \ell\right) \cdot \left(0.3333333333333333 + \left(\ell \cdot \ell\right) \cdot 0.016666666666666666\right)\right)\right) \cdot \color{blue}{\left(J + J \cdot \left(-0.125 \cdot \left(K \cdot K\right)\right)\right)} + U \]
          11. Taylor expanded in J around inf

            \[\leadsto \color{blue}{J \cdot \left(\ell \cdot \left(\left(1 + \frac{-1}{8} \cdot {K}^{2}\right) \cdot \left(2 + {\ell}^{2} \cdot \left(\frac{1}{3} + \frac{1}{60} \cdot {\ell}^{2}\right)\right)\right)\right)} \]
          12. Step-by-step derivation
            1. *-lowering-*.f64N/A

              \[\leadsto \mathsf{*.f64}\left(J, \color{blue}{\left(\ell \cdot \left(\left(1 + \frac{-1}{8} \cdot {K}^{2}\right) \cdot \left(2 + {\ell}^{2} \cdot \left(\frac{1}{3} + \frac{1}{60} \cdot {\ell}^{2}\right)\right)\right)\right)}\right) \]
            2. associate-*r*N/A

              \[\leadsto \mathsf{*.f64}\left(J, \left(\left(\ell \cdot \left(1 + \frac{-1}{8} \cdot {K}^{2}\right)\right) \cdot \color{blue}{\left(2 + {\ell}^{2} \cdot \left(\frac{1}{3} + \frac{1}{60} \cdot {\ell}^{2}\right)\right)}\right)\right) \]
            3. *-lowering-*.f64N/A

              \[\leadsto \mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\left(\ell \cdot \left(1 + \frac{-1}{8} \cdot {K}^{2}\right)\right), \color{blue}{\left(2 + {\ell}^{2} \cdot \left(\frac{1}{3} + \frac{1}{60} \cdot {\ell}^{2}\right)\right)}\right)\right) \]
            4. *-lowering-*.f64N/A

              \[\leadsto \mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \left(1 + \frac{-1}{8} \cdot {K}^{2}\right)\right), \left(\color{blue}{2} + {\ell}^{2} \cdot \left(\frac{1}{3} + \frac{1}{60} \cdot {\ell}^{2}\right)\right)\right)\right) \]
            5. +-lowering-+.f64N/A

              \[\leadsto \mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(1, \left(\frac{-1}{8} \cdot {K}^{2}\right)\right)\right), \left(2 + {\ell}^{2} \cdot \left(\frac{1}{3} + \frac{1}{60} \cdot {\ell}^{2}\right)\right)\right)\right) \]
            6. *-lowering-*.f64N/A

              \[\leadsto \mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{8}, \left({K}^{2}\right)\right)\right)\right), \left(2 + {\ell}^{2} \cdot \left(\frac{1}{3} + \frac{1}{60} \cdot {\ell}^{2}\right)\right)\right)\right) \]
            7. unpow2N/A

              \[\leadsto \mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{8}, \left(K \cdot K\right)\right)\right)\right), \left(2 + {\ell}^{2} \cdot \left(\frac{1}{3} + \frac{1}{60} \cdot {\ell}^{2}\right)\right)\right)\right) \]
            8. *-lowering-*.f64N/A

              \[\leadsto \mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{*.f64}\left(K, K\right)\right)\right)\right), \left(2 + {\ell}^{2} \cdot \left(\frac{1}{3} + \frac{1}{60} \cdot {\ell}^{2}\right)\right)\right)\right) \]
            9. +-lowering-+.f64N/A

              \[\leadsto \mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{*.f64}\left(K, K\right)\right)\right)\right), \mathsf{+.f64}\left(2, \color{blue}{\left({\ell}^{2} \cdot \left(\frac{1}{3} + \frac{1}{60} \cdot {\ell}^{2}\right)\right)}\right)\right)\right) \]
            10. *-lowering-*.f64N/A

              \[\leadsto \mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{*.f64}\left(K, K\right)\right)\right)\right), \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\left({\ell}^{2}\right), \color{blue}{\left(\frac{1}{3} + \frac{1}{60} \cdot {\ell}^{2}\right)}\right)\right)\right)\right) \]
            11. unpow2N/A

              \[\leadsto \mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{*.f64}\left(K, K\right)\right)\right)\right), \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\left(\ell \cdot \ell\right), \left(\color{blue}{\frac{1}{3}} + \frac{1}{60} \cdot {\ell}^{2}\right)\right)\right)\right)\right) \]
            12. *-lowering-*.f64N/A

              \[\leadsto \mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{*.f64}\left(K, K\right)\right)\right)\right), \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \left(\color{blue}{\frac{1}{3}} + \frac{1}{60} \cdot {\ell}^{2}\right)\right)\right)\right)\right) \]
            13. +-lowering-+.f64N/A

              \[\leadsto \mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{*.f64}\left(K, K\right)\right)\right)\right), \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \color{blue}{\left(\frac{1}{60} \cdot {\ell}^{2}\right)}\right)\right)\right)\right)\right) \]
            14. *-commutativeN/A

              \[\leadsto \mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{*.f64}\left(K, K\right)\right)\right)\right), \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \left({\ell}^{2} \cdot \color{blue}{\frac{1}{60}}\right)\right)\right)\right)\right)\right) \]
            15. *-lowering-*.f64N/A

              \[\leadsto \mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{*.f64}\left(K, K\right)\right)\right)\right), \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\left({\ell}^{2}\right), \color{blue}{\frac{1}{60}}\right)\right)\right)\right)\right)\right) \]
            16. unpow2N/A

              \[\leadsto \mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{*.f64}\left(K, K\right)\right)\right)\right), \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\left(\ell \cdot \ell\right), \frac{1}{60}\right)\right)\right)\right)\right)\right) \]
            17. *-lowering-*.f6475.0%

              \[\leadsto \mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{*.f64}\left(K, K\right)\right)\right)\right), \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \frac{1}{60}\right)\right)\right)\right)\right)\right) \]
          13. Simplified75.0%

            \[\leadsto \color{blue}{J \cdot \left(\left(\ell \cdot \left(1 + -0.125 \cdot \left(K \cdot K\right)\right)\right) \cdot \left(2 + \left(\ell \cdot \ell\right) \cdot \left(0.3333333333333333 + \left(\ell \cdot \ell\right) \cdot 0.016666666666666666\right)\right)\right)} \]
        3. Recombined 2 regimes into one program.
        4. Final simplification76.8%

          \[\leadsto \begin{array}{l} \mathbf{if}\;\ell \leq 1.8 \cdot 10^{+44}:\\ \;\;\;\;U + \ell \cdot \left(J \cdot \left(2 + \ell \cdot \left(\ell \cdot \left(0.3333333333333333 + \ell \cdot \left(\ell \cdot \left(0.016666666666666666 + \left(\ell \cdot \ell\right) \cdot 0.0003968253968253968\right)\right)\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;J \cdot \left(\left(2 + \left(\ell \cdot \ell\right) \cdot \left(0.3333333333333333 + \left(\ell \cdot \ell\right) \cdot 0.016666666666666666\right)\right) \cdot \left(\ell \cdot \left(1 + -0.125 \cdot \left(K \cdot K\right)\right)\right)\right)\\ \end{array} \]
        5. Add Preprocessing

        Alternative 19: 77.6% accurate, 10.4× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} t_0 := 2 + \left(\ell \cdot \ell\right) \cdot \left(0.3333333333333333 + \left(\ell \cdot \ell\right) \cdot 0.016666666666666666\right)\\ \mathbf{if}\;\ell \leq 1820:\\ \;\;\;\;U + J \cdot \left(\ell \cdot t\_0\right)\\ \mathbf{else}:\\ \;\;\;\;J \cdot \left(t\_0 \cdot \left(\ell \cdot \left(1 + -0.125 \cdot \left(K \cdot K\right)\right)\right)\right)\\ \end{array} \end{array} \]
        (FPCore (J l K U)
         :precision binary64
         (let* ((t_0
                 (+
                  2.0
                  (*
                   (* l l)
                   (+ 0.3333333333333333 (* (* l l) 0.016666666666666666))))))
           (if (<= l 1820.0)
             (+ U (* J (* l t_0)))
             (* J (* t_0 (* l (+ 1.0 (* -0.125 (* K K)))))))))
        double code(double J, double l, double K, double U) {
        	double t_0 = 2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * 0.016666666666666666)));
        	double tmp;
        	if (l <= 1820.0) {
        		tmp = U + (J * (l * t_0));
        	} else {
        		tmp = J * (t_0 * (l * (1.0 + (-0.125 * (K * 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) :: t_0
            real(8) :: tmp
            t_0 = 2.0d0 + ((l * l) * (0.3333333333333333d0 + ((l * l) * 0.016666666666666666d0)))
            if (l <= 1820.0d0) then
                tmp = u + (j * (l * t_0))
            else
                tmp = j * (t_0 * (l * (1.0d0 + ((-0.125d0) * (k * k)))))
            end if
            code = tmp
        end function
        
        public static double code(double J, double l, double K, double U) {
        	double t_0 = 2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * 0.016666666666666666)));
        	double tmp;
        	if (l <= 1820.0) {
        		tmp = U + (J * (l * t_0));
        	} else {
        		tmp = J * (t_0 * (l * (1.0 + (-0.125 * (K * K)))));
        	}
        	return tmp;
        }
        
        def code(J, l, K, U):
        	t_0 = 2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * 0.016666666666666666)))
        	tmp = 0
        	if l <= 1820.0:
        		tmp = U + (J * (l * t_0))
        	else:
        		tmp = J * (t_0 * (l * (1.0 + (-0.125 * (K * K)))))
        	return tmp
        
        function code(J, l, K, U)
        	t_0 = Float64(2.0 + Float64(Float64(l * l) * Float64(0.3333333333333333 + Float64(Float64(l * l) * 0.016666666666666666))))
        	tmp = 0.0
        	if (l <= 1820.0)
        		tmp = Float64(U + Float64(J * Float64(l * t_0)));
        	else
        		tmp = Float64(J * Float64(t_0 * Float64(l * Float64(1.0 + Float64(-0.125 * Float64(K * K))))));
        	end
        	return tmp
        end
        
        function tmp_2 = code(J, l, K, U)
        	t_0 = 2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * 0.016666666666666666)));
        	tmp = 0.0;
        	if (l <= 1820.0)
        		tmp = U + (J * (l * t_0));
        	else
        		tmp = J * (t_0 * (l * (1.0 + (-0.125 * (K * K)))));
        	end
        	tmp_2 = tmp;
        end
        
        code[J_, l_, K_, U_] := Block[{t$95$0 = N[(2.0 + N[(N[(l * l), $MachinePrecision] * N[(0.3333333333333333 + N[(N[(l * l), $MachinePrecision] * 0.016666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[l, 1820.0], N[(U + N[(J * N[(l * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(J * N[(t$95$0 * N[(l * N[(1.0 + N[(-0.125 * N[(K * K), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        t_0 := 2 + \left(\ell \cdot \ell\right) \cdot \left(0.3333333333333333 + \left(\ell \cdot \ell\right) \cdot 0.016666666666666666\right)\\
        \mathbf{if}\;\ell \leq 1820:\\
        \;\;\;\;U + J \cdot \left(\ell \cdot t\_0\right)\\
        
        \mathbf{else}:\\
        \;\;\;\;J \cdot \left(t\_0 \cdot \left(\ell \cdot \left(1 + -0.125 \cdot \left(K \cdot K\right)\right)\right)\right)\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if l < 1820

          1. Initial program 85.6%

            \[\left(J \cdot \left(e^{\ell} - e^{-\ell}\right)\right) \cdot \cos \left(\frac{K}{2}\right) + U \]
          2. Step-by-step derivation
            1. +-lowering-+.f64N/A

              \[\leadsto \mathsf{+.f64}\left(\left(\left(J \cdot \left(e^{\ell} - e^{\mathsf{neg}\left(\ell\right)}\right)\right) \cdot \cos \left(\frac{K}{2}\right)\right), \color{blue}{U}\right) \]
            2. associate-*l*N/A

              \[\leadsto \mathsf{+.f64}\left(\left(J \cdot \left(\left(e^{\ell} - e^{\mathsf{neg}\left(\ell\right)}\right) \cdot \cos \left(\frac{K}{2}\right)\right)\right), U\right) \]
            3. *-commutativeN/A

              \[\leadsto \mathsf{+.f64}\left(\left(\left(\left(e^{\ell} - e^{\mathsf{neg}\left(\ell\right)}\right) \cdot \cos \left(\frac{K}{2}\right)\right) \cdot J\right), U\right) \]
            4. associate-*l*N/A

              \[\leadsto \mathsf{+.f64}\left(\left(\left(e^{\ell} - e^{\mathsf{neg}\left(\ell\right)}\right) \cdot \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
            5. *-lowering-*.f64N/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(e^{\ell} - e^{\mathsf{neg}\left(\ell\right)}\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
            6. sub-negN/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(e^{\ell} + \left(\mathsf{neg}\left(e^{\mathsf{neg}\left(\ell\right)}\right)\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
            7. +-lowering-+.f64N/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\left(e^{\ell}\right), \left(\mathsf{neg}\left(e^{\mathsf{neg}\left(\ell\right)}\right)\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
            8. exp-lowering-exp.f64N/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \left(\mathsf{neg}\left(e^{\mathsf{neg}\left(\ell\right)}\right)\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
            9. exp-negN/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \left(\mathsf{neg}\left(\frac{1}{e^{\ell}}\right)\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
            10. distribute-neg-fracN/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \left(\frac{\mathsf{neg}\left(1\right)}{e^{\ell}}\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
            11. metadata-evalN/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \left(\frac{-1}{e^{\ell}}\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
            12. /-lowering-/.f64N/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \mathsf{/.f64}\left(-1, \left(e^{\ell}\right)\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
            13. exp-lowering-exp.f64N/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \mathsf{/.f64}\left(-1, \mathsf{exp.f64}\left(\ell\right)\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
            14. *-commutativeN/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \mathsf{/.f64}\left(-1, \mathsf{exp.f64}\left(\ell\right)\right)\right), \left(J \cdot \cos \left(\frac{K}{2}\right)\right)\right), U\right) \]
            15. *-lowering-*.f64N/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \mathsf{/.f64}\left(-1, \mathsf{exp.f64}\left(\ell\right)\right)\right), \mathsf{*.f64}\left(J, \cos \left(\frac{K}{2}\right)\right)\right), U\right) \]
            16. cos-lowering-cos.f64N/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \mathsf{/.f64}\left(-1, \mathsf{exp.f64}\left(\ell\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\left(\frac{K}{2}\right)\right)\right)\right), U\right) \]
            17. /-lowering-/.f6485.6%

              \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \mathsf{/.f64}\left(-1, \mathsf{exp.f64}\left(\ell\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
          3. Simplified85.6%

            \[\leadsto \color{blue}{\left(e^{\ell} + \frac{-1}{e^{\ell}}\right) \cdot \left(J \cdot \cos \left(\frac{K}{2}\right)\right) + U} \]
          4. Add Preprocessing
          5. Taylor expanded in l around 0

            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\color{blue}{\left(\ell \cdot \left(2 + {\ell}^{2} \cdot \left(\frac{1}{3} + \frac{1}{60} \cdot {\ell}^{2}\right)\right)\right)}, \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
          6. Step-by-step derivation
            1. *-lowering-*.f64N/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \left(2 + {\ell}^{2} \cdot \left(\frac{1}{3} + \frac{1}{60} \cdot {\ell}^{2}\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
            2. +-lowering-+.f64N/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \left({\ell}^{2} \cdot \left(\frac{1}{3} + \frac{1}{60} \cdot {\ell}^{2}\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
            3. *-lowering-*.f64N/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\left({\ell}^{2}\right), \left(\frac{1}{3} + \frac{1}{60} \cdot {\ell}^{2}\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
            4. unpow2N/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\left(\ell \cdot \ell\right), \left(\frac{1}{3} + \frac{1}{60} \cdot {\ell}^{2}\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
            5. *-lowering-*.f64N/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \left(\frac{1}{3} + \frac{1}{60} \cdot {\ell}^{2}\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
            6. +-lowering-+.f64N/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \left(\frac{1}{60} \cdot {\ell}^{2}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
            7. *-commutativeN/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \left({\ell}^{2} \cdot \frac{1}{60}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
            8. *-lowering-*.f64N/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\left({\ell}^{2}\right), \frac{1}{60}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
            9. unpow2N/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\left(\ell \cdot \ell\right), \frac{1}{60}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
            10. *-lowering-*.f6493.5%

              \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \frac{1}{60}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
          7. Simplified93.5%

            \[\leadsto \color{blue}{\left(\ell \cdot \left(2 + \left(\ell \cdot \ell\right) \cdot \left(0.3333333333333333 + \left(\ell \cdot \ell\right) \cdot 0.016666666666666666\right)\right)\right)} \cdot \left(J \cdot \cos \left(\frac{K}{2}\right)\right) + U \]
          8. Taylor expanded in K around 0

            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \frac{1}{60}\right)\right)\right)\right)\right), \color{blue}{J}\right), U\right) \]
          9. Step-by-step derivation
            1. Simplified78.2%

              \[\leadsto \left(\ell \cdot \left(2 + \left(\ell \cdot \ell\right) \cdot \left(0.3333333333333333 + \left(\ell \cdot \ell\right) \cdot 0.016666666666666666\right)\right)\right) \cdot \color{blue}{J} + U \]

            if 1820 < l

            1. Initial program 100.0%

              \[\left(J \cdot \left(e^{\ell} - e^{-\ell}\right)\right) \cdot \cos \left(\frac{K}{2}\right) + U \]
            2. Step-by-step derivation
              1. +-lowering-+.f64N/A

                \[\leadsto \mathsf{+.f64}\left(\left(\left(J \cdot \left(e^{\ell} - e^{\mathsf{neg}\left(\ell\right)}\right)\right) \cdot \cos \left(\frac{K}{2}\right)\right), \color{blue}{U}\right) \]
              2. associate-*l*N/A

                \[\leadsto \mathsf{+.f64}\left(\left(J \cdot \left(\left(e^{\ell} - e^{\mathsf{neg}\left(\ell\right)}\right) \cdot \cos \left(\frac{K}{2}\right)\right)\right), U\right) \]
              3. *-commutativeN/A

                \[\leadsto \mathsf{+.f64}\left(\left(\left(\left(e^{\ell} - e^{\mathsf{neg}\left(\ell\right)}\right) \cdot \cos \left(\frac{K}{2}\right)\right) \cdot J\right), U\right) \]
              4. associate-*l*N/A

                \[\leadsto \mathsf{+.f64}\left(\left(\left(e^{\ell} - e^{\mathsf{neg}\left(\ell\right)}\right) \cdot \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
              5. *-lowering-*.f64N/A

                \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(e^{\ell} - e^{\mathsf{neg}\left(\ell\right)}\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
              6. sub-negN/A

                \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(e^{\ell} + \left(\mathsf{neg}\left(e^{\mathsf{neg}\left(\ell\right)}\right)\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
              7. +-lowering-+.f64N/A

                \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\left(e^{\ell}\right), \left(\mathsf{neg}\left(e^{\mathsf{neg}\left(\ell\right)}\right)\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
              8. exp-lowering-exp.f64N/A

                \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \left(\mathsf{neg}\left(e^{\mathsf{neg}\left(\ell\right)}\right)\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
              9. exp-negN/A

                \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \left(\mathsf{neg}\left(\frac{1}{e^{\ell}}\right)\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
              10. distribute-neg-fracN/A

                \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \left(\frac{\mathsf{neg}\left(1\right)}{e^{\ell}}\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
              11. metadata-evalN/A

                \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \left(\frac{-1}{e^{\ell}}\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
              12. /-lowering-/.f64N/A

                \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \mathsf{/.f64}\left(-1, \left(e^{\ell}\right)\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
              13. exp-lowering-exp.f64N/A

                \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \mathsf{/.f64}\left(-1, \mathsf{exp.f64}\left(\ell\right)\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
              14. *-commutativeN/A

                \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \mathsf{/.f64}\left(-1, \mathsf{exp.f64}\left(\ell\right)\right)\right), \left(J \cdot \cos \left(\frac{K}{2}\right)\right)\right), U\right) \]
              15. *-lowering-*.f64N/A

                \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \mathsf{/.f64}\left(-1, \mathsf{exp.f64}\left(\ell\right)\right)\right), \mathsf{*.f64}\left(J, \cos \left(\frac{K}{2}\right)\right)\right), U\right) \]
              16. cos-lowering-cos.f64N/A

                \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \mathsf{/.f64}\left(-1, \mathsf{exp.f64}\left(\ell\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\left(\frac{K}{2}\right)\right)\right)\right), U\right) \]
              17. /-lowering-/.f64100.0%

                \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \mathsf{/.f64}\left(-1, \mathsf{exp.f64}\left(\ell\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
            3. Simplified100.0%

              \[\leadsto \color{blue}{\left(e^{\ell} + \frac{-1}{e^{\ell}}\right) \cdot \left(J \cdot \cos \left(\frac{K}{2}\right)\right) + U} \]
            4. Add Preprocessing
            5. Taylor expanded in l around 0

              \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\color{blue}{\left(\ell \cdot \left(2 + {\ell}^{2} \cdot \left(\frac{1}{3} + \frac{1}{60} \cdot {\ell}^{2}\right)\right)\right)}, \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
            6. Step-by-step derivation
              1. *-lowering-*.f64N/A

                \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \left(2 + {\ell}^{2} \cdot \left(\frac{1}{3} + \frac{1}{60} \cdot {\ell}^{2}\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
              2. +-lowering-+.f64N/A

                \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \left({\ell}^{2} \cdot \left(\frac{1}{3} + \frac{1}{60} \cdot {\ell}^{2}\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
              3. *-lowering-*.f64N/A

                \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\left({\ell}^{2}\right), \left(\frac{1}{3} + \frac{1}{60} \cdot {\ell}^{2}\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
              4. unpow2N/A

                \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\left(\ell \cdot \ell\right), \left(\frac{1}{3} + \frac{1}{60} \cdot {\ell}^{2}\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
              5. *-lowering-*.f64N/A

                \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \left(\frac{1}{3} + \frac{1}{60} \cdot {\ell}^{2}\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
              6. +-lowering-+.f64N/A

                \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \left(\frac{1}{60} \cdot {\ell}^{2}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
              7. *-commutativeN/A

                \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \left({\ell}^{2} \cdot \frac{1}{60}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
              8. *-lowering-*.f64N/A

                \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\left({\ell}^{2}\right), \frac{1}{60}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
              9. unpow2N/A

                \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\left(\ell \cdot \ell\right), \frac{1}{60}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
              10. *-lowering-*.f6489.7%

                \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \frac{1}{60}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
            7. Simplified89.7%

              \[\leadsto \color{blue}{\left(\ell \cdot \left(2 + \left(\ell \cdot \ell\right) \cdot \left(0.3333333333333333 + \left(\ell \cdot \ell\right) \cdot 0.016666666666666666\right)\right)\right)} \cdot \left(J \cdot \cos \left(\frac{K}{2}\right)\right) + U \]
            8. Taylor expanded in K around 0

              \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \frac{1}{60}\right)\right)\right)\right)\right), \color{blue}{\left(J + \frac{-1}{8} \cdot \left(J \cdot {K}^{2}\right)\right)}\right), U\right) \]
            9. Step-by-step derivation
              1. associate-*r*N/A

                \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \frac{1}{60}\right)\right)\right)\right)\right), \left(J + \left(\frac{-1}{8} \cdot J\right) \cdot {K}^{2}\right)\right), U\right) \]
              2. +-lowering-+.f64N/A

                \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \frac{1}{60}\right)\right)\right)\right)\right), \mathsf{+.f64}\left(J, \left(\left(\frac{-1}{8} \cdot J\right) \cdot {K}^{2}\right)\right)\right), U\right) \]
              3. *-commutativeN/A

                \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \frac{1}{60}\right)\right)\right)\right)\right), \mathsf{+.f64}\left(J, \left(\left(J \cdot \frac{-1}{8}\right) \cdot {K}^{2}\right)\right)\right), U\right) \]
              4. associate-*l*N/A

                \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \frac{1}{60}\right)\right)\right)\right)\right), \mathsf{+.f64}\left(J, \left(J \cdot \left(\frac{-1}{8} \cdot {K}^{2}\right)\right)\right)\right), U\right) \]
              5. *-lowering-*.f64N/A

                \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \frac{1}{60}\right)\right)\right)\right)\right), \mathsf{+.f64}\left(J, \mathsf{*.f64}\left(J, \left(\frac{-1}{8} \cdot {K}^{2}\right)\right)\right)\right), U\right) \]
              6. *-lowering-*.f64N/A

                \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \frac{1}{60}\right)\right)\right)\right)\right), \mathsf{+.f64}\left(J, \mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\frac{-1}{8}, \left({K}^{2}\right)\right)\right)\right)\right), U\right) \]
              7. unpow2N/A

                \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \frac{1}{60}\right)\right)\right)\right)\right), \mathsf{+.f64}\left(J, \mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\frac{-1}{8}, \left(K \cdot K\right)\right)\right)\right)\right), U\right) \]
              8. *-lowering-*.f6468.5%

                \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \frac{1}{60}\right)\right)\right)\right)\right), \mathsf{+.f64}\left(J, \mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{*.f64}\left(K, K\right)\right)\right)\right)\right), U\right) \]
            10. Simplified68.5%

              \[\leadsto \left(\ell \cdot \left(2 + \left(\ell \cdot \ell\right) \cdot \left(0.3333333333333333 + \left(\ell \cdot \ell\right) \cdot 0.016666666666666666\right)\right)\right) \cdot \color{blue}{\left(J + J \cdot \left(-0.125 \cdot \left(K \cdot K\right)\right)\right)} + U \]
            11. Taylor expanded in J around inf

              \[\leadsto \color{blue}{J \cdot \left(\ell \cdot \left(\left(1 + \frac{-1}{8} \cdot {K}^{2}\right) \cdot \left(2 + {\ell}^{2} \cdot \left(\frac{1}{3} + \frac{1}{60} \cdot {\ell}^{2}\right)\right)\right)\right)} \]
            12. Step-by-step derivation
              1. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(J, \color{blue}{\left(\ell \cdot \left(\left(1 + \frac{-1}{8} \cdot {K}^{2}\right) \cdot \left(2 + {\ell}^{2} \cdot \left(\frac{1}{3} + \frac{1}{60} \cdot {\ell}^{2}\right)\right)\right)\right)}\right) \]
              2. associate-*r*N/A

                \[\leadsto \mathsf{*.f64}\left(J, \left(\left(\ell \cdot \left(1 + \frac{-1}{8} \cdot {K}^{2}\right)\right) \cdot \color{blue}{\left(2 + {\ell}^{2} \cdot \left(\frac{1}{3} + \frac{1}{60} \cdot {\ell}^{2}\right)\right)}\right)\right) \]
              3. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\left(\ell \cdot \left(1 + \frac{-1}{8} \cdot {K}^{2}\right)\right), \color{blue}{\left(2 + {\ell}^{2} \cdot \left(\frac{1}{3} + \frac{1}{60} \cdot {\ell}^{2}\right)\right)}\right)\right) \]
              4. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \left(1 + \frac{-1}{8} \cdot {K}^{2}\right)\right), \left(\color{blue}{2} + {\ell}^{2} \cdot \left(\frac{1}{3} + \frac{1}{60} \cdot {\ell}^{2}\right)\right)\right)\right) \]
              5. +-lowering-+.f64N/A

                \[\leadsto \mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(1, \left(\frac{-1}{8} \cdot {K}^{2}\right)\right)\right), \left(2 + {\ell}^{2} \cdot \left(\frac{1}{3} + \frac{1}{60} \cdot {\ell}^{2}\right)\right)\right)\right) \]
              6. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{8}, \left({K}^{2}\right)\right)\right)\right), \left(2 + {\ell}^{2} \cdot \left(\frac{1}{3} + \frac{1}{60} \cdot {\ell}^{2}\right)\right)\right)\right) \]
              7. unpow2N/A

                \[\leadsto \mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{8}, \left(K \cdot K\right)\right)\right)\right), \left(2 + {\ell}^{2} \cdot \left(\frac{1}{3} + \frac{1}{60} \cdot {\ell}^{2}\right)\right)\right)\right) \]
              8. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{*.f64}\left(K, K\right)\right)\right)\right), \left(2 + {\ell}^{2} \cdot \left(\frac{1}{3} + \frac{1}{60} \cdot {\ell}^{2}\right)\right)\right)\right) \]
              9. +-lowering-+.f64N/A

                \[\leadsto \mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{*.f64}\left(K, K\right)\right)\right)\right), \mathsf{+.f64}\left(2, \color{blue}{\left({\ell}^{2} \cdot \left(\frac{1}{3} + \frac{1}{60} \cdot {\ell}^{2}\right)\right)}\right)\right)\right) \]
              10. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{*.f64}\left(K, K\right)\right)\right)\right), \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\left({\ell}^{2}\right), \color{blue}{\left(\frac{1}{3} + \frac{1}{60} \cdot {\ell}^{2}\right)}\right)\right)\right)\right) \]
              11. unpow2N/A

                \[\leadsto \mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{*.f64}\left(K, K\right)\right)\right)\right), \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\left(\ell \cdot \ell\right), \left(\color{blue}{\frac{1}{3}} + \frac{1}{60} \cdot {\ell}^{2}\right)\right)\right)\right)\right) \]
              12. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{*.f64}\left(K, K\right)\right)\right)\right), \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \left(\color{blue}{\frac{1}{3}} + \frac{1}{60} \cdot {\ell}^{2}\right)\right)\right)\right)\right) \]
              13. +-lowering-+.f64N/A

                \[\leadsto \mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{*.f64}\left(K, K\right)\right)\right)\right), \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \color{blue}{\left(\frac{1}{60} \cdot {\ell}^{2}\right)}\right)\right)\right)\right)\right) \]
              14. *-commutativeN/A

                \[\leadsto \mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{*.f64}\left(K, K\right)\right)\right)\right), \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \left({\ell}^{2} \cdot \color{blue}{\frac{1}{60}}\right)\right)\right)\right)\right)\right) \]
              15. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{*.f64}\left(K, K\right)\right)\right)\right), \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\left({\ell}^{2}\right), \color{blue}{\frac{1}{60}}\right)\right)\right)\right)\right)\right) \]
              16. unpow2N/A

                \[\leadsto \mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{*.f64}\left(K, K\right)\right)\right)\right), \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\left(\ell \cdot \ell\right), \frac{1}{60}\right)\right)\right)\right)\right)\right) \]
              17. *-lowering-*.f6468.5%

                \[\leadsto \mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{*.f64}\left(K, K\right)\right)\right)\right), \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \frac{1}{60}\right)\right)\right)\right)\right)\right) \]
            13. Simplified68.5%

              \[\leadsto \color{blue}{J \cdot \left(\left(\ell \cdot \left(1 + -0.125 \cdot \left(K \cdot K\right)\right)\right) \cdot \left(2 + \left(\ell \cdot \ell\right) \cdot \left(0.3333333333333333 + \left(\ell \cdot \ell\right) \cdot 0.016666666666666666\right)\right)\right)} \]
          10. Recombined 2 regimes into one program.
          11. Final simplification75.7%

            \[\leadsto \begin{array}{l} \mathbf{if}\;\ell \leq 1820:\\ \;\;\;\;U + J \cdot \left(\ell \cdot \left(2 + \left(\ell \cdot \ell\right) \cdot \left(0.3333333333333333 + \left(\ell \cdot \ell\right) \cdot 0.016666666666666666\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;J \cdot \left(\left(2 + \left(\ell \cdot \ell\right) \cdot \left(0.3333333333333333 + \left(\ell \cdot \ell\right) \cdot 0.016666666666666666\right)\right) \cdot \left(\ell \cdot \left(1 + -0.125 \cdot \left(K \cdot K\right)\right)\right)\right)\\ \end{array} \]
          12. Add Preprocessing

          Alternative 20: 74.6% accurate, 10.7× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} t_0 := \left(J \cdot \left(1 + K \cdot \left(K \cdot -0.125\right)\right)\right) \cdot \left(\ell \cdot \left(2 + \ell \cdot \left(\ell \cdot 0.3333333333333333\right)\right)\right)\\ \mathbf{if}\;\ell \leq -1350:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;\ell \leq 800:\\ \;\;\;\;U + \ell \cdot \left(J \cdot 2\right)\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \]
          (FPCore (J l K U)
           :precision binary64
           (let* ((t_0
                   (*
                    (* J (+ 1.0 (* K (* K -0.125))))
                    (* l (+ 2.0 (* l (* l 0.3333333333333333)))))))
             (if (<= l -1350.0) t_0 (if (<= l 800.0) (+ U (* l (* J 2.0))) t_0))))
          double code(double J, double l, double K, double U) {
          	double t_0 = (J * (1.0 + (K * (K * -0.125)))) * (l * (2.0 + (l * (l * 0.3333333333333333))));
          	double tmp;
          	if (l <= -1350.0) {
          		tmp = t_0;
          	} else if (l <= 800.0) {
          		tmp = U + (l * (J * 2.0));
          	} 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) :: tmp
              t_0 = (j * (1.0d0 + (k * (k * (-0.125d0))))) * (l * (2.0d0 + (l * (l * 0.3333333333333333d0))))
              if (l <= (-1350.0d0)) then
                  tmp = t_0
              else if (l <= 800.0d0) then
                  tmp = u + (l * (j * 2.0d0))
              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 = (J * (1.0 + (K * (K * -0.125)))) * (l * (2.0 + (l * (l * 0.3333333333333333))));
          	double tmp;
          	if (l <= -1350.0) {
          		tmp = t_0;
          	} else if (l <= 800.0) {
          		tmp = U + (l * (J * 2.0));
          	} else {
          		tmp = t_0;
          	}
          	return tmp;
          }
          
          def code(J, l, K, U):
          	t_0 = (J * (1.0 + (K * (K * -0.125)))) * (l * (2.0 + (l * (l * 0.3333333333333333))))
          	tmp = 0
          	if l <= -1350.0:
          		tmp = t_0
          	elif l <= 800.0:
          		tmp = U + (l * (J * 2.0))
          	else:
          		tmp = t_0
          	return tmp
          
          function code(J, l, K, U)
          	t_0 = Float64(Float64(J * Float64(1.0 + Float64(K * Float64(K * -0.125)))) * Float64(l * Float64(2.0 + Float64(l * Float64(l * 0.3333333333333333)))))
          	tmp = 0.0
          	if (l <= -1350.0)
          		tmp = t_0;
          	elseif (l <= 800.0)
          		tmp = Float64(U + Float64(l * Float64(J * 2.0)));
          	else
          		tmp = t_0;
          	end
          	return tmp
          end
          
          function tmp_2 = code(J, l, K, U)
          	t_0 = (J * (1.0 + (K * (K * -0.125)))) * (l * (2.0 + (l * (l * 0.3333333333333333))));
          	tmp = 0.0;
          	if (l <= -1350.0)
          		tmp = t_0;
          	elseif (l <= 800.0)
          		tmp = U + (l * (J * 2.0));
          	else
          		tmp = t_0;
          	end
          	tmp_2 = tmp;
          end
          
          code[J_, l_, K_, U_] := Block[{t$95$0 = N[(N[(J * N[(1.0 + N[(K * N[(K * -0.125), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(l * N[(2.0 + N[(l * N[(l * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[l, -1350.0], t$95$0, If[LessEqual[l, 800.0], N[(U + N[(l * N[(J * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          t_0 := \left(J \cdot \left(1 + K \cdot \left(K \cdot -0.125\right)\right)\right) \cdot \left(\ell \cdot \left(2 + \ell \cdot \left(\ell \cdot 0.3333333333333333\right)\right)\right)\\
          \mathbf{if}\;\ell \leq -1350:\\
          \;\;\;\;t\_0\\
          
          \mathbf{elif}\;\ell \leq 800:\\
          \;\;\;\;U + \ell \cdot \left(J \cdot 2\right)\\
          
          \mathbf{else}:\\
          \;\;\;\;t\_0\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if l < -1350 or 800 < l

            1. Initial program 100.0%

              \[\left(J \cdot \left(e^{\ell} - e^{-\ell}\right)\right) \cdot \cos \left(\frac{K}{2}\right) + U \]
            2. Add Preprocessing
            3. Taylor expanded in l around 0

              \[\leadsto \mathsf{+.f64}\left(\color{blue}{\left(\ell \cdot \left(\frac{1}{3} \cdot \left(J \cdot \left({\ell}^{2} \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) + 2 \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right)\right)}, U\right) \]
            4. Step-by-step derivation
              1. distribute-rgt-inN/A

                \[\leadsto \mathsf{+.f64}\left(\left(\left(\frac{1}{3} \cdot \left(J \cdot \left({\ell}^{2} \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right)\right) \cdot \ell + \left(2 \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) \cdot \ell\right), U\right) \]
              2. fma-defineN/A

                \[\leadsto \mathsf{+.f64}\left(\left(\mathsf{fma}\left(\frac{1}{3} \cdot \left(J \cdot \left({\ell}^{2} \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right), \ell, \left(2 \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) \cdot \ell\right)\right), U\right) \]
              3. *-commutativeN/A

                \[\leadsto \mathsf{+.f64}\left(\left(\mathsf{fma}\left(\frac{1}{3} \cdot \left(J \cdot \left(\cos \left(\frac{1}{2} \cdot K\right) \cdot {\ell}^{2}\right)\right), \ell, \left(2 \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) \cdot \ell\right)\right), U\right) \]
              4. associate-*r*N/A

                \[\leadsto \mathsf{+.f64}\left(\left(\mathsf{fma}\left(\frac{1}{3} \cdot \left(\left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right) \cdot {\ell}^{2}\right), \ell, \left(2 \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) \cdot \ell\right)\right), U\right) \]
              5. associate-*l*N/A

                \[\leadsto \mathsf{+.f64}\left(\left(\mathsf{fma}\left(\left(\frac{1}{3} \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) \cdot {\ell}^{2}, \ell, \left(2 \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) \cdot \ell\right)\right), U\right) \]
              6. *-commutativeN/A

                \[\leadsto \mathsf{+.f64}\left(\left(\mathsf{fma}\left({\ell}^{2} \cdot \left(\frac{1}{3} \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right), \ell, \left(2 \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) \cdot \ell\right)\right), U\right) \]
              7. fma-undefineN/A

                \[\leadsto \mathsf{+.f64}\left(\left(\left({\ell}^{2} \cdot \left(\frac{1}{3} \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right)\right) \cdot \ell + \left(2 \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) \cdot \ell\right), U\right) \]
              8. distribute-rgt-inN/A

                \[\leadsto \mathsf{+.f64}\left(\left(\ell \cdot \left({\ell}^{2} \cdot \left(\frac{1}{3} \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) + 2 \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right)\right), U\right) \]
              9. *-lowering-*.f64N/A

                \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\ell, \left({\ell}^{2} \cdot \left(\frac{1}{3} \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) + 2 \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right)\right), U\right) \]
            5. Simplified69.0%

              \[\leadsto \color{blue}{\ell \cdot \left(\cos \left(0.5 \cdot K\right) \cdot \left(J \cdot \left(2 + 0.3333333333333333 \cdot \left(\ell \cdot \ell\right)\right)\right)\right)} + U \]
            6. Taylor expanded in J around inf

              \[\leadsto \color{blue}{J \cdot \left(\ell \cdot \left(\cos \left(\frac{1}{2} \cdot K\right) \cdot \left(2 + \frac{1}{3} \cdot {\ell}^{2}\right)\right)\right)} \]
            7. Step-by-step derivation
              1. associate-*r*N/A

                \[\leadsto J \cdot \left(\left(\ell \cdot \cos \left(\frac{1}{2} \cdot K\right)\right) \cdot \color{blue}{\left(2 + \frac{1}{3} \cdot {\ell}^{2}\right)}\right) \]
              2. associate-*r*N/A

                \[\leadsto \left(J \cdot \left(\ell \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) \cdot \color{blue}{\left(2 + \frac{1}{3} \cdot {\ell}^{2}\right)} \]
              3. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\left(J \cdot \left(\ell \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right), \color{blue}{\left(2 + \frac{1}{3} \cdot {\ell}^{2}\right)}\right) \]
              4. associate-*r*N/A

                \[\leadsto \mathsf{*.f64}\left(\left(\left(J \cdot \ell\right) \cdot \cos \left(\frac{1}{2} \cdot K\right)\right), \left(\color{blue}{2} + \frac{1}{3} \cdot {\ell}^{2}\right)\right) \]
              5. *-commutativeN/A

                \[\leadsto \mathsf{*.f64}\left(\left(\cos \left(\frac{1}{2} \cdot K\right) \cdot \left(J \cdot \ell\right)\right), \left(\color{blue}{2} + \frac{1}{3} \cdot {\ell}^{2}\right)\right) \]
              6. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\cos \left(\frac{1}{2} \cdot K\right), \left(J \cdot \ell\right)\right), \left(\color{blue}{2} + \frac{1}{3} \cdot {\ell}^{2}\right)\right) \]
              7. cos-lowering-cos.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{cos.f64}\left(\left(\frac{1}{2} \cdot K\right)\right), \left(J \cdot \ell\right)\right), \left(2 + \frac{1}{3} \cdot {\ell}^{2}\right)\right) \]
              8. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, K\right)\right), \left(J \cdot \ell\right)\right), \left(2 + \frac{1}{3} \cdot {\ell}^{2}\right)\right) \]
              9. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, K\right)\right), \mathsf{*.f64}\left(J, \ell\right)\right), \left(2 + \frac{1}{3} \cdot {\ell}^{2}\right)\right) \]
              10. +-lowering-+.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, K\right)\right), \mathsf{*.f64}\left(J, \ell\right)\right), \mathsf{+.f64}\left(2, \color{blue}{\left(\frac{1}{3} \cdot {\ell}^{2}\right)}\right)\right) \]
              11. *-commutativeN/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, K\right)\right), \mathsf{*.f64}\left(J, \ell\right)\right), \mathsf{+.f64}\left(2, \left({\ell}^{2} \cdot \color{blue}{\frac{1}{3}}\right)\right)\right) \]
              12. unpow2N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, K\right)\right), \mathsf{*.f64}\left(J, \ell\right)\right), \mathsf{+.f64}\left(2, \left(\left(\ell \cdot \ell\right) \cdot \frac{1}{3}\right)\right)\right) \]
              13. associate-*l*N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, K\right)\right), \mathsf{*.f64}\left(J, \ell\right)\right), \mathsf{+.f64}\left(2, \left(\ell \cdot \color{blue}{\left(\ell \cdot \frac{1}{3}\right)}\right)\right)\right) \]
              14. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, K\right)\right), \mathsf{*.f64}\left(J, \ell\right)\right), \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\ell, \color{blue}{\left(\ell \cdot \frac{1}{3}\right)}\right)\right)\right) \]
              15. *-lowering-*.f6469.1%

                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, K\right)\right), \mathsf{*.f64}\left(J, \ell\right)\right), \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \color{blue}{\frac{1}{3}}\right)\right)\right)\right) \]
            8. Simplified69.1%

              \[\leadsto \color{blue}{\left(\cos \left(0.5 \cdot K\right) \cdot \left(J \cdot \ell\right)\right) \cdot \left(2 + \ell \cdot \left(\ell \cdot 0.3333333333333333\right)\right)} \]
            9. Taylor expanded in K around 0

              \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\color{blue}{\left(1 + \frac{-1}{8} \cdot {K}^{2}\right)}, \mathsf{*.f64}\left(J, \ell\right)\right), \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \frac{1}{3}\right)\right)\right)\right) \]
            10. Step-by-step derivation
              1. +-lowering-+.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \left(\frac{-1}{8} \cdot {K}^{2}\right)\right), \mathsf{*.f64}\left(J, \ell\right)\right), \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \frac{1}{3}\right)\right)\right)\right) \]
              2. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{8}, \left({K}^{2}\right)\right)\right), \mathsf{*.f64}\left(J, \ell\right)\right), \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \frac{1}{3}\right)\right)\right)\right) \]
              3. unpow2N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{8}, \left(K \cdot K\right)\right)\right), \mathsf{*.f64}\left(J, \ell\right)\right), \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \frac{1}{3}\right)\right)\right)\right) \]
              4. *-lowering-*.f6457.0%

                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{*.f64}\left(K, K\right)\right)\right), \mathsf{*.f64}\left(J, \ell\right)\right), \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \frac{1}{3}\right)\right)\right)\right) \]
            11. Simplified57.0%

              \[\leadsto \left(\color{blue}{\left(1 + -0.125 \cdot \left(K \cdot K\right)\right)} \cdot \left(J \cdot \ell\right)\right) \cdot \left(2 + \ell \cdot \left(\ell \cdot 0.3333333333333333\right)\right) \]
            12. Step-by-step derivation
              1. associate-*r*N/A

                \[\leadsto \left(\left(\left(1 + \frac{-1}{8} \cdot \left(K \cdot K\right)\right) \cdot J\right) \cdot \ell\right) \cdot \left(\color{blue}{2} + \ell \cdot \left(\ell \cdot \frac{1}{3}\right)\right) \]
              2. +-commutativeN/A

                \[\leadsto \left(\left(\left(\frac{-1}{8} \cdot \left(K \cdot K\right) + 1\right) \cdot J\right) \cdot \ell\right) \cdot \left(2 + \ell \cdot \left(\ell \cdot \frac{1}{3}\right)\right) \]
              3. distribute-rgt1-inN/A

                \[\leadsto \left(\left(J + \left(\frac{-1}{8} \cdot \left(K \cdot K\right)\right) \cdot J\right) \cdot \ell\right) \cdot \left(2 + \ell \cdot \left(\ell \cdot \frac{1}{3}\right)\right) \]
              4. *-commutativeN/A

                \[\leadsto \left(\left(J + J \cdot \left(\frac{-1}{8} \cdot \left(K \cdot K\right)\right)\right) \cdot \ell\right) \cdot \left(2 + \ell \cdot \left(\ell \cdot \frac{1}{3}\right)\right) \]
              5. associate-*l*N/A

                \[\leadsto \left(J + J \cdot \left(\frac{-1}{8} \cdot \left(K \cdot K\right)\right)\right) \cdot \color{blue}{\left(\ell \cdot \left(2 + \ell \cdot \left(\ell \cdot \frac{1}{3}\right)\right)\right)} \]
              6. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\left(J + J \cdot \left(\frac{-1}{8} \cdot \left(K \cdot K\right)\right)\right), \color{blue}{\left(\ell \cdot \left(2 + \ell \cdot \left(\ell \cdot \frac{1}{3}\right)\right)\right)}\right) \]
              7. *-commutativeN/A

                \[\leadsto \mathsf{*.f64}\left(\left(J + \left(\frac{-1}{8} \cdot \left(K \cdot K\right)\right) \cdot J\right), \left(\ell \cdot \left(2 + \ell \cdot \left(\ell \cdot \frac{1}{3}\right)\right)\right)\right) \]
              8. distribute-rgt1-inN/A

                \[\leadsto \mathsf{*.f64}\left(\left(\left(\frac{-1}{8} \cdot \left(K \cdot K\right) + 1\right) \cdot J\right), \left(\color{blue}{\ell} \cdot \left(2 + \ell \cdot \left(\ell \cdot \frac{1}{3}\right)\right)\right)\right) \]
              9. +-commutativeN/A

                \[\leadsto \mathsf{*.f64}\left(\left(\left(1 + \frac{-1}{8} \cdot \left(K \cdot K\right)\right) \cdot J\right), \left(\ell \cdot \left(2 + \ell \cdot \left(\ell \cdot \frac{1}{3}\right)\right)\right)\right) \]
              10. *-commutativeN/A

                \[\leadsto \mathsf{*.f64}\left(\left(J \cdot \left(1 + \frac{-1}{8} \cdot \left(K \cdot K\right)\right)\right), \left(\color{blue}{\ell} \cdot \left(2 + \ell \cdot \left(\ell \cdot \frac{1}{3}\right)\right)\right)\right) \]
              11. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(J, \left(1 + \frac{-1}{8} \cdot \left(K \cdot K\right)\right)\right), \left(\color{blue}{\ell} \cdot \left(2 + \ell \cdot \left(\ell \cdot \frac{1}{3}\right)\right)\right)\right) \]
              12. +-lowering-+.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(J, \mathsf{+.f64}\left(1, \left(\frac{-1}{8} \cdot \left(K \cdot K\right)\right)\right)\right), \left(\ell \cdot \left(2 + \ell \cdot \left(\ell \cdot \frac{1}{3}\right)\right)\right)\right) \]
              13. associate-*r*N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(J, \mathsf{+.f64}\left(1, \left(\left(\frac{-1}{8} \cdot K\right) \cdot K\right)\right)\right), \left(\ell \cdot \left(2 + \ell \cdot \left(\ell \cdot \frac{1}{3}\right)\right)\right)\right) \]
              14. *-commutativeN/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(J, \mathsf{+.f64}\left(1, \left(K \cdot \left(\frac{-1}{8} \cdot K\right)\right)\right)\right), \left(\ell \cdot \left(2 + \ell \cdot \left(\ell \cdot \frac{1}{3}\right)\right)\right)\right) \]
              15. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(J, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(K, \left(\frac{-1}{8} \cdot K\right)\right)\right)\right), \left(\ell \cdot \left(2 + \ell \cdot \left(\ell \cdot \frac{1}{3}\right)\right)\right)\right) \]
              16. *-commutativeN/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(J, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(K, \left(K \cdot \frac{-1}{8}\right)\right)\right)\right), \left(\ell \cdot \left(2 + \ell \cdot \left(\ell \cdot \frac{1}{3}\right)\right)\right)\right) \]
              17. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(J, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(K, \mathsf{*.f64}\left(K, \frac{-1}{8}\right)\right)\right)\right), \left(\ell \cdot \left(2 + \ell \cdot \left(\ell \cdot \frac{1}{3}\right)\right)\right)\right) \]
              18. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(J, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(K, \mathsf{*.f64}\left(K, \frac{-1}{8}\right)\right)\right)\right), \mathsf{*.f64}\left(\ell, \color{blue}{\left(2 + \ell \cdot \left(\ell \cdot \frac{1}{3}\right)\right)}\right)\right) \]
            13. Applied egg-rr60.5%

              \[\leadsto \color{blue}{\left(J \cdot \left(1 + K \cdot \left(K \cdot -0.125\right)\right)\right) \cdot \left(\ell \cdot \left(2 + \ell \cdot \left(\ell \cdot 0.3333333333333333\right)\right)\right)} \]

            if -1350 < l < 800

            1. Initial program 77.9%

              \[\left(J \cdot \left(e^{\ell} - e^{-\ell}\right)\right) \cdot \cos \left(\frac{K}{2}\right) + U \]
            2. Add Preprocessing
            3. Taylor expanded in l around 0

              \[\leadsto \mathsf{+.f64}\left(\color{blue}{\left(\ell \cdot \left(\frac{1}{3} \cdot \left(J \cdot \left({\ell}^{2} \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) + 2 \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right)\right)}, U\right) \]
            4. Step-by-step derivation
              1. distribute-rgt-inN/A

                \[\leadsto \mathsf{+.f64}\left(\left(\left(\frac{1}{3} \cdot \left(J \cdot \left({\ell}^{2} \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right)\right) \cdot \ell + \left(2 \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) \cdot \ell\right), U\right) \]
              2. fma-defineN/A

                \[\leadsto \mathsf{+.f64}\left(\left(\mathsf{fma}\left(\frac{1}{3} \cdot \left(J \cdot \left({\ell}^{2} \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right), \ell, \left(2 \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) \cdot \ell\right)\right), U\right) \]
              3. *-commutativeN/A

                \[\leadsto \mathsf{+.f64}\left(\left(\mathsf{fma}\left(\frac{1}{3} \cdot \left(J \cdot \left(\cos \left(\frac{1}{2} \cdot K\right) \cdot {\ell}^{2}\right)\right), \ell, \left(2 \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) \cdot \ell\right)\right), U\right) \]
              4. associate-*r*N/A

                \[\leadsto \mathsf{+.f64}\left(\left(\mathsf{fma}\left(\frac{1}{3} \cdot \left(\left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right) \cdot {\ell}^{2}\right), \ell, \left(2 \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) \cdot \ell\right)\right), U\right) \]
              5. associate-*l*N/A

                \[\leadsto \mathsf{+.f64}\left(\left(\mathsf{fma}\left(\left(\frac{1}{3} \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) \cdot {\ell}^{2}, \ell, \left(2 \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) \cdot \ell\right)\right), U\right) \]
              6. *-commutativeN/A

                \[\leadsto \mathsf{+.f64}\left(\left(\mathsf{fma}\left({\ell}^{2} \cdot \left(\frac{1}{3} \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right), \ell, \left(2 \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) \cdot \ell\right)\right), U\right) \]
              7. fma-undefineN/A

                \[\leadsto \mathsf{+.f64}\left(\left(\left({\ell}^{2} \cdot \left(\frac{1}{3} \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right)\right) \cdot \ell + \left(2 \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) \cdot \ell\right), U\right) \]
              8. distribute-rgt-inN/A

                \[\leadsto \mathsf{+.f64}\left(\left(\ell \cdot \left({\ell}^{2} \cdot \left(\frac{1}{3} \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) + 2 \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right)\right), U\right) \]
              9. *-lowering-*.f64N/A

                \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\ell, \left({\ell}^{2} \cdot \left(\frac{1}{3} \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) + 2 \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right)\right), U\right) \]
            5. Simplified99.9%

              \[\leadsto \color{blue}{\ell \cdot \left(\cos \left(0.5 \cdot K\right) \cdot \left(J \cdot \left(2 + 0.3333333333333333 \cdot \left(\ell \cdot \ell\right)\right)\right)\right)} + U \]
            6. Taylor expanded in K around 0

              \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\ell, \color{blue}{\left(J \cdot \left(2 + \frac{1}{3} \cdot {\ell}^{2}\right)\right)}\right), U\right) \]
            7. Step-by-step derivation
              1. *-lowering-*.f64N/A

                \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(J, \left(2 + \frac{1}{3} \cdot {\ell}^{2}\right)\right)\right), U\right) \]
              2. +-lowering-+.f64N/A

                \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(J, \mathsf{+.f64}\left(2, \left(\frac{1}{3} \cdot {\ell}^{2}\right)\right)\right)\right), U\right) \]
              3. *-commutativeN/A

                \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(J, \mathsf{+.f64}\left(2, \left({\ell}^{2} \cdot \frac{1}{3}\right)\right)\right)\right), U\right) \]
              4. unpow2N/A

                \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(J, \mathsf{+.f64}\left(2, \left(\left(\ell \cdot \ell\right) \cdot \frac{1}{3}\right)\right)\right)\right), U\right) \]
              5. associate-*l*N/A

                \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(J, \mathsf{+.f64}\left(2, \left(\ell \cdot \left(\ell \cdot \frac{1}{3}\right)\right)\right)\right)\right), U\right) \]
              6. *-lowering-*.f64N/A

                \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(J, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\ell, \left(\ell \cdot \frac{1}{3}\right)\right)\right)\right)\right), U\right) \]
              7. *-lowering-*.f6486.4%

                \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(J, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \frac{1}{3}\right)\right)\right)\right)\right), U\right) \]
            8. Simplified86.4%

              \[\leadsto \ell \cdot \color{blue}{\left(J \cdot \left(2 + \ell \cdot \left(\ell \cdot 0.3333333333333333\right)\right)\right)} + U \]
            9. Taylor expanded in l around 0

              \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(J, \color{blue}{2}\right)\right), U\right) \]
            10. Step-by-step derivation
              1. Simplified86.4%

                \[\leadsto \ell \cdot \left(J \cdot \color{blue}{2}\right) + U \]
            11. Recombined 2 regimes into one program.
            12. Final simplification73.1%

              \[\leadsto \begin{array}{l} \mathbf{if}\;\ell \leq -1350:\\ \;\;\;\;\left(J \cdot \left(1 + K \cdot \left(K \cdot -0.125\right)\right)\right) \cdot \left(\ell \cdot \left(2 + \ell \cdot \left(\ell \cdot 0.3333333333333333\right)\right)\right)\\ \mathbf{elif}\;\ell \leq 800:\\ \;\;\;\;U + \ell \cdot \left(J \cdot 2\right)\\ \mathbf{else}:\\ \;\;\;\;\left(J \cdot \left(1 + K \cdot \left(K \cdot -0.125\right)\right)\right) \cdot \left(\ell \cdot \left(2 + \ell \cdot \left(\ell \cdot 0.3333333333333333\right)\right)\right)\\ \end{array} \]
            13. Add Preprocessing

            Alternative 21: 73.1% accurate, 11.1× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} t_0 := 0.3333333333333333 \cdot \left(J \cdot \left(\ell \cdot \left(\ell \cdot \ell\right)\right)\right)\\ \mathbf{if}\;\ell \leq -1.1 \cdot 10^{+62}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;\ell \leq 13800:\\ \;\;\;\;U \cdot \left(1 + \frac{J \cdot \left(2 \cdot \ell\right)}{U}\right)\\ \mathbf{elif}\;\ell \leq 7.5 \cdot 10^{+89}:\\ \;\;\;\;J \cdot \left(2 \cdot \left(\ell \cdot \left(1 + -0.125 \cdot \left(K \cdot K\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \]
            (FPCore (J l K U)
             :precision binary64
             (let* ((t_0 (* 0.3333333333333333 (* J (* l (* l l))))))
               (if (<= l -1.1e+62)
                 t_0
                 (if (<= l 13800.0)
                   (* U (+ 1.0 (/ (* J (* 2.0 l)) U)))
                   (if (<= l 7.5e+89)
                     (* J (* 2.0 (* l (+ 1.0 (* -0.125 (* K K))))))
                     t_0)))))
            double code(double J, double l, double K, double U) {
            	double t_0 = 0.3333333333333333 * (J * (l * (l * l)));
            	double tmp;
            	if (l <= -1.1e+62) {
            		tmp = t_0;
            	} else if (l <= 13800.0) {
            		tmp = U * (1.0 + ((J * (2.0 * l)) / U));
            	} else if (l <= 7.5e+89) {
            		tmp = J * (2.0 * (l * (1.0 + (-0.125 * (K * K)))));
            	} 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) :: tmp
                t_0 = 0.3333333333333333d0 * (j * (l * (l * l)))
                if (l <= (-1.1d+62)) then
                    tmp = t_0
                else if (l <= 13800.0d0) then
                    tmp = u * (1.0d0 + ((j * (2.0d0 * l)) / u))
                else if (l <= 7.5d+89) then
                    tmp = j * (2.0d0 * (l * (1.0d0 + ((-0.125d0) * (k * k)))))
                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 = 0.3333333333333333 * (J * (l * (l * l)));
            	double tmp;
            	if (l <= -1.1e+62) {
            		tmp = t_0;
            	} else if (l <= 13800.0) {
            		tmp = U * (1.0 + ((J * (2.0 * l)) / U));
            	} else if (l <= 7.5e+89) {
            		tmp = J * (2.0 * (l * (1.0 + (-0.125 * (K * K)))));
            	} else {
            		tmp = t_0;
            	}
            	return tmp;
            }
            
            def code(J, l, K, U):
            	t_0 = 0.3333333333333333 * (J * (l * (l * l)))
            	tmp = 0
            	if l <= -1.1e+62:
            		tmp = t_0
            	elif l <= 13800.0:
            		tmp = U * (1.0 + ((J * (2.0 * l)) / U))
            	elif l <= 7.5e+89:
            		tmp = J * (2.0 * (l * (1.0 + (-0.125 * (K * K)))))
            	else:
            		tmp = t_0
            	return tmp
            
            function code(J, l, K, U)
            	t_0 = Float64(0.3333333333333333 * Float64(J * Float64(l * Float64(l * l))))
            	tmp = 0.0
            	if (l <= -1.1e+62)
            		tmp = t_0;
            	elseif (l <= 13800.0)
            		tmp = Float64(U * Float64(1.0 + Float64(Float64(J * Float64(2.0 * l)) / U)));
            	elseif (l <= 7.5e+89)
            		tmp = Float64(J * Float64(2.0 * Float64(l * Float64(1.0 + Float64(-0.125 * Float64(K * K))))));
            	else
            		tmp = t_0;
            	end
            	return tmp
            end
            
            function tmp_2 = code(J, l, K, U)
            	t_0 = 0.3333333333333333 * (J * (l * (l * l)));
            	tmp = 0.0;
            	if (l <= -1.1e+62)
            		tmp = t_0;
            	elseif (l <= 13800.0)
            		tmp = U * (1.0 + ((J * (2.0 * l)) / U));
            	elseif (l <= 7.5e+89)
            		tmp = J * (2.0 * (l * (1.0 + (-0.125 * (K * K)))));
            	else
            		tmp = t_0;
            	end
            	tmp_2 = tmp;
            end
            
            code[J_, l_, K_, U_] := Block[{t$95$0 = N[(0.3333333333333333 * N[(J * N[(l * N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[l, -1.1e+62], t$95$0, If[LessEqual[l, 13800.0], N[(U * N[(1.0 + N[(N[(J * N[(2.0 * l), $MachinePrecision]), $MachinePrecision] / U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[l, 7.5e+89], N[(J * N[(2.0 * N[(l * N[(1.0 + N[(-0.125 * N[(K * K), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]]
            
            \begin{array}{l}
            
            \\
            \begin{array}{l}
            t_0 := 0.3333333333333333 \cdot \left(J \cdot \left(\ell \cdot \left(\ell \cdot \ell\right)\right)\right)\\
            \mathbf{if}\;\ell \leq -1.1 \cdot 10^{+62}:\\
            \;\;\;\;t\_0\\
            
            \mathbf{elif}\;\ell \leq 13800:\\
            \;\;\;\;U \cdot \left(1 + \frac{J \cdot \left(2 \cdot \ell\right)}{U}\right)\\
            
            \mathbf{elif}\;\ell \leq 7.5 \cdot 10^{+89}:\\
            \;\;\;\;J \cdot \left(2 \cdot \left(\ell \cdot \left(1 + -0.125 \cdot \left(K \cdot K\right)\right)\right)\right)\\
            
            \mathbf{else}:\\
            \;\;\;\;t\_0\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 3 regimes
            2. if l < -1.10000000000000007e62 or 7.49999999999999947e89 < l

              1. Initial program 100.0%

                \[\left(J \cdot \left(e^{\ell} - e^{-\ell}\right)\right) \cdot \cos \left(\frac{K}{2}\right) + U \]
              2. Add Preprocessing
              3. Taylor expanded in l around 0

                \[\leadsto \mathsf{+.f64}\left(\color{blue}{\left(\ell \cdot \left(\frac{1}{3} \cdot \left(J \cdot \left({\ell}^{2} \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) + 2 \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right)\right)}, U\right) \]
              4. Step-by-step derivation
                1. distribute-rgt-inN/A

                  \[\leadsto \mathsf{+.f64}\left(\left(\left(\frac{1}{3} \cdot \left(J \cdot \left({\ell}^{2} \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right)\right) \cdot \ell + \left(2 \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) \cdot \ell\right), U\right) \]
                2. fma-defineN/A

                  \[\leadsto \mathsf{+.f64}\left(\left(\mathsf{fma}\left(\frac{1}{3} \cdot \left(J \cdot \left({\ell}^{2} \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right), \ell, \left(2 \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) \cdot \ell\right)\right), U\right) \]
                3. *-commutativeN/A

                  \[\leadsto \mathsf{+.f64}\left(\left(\mathsf{fma}\left(\frac{1}{3} \cdot \left(J \cdot \left(\cos \left(\frac{1}{2} \cdot K\right) \cdot {\ell}^{2}\right)\right), \ell, \left(2 \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) \cdot \ell\right)\right), U\right) \]
                4. associate-*r*N/A

                  \[\leadsto \mathsf{+.f64}\left(\left(\mathsf{fma}\left(\frac{1}{3} \cdot \left(\left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right) \cdot {\ell}^{2}\right), \ell, \left(2 \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) \cdot \ell\right)\right), U\right) \]
                5. associate-*l*N/A

                  \[\leadsto \mathsf{+.f64}\left(\left(\mathsf{fma}\left(\left(\frac{1}{3} \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) \cdot {\ell}^{2}, \ell, \left(2 \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) \cdot \ell\right)\right), U\right) \]
                6. *-commutativeN/A

                  \[\leadsto \mathsf{+.f64}\left(\left(\mathsf{fma}\left({\ell}^{2} \cdot \left(\frac{1}{3} \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right), \ell, \left(2 \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) \cdot \ell\right)\right), U\right) \]
                7. fma-undefineN/A

                  \[\leadsto \mathsf{+.f64}\left(\left(\left({\ell}^{2} \cdot \left(\frac{1}{3} \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right)\right) \cdot \ell + \left(2 \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) \cdot \ell\right), U\right) \]
                8. distribute-rgt-inN/A

                  \[\leadsto \mathsf{+.f64}\left(\left(\ell \cdot \left({\ell}^{2} \cdot \left(\frac{1}{3} \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) + 2 \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right)\right), U\right) \]
                9. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\ell, \left({\ell}^{2} \cdot \left(\frac{1}{3} \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) + 2 \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right)\right), U\right) \]
              5. Simplified86.2%

                \[\leadsto \color{blue}{\ell \cdot \left(\cos \left(0.5 \cdot K\right) \cdot \left(J \cdot \left(2 + 0.3333333333333333 \cdot \left(\ell \cdot \ell\right)\right)\right)\right)} + U \]
              6. Taylor expanded in K around 0

                \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\ell, \color{blue}{\left(J \cdot \left(2 + \frac{1}{3} \cdot {\ell}^{2}\right)\right)}\right), U\right) \]
              7. Step-by-step derivation
                1. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(J, \left(2 + \frac{1}{3} \cdot {\ell}^{2}\right)\right)\right), U\right) \]
                2. +-lowering-+.f64N/A

                  \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(J, \mathsf{+.f64}\left(2, \left(\frac{1}{3} \cdot {\ell}^{2}\right)\right)\right)\right), U\right) \]
                3. *-commutativeN/A

                  \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(J, \mathsf{+.f64}\left(2, \left({\ell}^{2} \cdot \frac{1}{3}\right)\right)\right)\right), U\right) \]
                4. unpow2N/A

                  \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(J, \mathsf{+.f64}\left(2, \left(\left(\ell \cdot \ell\right) \cdot \frac{1}{3}\right)\right)\right)\right), U\right) \]
                5. associate-*l*N/A

                  \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(J, \mathsf{+.f64}\left(2, \left(\ell \cdot \left(\ell \cdot \frac{1}{3}\right)\right)\right)\right)\right), U\right) \]
                6. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(J, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\ell, \left(\ell \cdot \frac{1}{3}\right)\right)\right)\right)\right), U\right) \]
                7. *-lowering-*.f6464.4%

                  \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(J, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \frac{1}{3}\right)\right)\right)\right)\right), U\right) \]
              8. Simplified64.4%

                \[\leadsto \ell \cdot \color{blue}{\left(J \cdot \left(2 + \ell \cdot \left(\ell \cdot 0.3333333333333333\right)\right)\right)} + U \]
              9. Taylor expanded in l around inf

                \[\leadsto \color{blue}{\frac{1}{3} \cdot \left(J \cdot {\ell}^{3}\right)} \]
              10. Step-by-step derivation
                1. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{*.f64}\left(\frac{1}{3}, \color{blue}{\left(J \cdot {\ell}^{3}\right)}\right) \]
                2. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{*.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(J, \color{blue}{\left({\ell}^{3}\right)}\right)\right) \]
                3. cube-multN/A

                  \[\leadsto \mathsf{*.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(J, \left(\ell \cdot \color{blue}{\left(\ell \cdot \ell\right)}\right)\right)\right) \]
                4. unpow2N/A

                  \[\leadsto \mathsf{*.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(J, \left(\ell \cdot {\ell}^{\color{blue}{2}}\right)\right)\right) \]
                5. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{*.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\ell, \color{blue}{\left({\ell}^{2}\right)}\right)\right)\right) \]
                6. unpow2N/A

                  \[\leadsto \mathsf{*.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\ell, \left(\ell \cdot \color{blue}{\ell}\right)\right)\right)\right) \]
                7. *-lowering-*.f6469.8%

                  \[\leadsto \mathsf{*.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \color{blue}{\ell}\right)\right)\right)\right) \]
              11. Simplified69.8%

                \[\leadsto \color{blue}{0.3333333333333333 \cdot \left(J \cdot \left(\ell \cdot \left(\ell \cdot \ell\right)\right)\right)} \]

              if -1.10000000000000007e62 < l < 13800

              1. Initial program 80.3%

                \[\left(J \cdot \left(e^{\ell} - e^{-\ell}\right)\right) \cdot \cos \left(\frac{K}{2}\right) + U \]
              2. Add Preprocessing
              3. Taylor expanded in l around 0

                \[\leadsto \mathsf{+.f64}\left(\color{blue}{\left(\ell \cdot \left(\frac{1}{3} \cdot \left(J \cdot \left({\ell}^{2} \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) + 2 \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right)\right)}, U\right) \]
              4. Step-by-step derivation
                1. distribute-rgt-inN/A

                  \[\leadsto \mathsf{+.f64}\left(\left(\left(\frac{1}{3} \cdot \left(J \cdot \left({\ell}^{2} \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right)\right) \cdot \ell + \left(2 \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) \cdot \ell\right), U\right) \]
                2. fma-defineN/A

                  \[\leadsto \mathsf{+.f64}\left(\left(\mathsf{fma}\left(\frac{1}{3} \cdot \left(J \cdot \left({\ell}^{2} \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right), \ell, \left(2 \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) \cdot \ell\right)\right), U\right) \]
                3. *-commutativeN/A

                  \[\leadsto \mathsf{+.f64}\left(\left(\mathsf{fma}\left(\frac{1}{3} \cdot \left(J \cdot \left(\cos \left(\frac{1}{2} \cdot K\right) \cdot {\ell}^{2}\right)\right), \ell, \left(2 \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) \cdot \ell\right)\right), U\right) \]
                4. associate-*r*N/A

                  \[\leadsto \mathsf{+.f64}\left(\left(\mathsf{fma}\left(\frac{1}{3} \cdot \left(\left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right) \cdot {\ell}^{2}\right), \ell, \left(2 \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) \cdot \ell\right)\right), U\right) \]
                5. associate-*l*N/A

                  \[\leadsto \mathsf{+.f64}\left(\left(\mathsf{fma}\left(\left(\frac{1}{3} \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) \cdot {\ell}^{2}, \ell, \left(2 \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) \cdot \ell\right)\right), U\right) \]
                6. *-commutativeN/A

                  \[\leadsto \mathsf{+.f64}\left(\left(\mathsf{fma}\left({\ell}^{2} \cdot \left(\frac{1}{3} \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right), \ell, \left(2 \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) \cdot \ell\right)\right), U\right) \]
                7. fma-undefineN/A

                  \[\leadsto \mathsf{+.f64}\left(\left(\left({\ell}^{2} \cdot \left(\frac{1}{3} \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right)\right) \cdot \ell + \left(2 \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) \cdot \ell\right), U\right) \]
                8. distribute-rgt-inN/A

                  \[\leadsto \mathsf{+.f64}\left(\left(\ell \cdot \left({\ell}^{2} \cdot \left(\frac{1}{3} \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) + 2 \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right)\right), U\right) \]
                9. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\ell, \left({\ell}^{2} \cdot \left(\frac{1}{3} \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) + 2 \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right)\right), U\right) \]
              5. Simplified89.6%

                \[\leadsto \color{blue}{\ell \cdot \left(\cos \left(0.5 \cdot K\right) \cdot \left(J \cdot \left(2 + 0.3333333333333333 \cdot \left(\ell \cdot \ell\right)\right)\right)\right)} + U \]
              6. Taylor expanded in K around 0

                \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\ell, \color{blue}{\left(J \cdot \left(2 + \frac{1}{3} \cdot {\ell}^{2}\right)\right)}\right), U\right) \]
              7. Step-by-step derivation
                1. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(J, \left(2 + \frac{1}{3} \cdot {\ell}^{2}\right)\right)\right), U\right) \]
                2. +-lowering-+.f64N/A

                  \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(J, \mathsf{+.f64}\left(2, \left(\frac{1}{3} \cdot {\ell}^{2}\right)\right)\right)\right), U\right) \]
                3. *-commutativeN/A

                  \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(J, \mathsf{+.f64}\left(2, \left({\ell}^{2} \cdot \frac{1}{3}\right)\right)\right)\right), U\right) \]
                4. unpow2N/A

                  \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(J, \mathsf{+.f64}\left(2, \left(\left(\ell \cdot \ell\right) \cdot \frac{1}{3}\right)\right)\right)\right), U\right) \]
                5. associate-*l*N/A

                  \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(J, \mathsf{+.f64}\left(2, \left(\ell \cdot \left(\ell \cdot \frac{1}{3}\right)\right)\right)\right)\right), U\right) \]
                6. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(J, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\ell, \left(\ell \cdot \frac{1}{3}\right)\right)\right)\right)\right), U\right) \]
                7. *-lowering-*.f6477.5%

                  \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(J, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \frac{1}{3}\right)\right)\right)\right)\right), U\right) \]
              8. Simplified77.5%

                \[\leadsto \ell \cdot \color{blue}{\left(J \cdot \left(2 + \ell \cdot \left(\ell \cdot 0.3333333333333333\right)\right)\right)} + U \]
              9. Taylor expanded in l around 0

                \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(J, \color{blue}{2}\right)\right), U\right) \]
              10. Step-by-step derivation
                1. Simplified77.4%

                  \[\leadsto \ell \cdot \left(J \cdot \color{blue}{2}\right) + U \]
                2. Taylor expanded in U around inf

                  \[\leadsto \color{blue}{U \cdot \left(1 + 2 \cdot \frac{J \cdot \ell}{U}\right)} \]
                3. Step-by-step derivation
                  1. *-lowering-*.f64N/A

                    \[\leadsto \mathsf{*.f64}\left(U, \color{blue}{\left(1 + 2 \cdot \frac{J \cdot \ell}{U}\right)}\right) \]
                  2. +-lowering-+.f64N/A

                    \[\leadsto \mathsf{*.f64}\left(U, \mathsf{+.f64}\left(1, \color{blue}{\left(2 \cdot \frac{J \cdot \ell}{U}\right)}\right)\right) \]
                  3. associate-*r/N/A

                    \[\leadsto \mathsf{*.f64}\left(U, \mathsf{+.f64}\left(1, \left(\frac{2 \cdot \left(J \cdot \ell\right)}{\color{blue}{U}}\right)\right)\right) \]
                  4. /-lowering-/.f64N/A

                    \[\leadsto \mathsf{*.f64}\left(U, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\left(2 \cdot \left(J \cdot \ell\right)\right), \color{blue}{U}\right)\right)\right) \]
                  5. *-commutativeN/A

                    \[\leadsto \mathsf{*.f64}\left(U, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\left(\left(J \cdot \ell\right) \cdot 2\right), U\right)\right)\right) \]
                  6. associate-*r*N/A

                    \[\leadsto \mathsf{*.f64}\left(U, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\left(J \cdot \left(\ell \cdot 2\right)\right), U\right)\right)\right) \]
                  7. *-commutativeN/A

                    \[\leadsto \mathsf{*.f64}\left(U, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\left(J \cdot \left(2 \cdot \ell\right)\right), U\right)\right)\right) \]
                  8. *-lowering-*.f64N/A

                    \[\leadsto \mathsf{*.f64}\left(U, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(J, \left(2 \cdot \ell\right)\right), U\right)\right)\right) \]
                  9. *-commutativeN/A

                    \[\leadsto \mathsf{*.f64}\left(U, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(J, \left(\ell \cdot 2\right)\right), U\right)\right)\right) \]
                  10. *-lowering-*.f6477.9%

                    \[\leadsto \mathsf{*.f64}\left(U, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\ell, 2\right)\right), U\right)\right)\right) \]
                4. Simplified77.9%

                  \[\leadsto \color{blue}{U \cdot \left(1 + \frac{J \cdot \left(\ell \cdot 2\right)}{U}\right)} \]

                if 13800 < l < 7.49999999999999947e89

                1. Initial program 100.0%

                  \[\left(J \cdot \left(e^{\ell} - e^{-\ell}\right)\right) \cdot \cos \left(\frac{K}{2}\right) + U \]
                2. Add Preprocessing
                3. Taylor expanded in l around 0

                  \[\leadsto \mathsf{+.f64}\left(\color{blue}{\left(\ell \cdot \left(\frac{1}{3} \cdot \left(J \cdot \left({\ell}^{2} \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) + 2 \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right)\right)}, U\right) \]
                4. Step-by-step derivation
                  1. distribute-rgt-inN/A

                    \[\leadsto \mathsf{+.f64}\left(\left(\left(\frac{1}{3} \cdot \left(J \cdot \left({\ell}^{2} \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right)\right) \cdot \ell + \left(2 \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) \cdot \ell\right), U\right) \]
                  2. fma-defineN/A

                    \[\leadsto \mathsf{+.f64}\left(\left(\mathsf{fma}\left(\frac{1}{3} \cdot \left(J \cdot \left({\ell}^{2} \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right), \ell, \left(2 \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) \cdot \ell\right)\right), U\right) \]
                  3. *-commutativeN/A

                    \[\leadsto \mathsf{+.f64}\left(\left(\mathsf{fma}\left(\frac{1}{3} \cdot \left(J \cdot \left(\cos \left(\frac{1}{2} \cdot K\right) \cdot {\ell}^{2}\right)\right), \ell, \left(2 \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) \cdot \ell\right)\right), U\right) \]
                  4. associate-*r*N/A

                    \[\leadsto \mathsf{+.f64}\left(\left(\mathsf{fma}\left(\frac{1}{3} \cdot \left(\left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right) \cdot {\ell}^{2}\right), \ell, \left(2 \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) \cdot \ell\right)\right), U\right) \]
                  5. associate-*l*N/A

                    \[\leadsto \mathsf{+.f64}\left(\left(\mathsf{fma}\left(\left(\frac{1}{3} \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) \cdot {\ell}^{2}, \ell, \left(2 \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) \cdot \ell\right)\right), U\right) \]
                  6. *-commutativeN/A

                    \[\leadsto \mathsf{+.f64}\left(\left(\mathsf{fma}\left({\ell}^{2} \cdot \left(\frac{1}{3} \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right), \ell, \left(2 \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) \cdot \ell\right)\right), U\right) \]
                  7. fma-undefineN/A

                    \[\leadsto \mathsf{+.f64}\left(\left(\left({\ell}^{2} \cdot \left(\frac{1}{3} \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right)\right) \cdot \ell + \left(2 \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) \cdot \ell\right), U\right) \]
                  8. distribute-rgt-inN/A

                    \[\leadsto \mathsf{+.f64}\left(\left(\ell \cdot \left({\ell}^{2} \cdot \left(\frac{1}{3} \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) + 2 \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right)\right), U\right) \]
                  9. *-lowering-*.f64N/A

                    \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\ell, \left({\ell}^{2} \cdot \left(\frac{1}{3} \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) + 2 \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right)\right), U\right) \]
                5. Simplified17.1%

                  \[\leadsto \color{blue}{\ell \cdot \left(\cos \left(0.5 \cdot K\right) \cdot \left(J \cdot \left(2 + 0.3333333333333333 \cdot \left(\ell \cdot \ell\right)\right)\right)\right)} + U \]
                6. Taylor expanded in J around inf

                  \[\leadsto \color{blue}{J \cdot \left(\ell \cdot \left(\cos \left(\frac{1}{2} \cdot K\right) \cdot \left(2 + \frac{1}{3} \cdot {\ell}^{2}\right)\right)\right)} \]
                7. Step-by-step derivation
                  1. associate-*r*N/A

                    \[\leadsto J \cdot \left(\left(\ell \cdot \cos \left(\frac{1}{2} \cdot K\right)\right) \cdot \color{blue}{\left(2 + \frac{1}{3} \cdot {\ell}^{2}\right)}\right) \]
                  2. associate-*r*N/A

                    \[\leadsto \left(J \cdot \left(\ell \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) \cdot \color{blue}{\left(2 + \frac{1}{3} \cdot {\ell}^{2}\right)} \]
                  3. *-lowering-*.f64N/A

                    \[\leadsto \mathsf{*.f64}\left(\left(J \cdot \left(\ell \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right), \color{blue}{\left(2 + \frac{1}{3} \cdot {\ell}^{2}\right)}\right) \]
                  4. associate-*r*N/A

                    \[\leadsto \mathsf{*.f64}\left(\left(\left(J \cdot \ell\right) \cdot \cos \left(\frac{1}{2} \cdot K\right)\right), \left(\color{blue}{2} + \frac{1}{3} \cdot {\ell}^{2}\right)\right) \]
                  5. *-commutativeN/A

                    \[\leadsto \mathsf{*.f64}\left(\left(\cos \left(\frac{1}{2} \cdot K\right) \cdot \left(J \cdot \ell\right)\right), \left(\color{blue}{2} + \frac{1}{3} \cdot {\ell}^{2}\right)\right) \]
                  6. *-lowering-*.f64N/A

                    \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\cos \left(\frac{1}{2} \cdot K\right), \left(J \cdot \ell\right)\right), \left(\color{blue}{2} + \frac{1}{3} \cdot {\ell}^{2}\right)\right) \]
                  7. cos-lowering-cos.f64N/A

                    \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{cos.f64}\left(\left(\frac{1}{2} \cdot K\right)\right), \left(J \cdot \ell\right)\right), \left(2 + \frac{1}{3} \cdot {\ell}^{2}\right)\right) \]
                  8. *-lowering-*.f64N/A

                    \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, K\right)\right), \left(J \cdot \ell\right)\right), \left(2 + \frac{1}{3} \cdot {\ell}^{2}\right)\right) \]
                  9. *-lowering-*.f64N/A

                    \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, K\right)\right), \mathsf{*.f64}\left(J, \ell\right)\right), \left(2 + \frac{1}{3} \cdot {\ell}^{2}\right)\right) \]
                  10. +-lowering-+.f64N/A

                    \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, K\right)\right), \mathsf{*.f64}\left(J, \ell\right)\right), \mathsf{+.f64}\left(2, \color{blue}{\left(\frac{1}{3} \cdot {\ell}^{2}\right)}\right)\right) \]
                  11. *-commutativeN/A

                    \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, K\right)\right), \mathsf{*.f64}\left(J, \ell\right)\right), \mathsf{+.f64}\left(2, \left({\ell}^{2} \cdot \color{blue}{\frac{1}{3}}\right)\right)\right) \]
                  12. unpow2N/A

                    \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, K\right)\right), \mathsf{*.f64}\left(J, \ell\right)\right), \mathsf{+.f64}\left(2, \left(\left(\ell \cdot \ell\right) \cdot \frac{1}{3}\right)\right)\right) \]
                  13. associate-*l*N/A

                    \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, K\right)\right), \mathsf{*.f64}\left(J, \ell\right)\right), \mathsf{+.f64}\left(2, \left(\ell \cdot \color{blue}{\left(\ell \cdot \frac{1}{3}\right)}\right)\right)\right) \]
                  14. *-lowering-*.f64N/A

                    \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, K\right)\right), \mathsf{*.f64}\left(J, \ell\right)\right), \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\ell, \color{blue}{\left(\ell \cdot \frac{1}{3}\right)}\right)\right)\right) \]
                  15. *-lowering-*.f6417.8%

                    \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, K\right)\right), \mathsf{*.f64}\left(J, \ell\right)\right), \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \color{blue}{\frac{1}{3}}\right)\right)\right)\right) \]
                8. Simplified17.8%

                  \[\leadsto \color{blue}{\left(\cos \left(0.5 \cdot K\right) \cdot \left(J \cdot \ell\right)\right) \cdot \left(2 + \ell \cdot \left(\ell \cdot 0.3333333333333333\right)\right)} \]
                9. Taylor expanded in K around 0

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\color{blue}{\left(1 + \frac{-1}{8} \cdot {K}^{2}\right)}, \mathsf{*.f64}\left(J, \ell\right)\right), \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \frac{1}{3}\right)\right)\right)\right) \]
                10. Step-by-step derivation
                  1. +-lowering-+.f64N/A

                    \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \left(\frac{-1}{8} \cdot {K}^{2}\right)\right), \mathsf{*.f64}\left(J, \ell\right)\right), \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \frac{1}{3}\right)\right)\right)\right) \]
                  2. *-lowering-*.f64N/A

                    \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{8}, \left({K}^{2}\right)\right)\right), \mathsf{*.f64}\left(J, \ell\right)\right), \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \frac{1}{3}\right)\right)\right)\right) \]
                  3. unpow2N/A

                    \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{8}, \left(K \cdot K\right)\right)\right), \mathsf{*.f64}\left(J, \ell\right)\right), \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \frac{1}{3}\right)\right)\right)\right) \]
                  4. *-lowering-*.f6442.2%

                    \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{*.f64}\left(K, K\right)\right)\right), \mathsf{*.f64}\left(J, \ell\right)\right), \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \frac{1}{3}\right)\right)\right)\right) \]
                11. Simplified42.2%

                  \[\leadsto \left(\color{blue}{\left(1 + -0.125 \cdot \left(K \cdot K\right)\right)} \cdot \left(J \cdot \ell\right)\right) \cdot \left(2 + \ell \cdot \left(\ell \cdot 0.3333333333333333\right)\right) \]
                12. Taylor expanded in l around 0

                  \[\leadsto \color{blue}{2 \cdot \left(J \cdot \left(\ell \cdot \left(1 + \frac{-1}{8} \cdot {K}^{2}\right)\right)\right)} \]
                13. Step-by-step derivation
                  1. *-commutativeN/A

                    \[\leadsto \left(J \cdot \left(\ell \cdot \left(1 + \frac{-1}{8} \cdot {K}^{2}\right)\right)\right) \cdot \color{blue}{2} \]
                  2. associate-*l*N/A

                    \[\leadsto J \cdot \color{blue}{\left(\left(\ell \cdot \left(1 + \frac{-1}{8} \cdot {K}^{2}\right)\right) \cdot 2\right)} \]
                  3. *-lowering-*.f64N/A

                    \[\leadsto \mathsf{*.f64}\left(J, \color{blue}{\left(\left(\ell \cdot \left(1 + \frac{-1}{8} \cdot {K}^{2}\right)\right) \cdot 2\right)}\right) \]
                  4. *-lowering-*.f64N/A

                    \[\leadsto \mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\left(\ell \cdot \left(1 + \frac{-1}{8} \cdot {K}^{2}\right)\right), \color{blue}{2}\right)\right) \]
                  5. *-lowering-*.f64N/A

                    \[\leadsto \mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \left(1 + \frac{-1}{8} \cdot {K}^{2}\right)\right), 2\right)\right) \]
                  6. +-lowering-+.f64N/A

                    \[\leadsto \mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(1, \left(\frac{-1}{8} \cdot {K}^{2}\right)\right)\right), 2\right)\right) \]
                  7. *-lowering-*.f64N/A

                    \[\leadsto \mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{8}, \left({K}^{2}\right)\right)\right)\right), 2\right)\right) \]
                  8. unpow2N/A

                    \[\leadsto \mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{8}, \left(K \cdot K\right)\right)\right)\right), 2\right)\right) \]
                  9. *-lowering-*.f6435.4%

                    \[\leadsto \mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{*.f64}\left(K, K\right)\right)\right)\right), 2\right)\right) \]
                14. Simplified35.4%

                  \[\leadsto \color{blue}{J \cdot \left(\left(\ell \cdot \left(1 + -0.125 \cdot \left(K \cdot K\right)\right)\right) \cdot 2\right)} \]
              11. Recombined 3 regimes into one program.
              12. Final simplification72.2%

                \[\leadsto \begin{array}{l} \mathbf{if}\;\ell \leq -1.1 \cdot 10^{+62}:\\ \;\;\;\;0.3333333333333333 \cdot \left(J \cdot \left(\ell \cdot \left(\ell \cdot \ell\right)\right)\right)\\ \mathbf{elif}\;\ell \leq 13800:\\ \;\;\;\;U \cdot \left(1 + \frac{J \cdot \left(2 \cdot \ell\right)}{U}\right)\\ \mathbf{elif}\;\ell \leq 7.5 \cdot 10^{+89}:\\ \;\;\;\;J \cdot \left(2 \cdot \left(\ell \cdot \left(1 + -0.125 \cdot \left(K \cdot K\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;0.3333333333333333 \cdot \left(J \cdot \left(\ell \cdot \left(\ell \cdot \ell\right)\right)\right)\\ \end{array} \]
              13. Add Preprocessing

              Alternative 22: 75.1% accurate, 12.0× speedup?

              \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;U \leq 4.8 \cdot 10^{+196}:\\ \;\;\;\;U + J \cdot \left(\ell \cdot \left(2 + \left(\ell \cdot \ell\right) \cdot \left(0.3333333333333333 + \left(\ell \cdot \ell\right) \cdot 0.016666666666666666\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;U + \ell \cdot \left(\left(J \cdot \left(2 + \left(\ell \cdot \ell\right) \cdot 0.3333333333333333\right)\right) \cdot \left(1 + -0.125 \cdot \left(K \cdot K\right)\right)\right)\\ \end{array} \end{array} \]
              (FPCore (J l K U)
               :precision binary64
               (if (<= U 4.8e+196)
                 (+
                  U
                  (*
                   J
                   (*
                    l
                    (+
                     2.0
                     (* (* l l) (+ 0.3333333333333333 (* (* l l) 0.016666666666666666)))))))
                 (+
                  U
                  (*
                   l
                   (*
                    (* J (+ 2.0 (* (* l l) 0.3333333333333333)))
                    (+ 1.0 (* -0.125 (* K K))))))))
              double code(double J, double l, double K, double U) {
              	double tmp;
              	if (U <= 4.8e+196) {
              		tmp = U + (J * (l * (2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * 0.016666666666666666))))));
              	} else {
              		tmp = U + (l * ((J * (2.0 + ((l * l) * 0.3333333333333333))) * (1.0 + (-0.125 * (K * 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 (u <= 4.8d+196) then
                      tmp = u + (j * (l * (2.0d0 + ((l * l) * (0.3333333333333333d0 + ((l * l) * 0.016666666666666666d0))))))
                  else
                      tmp = u + (l * ((j * (2.0d0 + ((l * l) * 0.3333333333333333d0))) * (1.0d0 + ((-0.125d0) * (k * k)))))
                  end if
                  code = tmp
              end function
              
              public static double code(double J, double l, double K, double U) {
              	double tmp;
              	if (U <= 4.8e+196) {
              		tmp = U + (J * (l * (2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * 0.016666666666666666))))));
              	} else {
              		tmp = U + (l * ((J * (2.0 + ((l * l) * 0.3333333333333333))) * (1.0 + (-0.125 * (K * K)))));
              	}
              	return tmp;
              }
              
              def code(J, l, K, U):
              	tmp = 0
              	if U <= 4.8e+196:
              		tmp = U + (J * (l * (2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * 0.016666666666666666))))))
              	else:
              		tmp = U + (l * ((J * (2.0 + ((l * l) * 0.3333333333333333))) * (1.0 + (-0.125 * (K * K)))))
              	return tmp
              
              function code(J, l, K, U)
              	tmp = 0.0
              	if (U <= 4.8e+196)
              		tmp = Float64(U + Float64(J * Float64(l * Float64(2.0 + Float64(Float64(l * l) * Float64(0.3333333333333333 + Float64(Float64(l * l) * 0.016666666666666666)))))));
              	else
              		tmp = Float64(U + Float64(l * Float64(Float64(J * Float64(2.0 + Float64(Float64(l * l) * 0.3333333333333333))) * Float64(1.0 + Float64(-0.125 * Float64(K * K))))));
              	end
              	return tmp
              end
              
              function tmp_2 = code(J, l, K, U)
              	tmp = 0.0;
              	if (U <= 4.8e+196)
              		tmp = U + (J * (l * (2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * 0.016666666666666666))))));
              	else
              		tmp = U + (l * ((J * (2.0 + ((l * l) * 0.3333333333333333))) * (1.0 + (-0.125 * (K * K)))));
              	end
              	tmp_2 = tmp;
              end
              
              code[J_, l_, K_, U_] := If[LessEqual[U, 4.8e+196], N[(U + N[(J * N[(l * N[(2.0 + N[(N[(l * l), $MachinePrecision] * N[(0.3333333333333333 + N[(N[(l * l), $MachinePrecision] * 0.016666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(U + N[(l * N[(N[(J * N[(2.0 + N[(N[(l * l), $MachinePrecision] * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(1.0 + N[(-0.125 * N[(K * K), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
              
              \begin{array}{l}
              
              \\
              \begin{array}{l}
              \mathbf{if}\;U \leq 4.8 \cdot 10^{+196}:\\
              \;\;\;\;U + J \cdot \left(\ell \cdot \left(2 + \left(\ell \cdot \ell\right) \cdot \left(0.3333333333333333 + \left(\ell \cdot \ell\right) \cdot 0.016666666666666666\right)\right)\right)\\
              
              \mathbf{else}:\\
              \;\;\;\;U + \ell \cdot \left(\left(J \cdot \left(2 + \left(\ell \cdot \ell\right) \cdot 0.3333333333333333\right)\right) \cdot \left(1 + -0.125 \cdot \left(K \cdot K\right)\right)\right)\\
              
              
              \end{array}
              \end{array}
              
              Derivation
              1. Split input into 2 regimes
              2. if U < 4.8000000000000001e196

                1. Initial program 88.3%

                  \[\left(J \cdot \left(e^{\ell} - e^{-\ell}\right)\right) \cdot \cos \left(\frac{K}{2}\right) + U \]
                2. Step-by-step derivation
                  1. +-lowering-+.f64N/A

                    \[\leadsto \mathsf{+.f64}\left(\left(\left(J \cdot \left(e^{\ell} - e^{\mathsf{neg}\left(\ell\right)}\right)\right) \cdot \cos \left(\frac{K}{2}\right)\right), \color{blue}{U}\right) \]
                  2. associate-*l*N/A

                    \[\leadsto \mathsf{+.f64}\left(\left(J \cdot \left(\left(e^{\ell} - e^{\mathsf{neg}\left(\ell\right)}\right) \cdot \cos \left(\frac{K}{2}\right)\right)\right), U\right) \]
                  3. *-commutativeN/A

                    \[\leadsto \mathsf{+.f64}\left(\left(\left(\left(e^{\ell} - e^{\mathsf{neg}\left(\ell\right)}\right) \cdot \cos \left(\frac{K}{2}\right)\right) \cdot J\right), U\right) \]
                  4. associate-*l*N/A

                    \[\leadsto \mathsf{+.f64}\left(\left(\left(e^{\ell} - e^{\mathsf{neg}\left(\ell\right)}\right) \cdot \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
                  5. *-lowering-*.f64N/A

                    \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(e^{\ell} - e^{\mathsf{neg}\left(\ell\right)}\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
                  6. sub-negN/A

                    \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(e^{\ell} + \left(\mathsf{neg}\left(e^{\mathsf{neg}\left(\ell\right)}\right)\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
                  7. +-lowering-+.f64N/A

                    \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\left(e^{\ell}\right), \left(\mathsf{neg}\left(e^{\mathsf{neg}\left(\ell\right)}\right)\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
                  8. exp-lowering-exp.f64N/A

                    \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \left(\mathsf{neg}\left(e^{\mathsf{neg}\left(\ell\right)}\right)\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
                  9. exp-negN/A

                    \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \left(\mathsf{neg}\left(\frac{1}{e^{\ell}}\right)\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
                  10. distribute-neg-fracN/A

                    \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \left(\frac{\mathsf{neg}\left(1\right)}{e^{\ell}}\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
                  11. metadata-evalN/A

                    \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \left(\frac{-1}{e^{\ell}}\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
                  12. /-lowering-/.f64N/A

                    \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \mathsf{/.f64}\left(-1, \left(e^{\ell}\right)\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
                  13. exp-lowering-exp.f64N/A

                    \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \mathsf{/.f64}\left(-1, \mathsf{exp.f64}\left(\ell\right)\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
                  14. *-commutativeN/A

                    \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \mathsf{/.f64}\left(-1, \mathsf{exp.f64}\left(\ell\right)\right)\right), \left(J \cdot \cos \left(\frac{K}{2}\right)\right)\right), U\right) \]
                  15. *-lowering-*.f64N/A

                    \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \mathsf{/.f64}\left(-1, \mathsf{exp.f64}\left(\ell\right)\right)\right), \mathsf{*.f64}\left(J, \cos \left(\frac{K}{2}\right)\right)\right), U\right) \]
                  16. cos-lowering-cos.f64N/A

                    \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \mathsf{/.f64}\left(-1, \mathsf{exp.f64}\left(\ell\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\left(\frac{K}{2}\right)\right)\right)\right), U\right) \]
                  17. /-lowering-/.f6488.3%

                    \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \mathsf{/.f64}\left(-1, \mathsf{exp.f64}\left(\ell\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
                3. Simplified88.3%

                  \[\leadsto \color{blue}{\left(e^{\ell} + \frac{-1}{e^{\ell}}\right) \cdot \left(J \cdot \cos \left(\frac{K}{2}\right)\right) + U} \]
                4. Add Preprocessing
                5. Taylor expanded in l around 0

                  \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\color{blue}{\left(\ell \cdot \left(2 + {\ell}^{2} \cdot \left(\frac{1}{3} + \frac{1}{60} \cdot {\ell}^{2}\right)\right)\right)}, \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
                6. Step-by-step derivation
                  1. *-lowering-*.f64N/A

                    \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \left(2 + {\ell}^{2} \cdot \left(\frac{1}{3} + \frac{1}{60} \cdot {\ell}^{2}\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
                  2. +-lowering-+.f64N/A

                    \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \left({\ell}^{2} \cdot \left(\frac{1}{3} + \frac{1}{60} \cdot {\ell}^{2}\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
                  3. *-lowering-*.f64N/A

                    \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\left({\ell}^{2}\right), \left(\frac{1}{3} + \frac{1}{60} \cdot {\ell}^{2}\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
                  4. unpow2N/A

                    \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\left(\ell \cdot \ell\right), \left(\frac{1}{3} + \frac{1}{60} \cdot {\ell}^{2}\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
                  5. *-lowering-*.f64N/A

                    \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \left(\frac{1}{3} + \frac{1}{60} \cdot {\ell}^{2}\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
                  6. +-lowering-+.f64N/A

                    \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \left(\frac{1}{60} \cdot {\ell}^{2}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
                  7. *-commutativeN/A

                    \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \left({\ell}^{2} \cdot \frac{1}{60}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
                  8. *-lowering-*.f64N/A

                    \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\left({\ell}^{2}\right), \frac{1}{60}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
                  9. unpow2N/A

                    \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\left(\ell \cdot \ell\right), \frac{1}{60}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
                  10. *-lowering-*.f6491.8%

                    \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \frac{1}{60}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
                7. Simplified91.8%

                  \[\leadsto \color{blue}{\left(\ell \cdot \left(2 + \left(\ell \cdot \ell\right) \cdot \left(0.3333333333333333 + \left(\ell \cdot \ell\right) \cdot 0.016666666666666666\right)\right)\right)} \cdot \left(J \cdot \cos \left(\frac{K}{2}\right)\right) + U \]
                8. Taylor expanded in K around 0

                  \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \frac{1}{60}\right)\right)\right)\right)\right), \color{blue}{J}\right), U\right) \]
                9. Step-by-step derivation
                  1. Simplified74.8%

                    \[\leadsto \left(\ell \cdot \left(2 + \left(\ell \cdot \ell\right) \cdot \left(0.3333333333333333 + \left(\ell \cdot \ell\right) \cdot 0.016666666666666666\right)\right)\right) \cdot \color{blue}{J} + U \]

                  if 4.8000000000000001e196 < U

                  1. Initial program 100.0%

                    \[\left(J \cdot \left(e^{\ell} - e^{-\ell}\right)\right) \cdot \cos \left(\frac{K}{2}\right) + U \]
                  2. Add Preprocessing
                  3. Taylor expanded in l around 0

                    \[\leadsto \mathsf{+.f64}\left(\color{blue}{\left(\ell \cdot \left(\frac{1}{3} \cdot \left(J \cdot \left({\ell}^{2} \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) + 2 \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right)\right)}, U\right) \]
                  4. Step-by-step derivation
                    1. distribute-rgt-inN/A

                      \[\leadsto \mathsf{+.f64}\left(\left(\left(\frac{1}{3} \cdot \left(J \cdot \left({\ell}^{2} \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right)\right) \cdot \ell + \left(2 \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) \cdot \ell\right), U\right) \]
                    2. fma-defineN/A

                      \[\leadsto \mathsf{+.f64}\left(\left(\mathsf{fma}\left(\frac{1}{3} \cdot \left(J \cdot \left({\ell}^{2} \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right), \ell, \left(2 \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) \cdot \ell\right)\right), U\right) \]
                    3. *-commutativeN/A

                      \[\leadsto \mathsf{+.f64}\left(\left(\mathsf{fma}\left(\frac{1}{3} \cdot \left(J \cdot \left(\cos \left(\frac{1}{2} \cdot K\right) \cdot {\ell}^{2}\right)\right), \ell, \left(2 \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) \cdot \ell\right)\right), U\right) \]
                    4. associate-*r*N/A

                      \[\leadsto \mathsf{+.f64}\left(\left(\mathsf{fma}\left(\frac{1}{3} \cdot \left(\left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right) \cdot {\ell}^{2}\right), \ell, \left(2 \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) \cdot \ell\right)\right), U\right) \]
                    5. associate-*l*N/A

                      \[\leadsto \mathsf{+.f64}\left(\left(\mathsf{fma}\left(\left(\frac{1}{3} \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) \cdot {\ell}^{2}, \ell, \left(2 \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) \cdot \ell\right)\right), U\right) \]
                    6. *-commutativeN/A

                      \[\leadsto \mathsf{+.f64}\left(\left(\mathsf{fma}\left({\ell}^{2} \cdot \left(\frac{1}{3} \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right), \ell, \left(2 \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) \cdot \ell\right)\right), U\right) \]
                    7. fma-undefineN/A

                      \[\leadsto \mathsf{+.f64}\left(\left(\left({\ell}^{2} \cdot \left(\frac{1}{3} \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right)\right) \cdot \ell + \left(2 \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) \cdot \ell\right), U\right) \]
                    8. distribute-rgt-inN/A

                      \[\leadsto \mathsf{+.f64}\left(\left(\ell \cdot \left({\ell}^{2} \cdot \left(\frac{1}{3} \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) + 2 \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right)\right), U\right) \]
                    9. *-lowering-*.f64N/A

                      \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\ell, \left({\ell}^{2} \cdot \left(\frac{1}{3} \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) + 2 \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right)\right), U\right) \]
                  5. Simplified91.3%

                    \[\leadsto \color{blue}{\ell \cdot \left(\cos \left(0.5 \cdot K\right) \cdot \left(J \cdot \left(2 + 0.3333333333333333 \cdot \left(\ell \cdot \ell\right)\right)\right)\right)} + U \]
                  6. Taylor expanded in K around 0

                    \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\color{blue}{\left(1 + \frac{-1}{8} \cdot {K}^{2}\right)}, \mathsf{*.f64}\left(J, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\ell, \ell\right)\right)\right)\right)\right)\right), U\right) \]
                  7. Step-by-step derivation
                    1. +-lowering-+.f64N/A

                      \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \left(\frac{-1}{8} \cdot {K}^{2}\right)\right), \mathsf{*.f64}\left(J, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\ell, \ell\right)\right)\right)\right)\right)\right), U\right) \]
                    2. *-lowering-*.f64N/A

                      \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{8}, \left({K}^{2}\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\ell, \ell\right)\right)\right)\right)\right)\right), U\right) \]
                    3. unpow2N/A

                      \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{8}, \left(K \cdot K\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\ell, \ell\right)\right)\right)\right)\right)\right), U\right) \]
                    4. *-lowering-*.f6481.0%

                      \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{*.f64}\left(K, K\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\ell, \ell\right)\right)\right)\right)\right)\right), U\right) \]
                  8. Simplified81.0%

                    \[\leadsto \ell \cdot \left(\color{blue}{\left(1 + -0.125 \cdot \left(K \cdot K\right)\right)} \cdot \left(J \cdot \left(2 + 0.3333333333333333 \cdot \left(\ell \cdot \ell\right)\right)\right)\right) + U \]
                10. Recombined 2 regimes into one program.
                11. Final simplification75.3%

                  \[\leadsto \begin{array}{l} \mathbf{if}\;U \leq 4.8 \cdot 10^{+196}:\\ \;\;\;\;U + J \cdot \left(\ell \cdot \left(2 + \left(\ell \cdot \ell\right) \cdot \left(0.3333333333333333 + \left(\ell \cdot \ell\right) \cdot 0.016666666666666666\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;U + \ell \cdot \left(\left(J \cdot \left(2 + \left(\ell \cdot \ell\right) \cdot 0.3333333333333333\right)\right) \cdot \left(1 + -0.125 \cdot \left(K \cdot K\right)\right)\right)\\ \end{array} \]
                12. Add Preprocessing

                Alternative 23: 72.8% accurate, 14.8× speedup?

                \[\begin{array}{l} \\ \begin{array}{l} t_0 := 0.3333333333333333 \cdot \left(J \cdot \left(\ell \cdot \left(\ell \cdot \ell\right)\right)\right)\\ \mathbf{if}\;\ell \leq -5 \cdot 10^{+63}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;\ell \leq 1.68 \cdot 10^{+16}:\\ \;\;\;\;U \cdot \left(1 + \frac{J \cdot \left(2 \cdot \ell\right)}{U}\right)\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \]
                (FPCore (J l K U)
                 :precision binary64
                 (let* ((t_0 (* 0.3333333333333333 (* J (* l (* l l))))))
                   (if (<= l -5e+63)
                     t_0
                     (if (<= l 1.68e+16) (* U (+ 1.0 (/ (* J (* 2.0 l)) U))) t_0))))
                double code(double J, double l, double K, double U) {
                	double t_0 = 0.3333333333333333 * (J * (l * (l * l)));
                	double tmp;
                	if (l <= -5e+63) {
                		tmp = t_0;
                	} else if (l <= 1.68e+16) {
                		tmp = U * (1.0 + ((J * (2.0 * l)) / U));
                	} 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) :: tmp
                    t_0 = 0.3333333333333333d0 * (j * (l * (l * l)))
                    if (l <= (-5d+63)) then
                        tmp = t_0
                    else if (l <= 1.68d+16) then
                        tmp = u * (1.0d0 + ((j * (2.0d0 * l)) / u))
                    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 = 0.3333333333333333 * (J * (l * (l * l)));
                	double tmp;
                	if (l <= -5e+63) {
                		tmp = t_0;
                	} else if (l <= 1.68e+16) {
                		tmp = U * (1.0 + ((J * (2.0 * l)) / U));
                	} else {
                		tmp = t_0;
                	}
                	return tmp;
                }
                
                def code(J, l, K, U):
                	t_0 = 0.3333333333333333 * (J * (l * (l * l)))
                	tmp = 0
                	if l <= -5e+63:
                		tmp = t_0
                	elif l <= 1.68e+16:
                		tmp = U * (1.0 + ((J * (2.0 * l)) / U))
                	else:
                		tmp = t_0
                	return tmp
                
                function code(J, l, K, U)
                	t_0 = Float64(0.3333333333333333 * Float64(J * Float64(l * Float64(l * l))))
                	tmp = 0.0
                	if (l <= -5e+63)
                		tmp = t_0;
                	elseif (l <= 1.68e+16)
                		tmp = Float64(U * Float64(1.0 + Float64(Float64(J * Float64(2.0 * l)) / U)));
                	else
                		tmp = t_0;
                	end
                	return tmp
                end
                
                function tmp_2 = code(J, l, K, U)
                	t_0 = 0.3333333333333333 * (J * (l * (l * l)));
                	tmp = 0.0;
                	if (l <= -5e+63)
                		tmp = t_0;
                	elseif (l <= 1.68e+16)
                		tmp = U * (1.0 + ((J * (2.0 * l)) / U));
                	else
                		tmp = t_0;
                	end
                	tmp_2 = tmp;
                end
                
                code[J_, l_, K_, U_] := Block[{t$95$0 = N[(0.3333333333333333 * N[(J * N[(l * N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[l, -5e+63], t$95$0, If[LessEqual[l, 1.68e+16], N[(U * N[(1.0 + N[(N[(J * N[(2.0 * l), $MachinePrecision]), $MachinePrecision] / U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]
                
                \begin{array}{l}
                
                \\
                \begin{array}{l}
                t_0 := 0.3333333333333333 \cdot \left(J \cdot \left(\ell \cdot \left(\ell \cdot \ell\right)\right)\right)\\
                \mathbf{if}\;\ell \leq -5 \cdot 10^{+63}:\\
                \;\;\;\;t\_0\\
                
                \mathbf{elif}\;\ell \leq 1.68 \cdot 10^{+16}:\\
                \;\;\;\;U \cdot \left(1 + \frac{J \cdot \left(2 \cdot \ell\right)}{U}\right)\\
                
                \mathbf{else}:\\
                \;\;\;\;t\_0\\
                
                
                \end{array}
                \end{array}
                
                Derivation
                1. Split input into 2 regimes
                2. if l < -5.00000000000000011e63 or 1.68e16 < l

                  1. Initial program 100.0%

                    \[\left(J \cdot \left(e^{\ell} - e^{-\ell}\right)\right) \cdot \cos \left(\frac{K}{2}\right) + U \]
                  2. Add Preprocessing
                  3. Taylor expanded in l around 0

                    \[\leadsto \mathsf{+.f64}\left(\color{blue}{\left(\ell \cdot \left(\frac{1}{3} \cdot \left(J \cdot \left({\ell}^{2} \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) + 2 \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right)\right)}, U\right) \]
                  4. Step-by-step derivation
                    1. distribute-rgt-inN/A

                      \[\leadsto \mathsf{+.f64}\left(\left(\left(\frac{1}{3} \cdot \left(J \cdot \left({\ell}^{2} \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right)\right) \cdot \ell + \left(2 \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) \cdot \ell\right), U\right) \]
                    2. fma-defineN/A

                      \[\leadsto \mathsf{+.f64}\left(\left(\mathsf{fma}\left(\frac{1}{3} \cdot \left(J \cdot \left({\ell}^{2} \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right), \ell, \left(2 \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) \cdot \ell\right)\right), U\right) \]
                    3. *-commutativeN/A

                      \[\leadsto \mathsf{+.f64}\left(\left(\mathsf{fma}\left(\frac{1}{3} \cdot \left(J \cdot \left(\cos \left(\frac{1}{2} \cdot K\right) \cdot {\ell}^{2}\right)\right), \ell, \left(2 \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) \cdot \ell\right)\right), U\right) \]
                    4. associate-*r*N/A

                      \[\leadsto \mathsf{+.f64}\left(\left(\mathsf{fma}\left(\frac{1}{3} \cdot \left(\left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right) \cdot {\ell}^{2}\right), \ell, \left(2 \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) \cdot \ell\right)\right), U\right) \]
                    5. associate-*l*N/A

                      \[\leadsto \mathsf{+.f64}\left(\left(\mathsf{fma}\left(\left(\frac{1}{3} \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) \cdot {\ell}^{2}, \ell, \left(2 \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) \cdot \ell\right)\right), U\right) \]
                    6. *-commutativeN/A

                      \[\leadsto \mathsf{+.f64}\left(\left(\mathsf{fma}\left({\ell}^{2} \cdot \left(\frac{1}{3} \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right), \ell, \left(2 \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) \cdot \ell\right)\right), U\right) \]
                    7. fma-undefineN/A

                      \[\leadsto \mathsf{+.f64}\left(\left(\left({\ell}^{2} \cdot \left(\frac{1}{3} \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right)\right) \cdot \ell + \left(2 \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) \cdot \ell\right), U\right) \]
                    8. distribute-rgt-inN/A

                      \[\leadsto \mathsf{+.f64}\left(\left(\ell \cdot \left({\ell}^{2} \cdot \left(\frac{1}{3} \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) + 2 \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right)\right), U\right) \]
                    9. *-lowering-*.f64N/A

                      \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\ell, \left({\ell}^{2} \cdot \left(\frac{1}{3} \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) + 2 \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right)\right), U\right) \]
                  5. Simplified78.7%

                    \[\leadsto \color{blue}{\ell \cdot \left(\cos \left(0.5 \cdot K\right) \cdot \left(J \cdot \left(2 + 0.3333333333333333 \cdot \left(\ell \cdot \ell\right)\right)\right)\right)} + U \]
                  6. Taylor expanded in K around 0

                    \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\ell, \color{blue}{\left(J \cdot \left(2 + \frac{1}{3} \cdot {\ell}^{2}\right)\right)}\right), U\right) \]
                  7. Step-by-step derivation
                    1. *-lowering-*.f64N/A

                      \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(J, \left(2 + \frac{1}{3} \cdot {\ell}^{2}\right)\right)\right), U\right) \]
                    2. +-lowering-+.f64N/A

                      \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(J, \mathsf{+.f64}\left(2, \left(\frac{1}{3} \cdot {\ell}^{2}\right)\right)\right)\right), U\right) \]
                    3. *-commutativeN/A

                      \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(J, \mathsf{+.f64}\left(2, \left({\ell}^{2} \cdot \frac{1}{3}\right)\right)\right)\right), U\right) \]
                    4. unpow2N/A

                      \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(J, \mathsf{+.f64}\left(2, \left(\left(\ell \cdot \ell\right) \cdot \frac{1}{3}\right)\right)\right)\right), U\right) \]
                    5. associate-*l*N/A

                      \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(J, \mathsf{+.f64}\left(2, \left(\ell \cdot \left(\ell \cdot \frac{1}{3}\right)\right)\right)\right)\right), U\right) \]
                    6. *-lowering-*.f64N/A

                      \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(J, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\ell, \left(\ell \cdot \frac{1}{3}\right)\right)\right)\right)\right), U\right) \]
                    7. *-lowering-*.f6458.2%

                      \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(J, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \frac{1}{3}\right)\right)\right)\right)\right), U\right) \]
                  8. Simplified58.2%

                    \[\leadsto \ell \cdot \color{blue}{\left(J \cdot \left(2 + \ell \cdot \left(\ell \cdot 0.3333333333333333\right)\right)\right)} + U \]
                  9. Taylor expanded in l around inf

                    \[\leadsto \color{blue}{\frac{1}{3} \cdot \left(J \cdot {\ell}^{3}\right)} \]
                  10. Step-by-step derivation
                    1. *-lowering-*.f64N/A

                      \[\leadsto \mathsf{*.f64}\left(\frac{1}{3}, \color{blue}{\left(J \cdot {\ell}^{3}\right)}\right) \]
                    2. *-lowering-*.f64N/A

                      \[\leadsto \mathsf{*.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(J, \color{blue}{\left({\ell}^{3}\right)}\right)\right) \]
                    3. cube-multN/A

                      \[\leadsto \mathsf{*.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(J, \left(\ell \cdot \color{blue}{\left(\ell \cdot \ell\right)}\right)\right)\right) \]
                    4. unpow2N/A

                      \[\leadsto \mathsf{*.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(J, \left(\ell \cdot {\ell}^{\color{blue}{2}}\right)\right)\right) \]
                    5. *-lowering-*.f64N/A

                      \[\leadsto \mathsf{*.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\ell, \color{blue}{\left({\ell}^{2}\right)}\right)\right)\right) \]
                    6. unpow2N/A

                      \[\leadsto \mathsf{*.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\ell, \left(\ell \cdot \color{blue}{\ell}\right)\right)\right)\right) \]
                    7. *-lowering-*.f6463.0%

                      \[\leadsto \mathsf{*.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \color{blue}{\ell}\right)\right)\right)\right) \]
                  11. Simplified63.0%

                    \[\leadsto \color{blue}{0.3333333333333333 \cdot \left(J \cdot \left(\ell \cdot \left(\ell \cdot \ell\right)\right)\right)} \]

                  if -5.00000000000000011e63 < l < 1.68e16

                  1. Initial program 80.6%

                    \[\left(J \cdot \left(e^{\ell} - e^{-\ell}\right)\right) \cdot \cos \left(\frac{K}{2}\right) + U \]
                  2. Add Preprocessing
                  3. Taylor expanded in l around 0

                    \[\leadsto \mathsf{+.f64}\left(\color{blue}{\left(\ell \cdot \left(\frac{1}{3} \cdot \left(J \cdot \left({\ell}^{2} \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) + 2 \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right)\right)}, U\right) \]
                  4. Step-by-step derivation
                    1. distribute-rgt-inN/A

                      \[\leadsto \mathsf{+.f64}\left(\left(\left(\frac{1}{3} \cdot \left(J \cdot \left({\ell}^{2} \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right)\right) \cdot \ell + \left(2 \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) \cdot \ell\right), U\right) \]
                    2. fma-defineN/A

                      \[\leadsto \mathsf{+.f64}\left(\left(\mathsf{fma}\left(\frac{1}{3} \cdot \left(J \cdot \left({\ell}^{2} \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right), \ell, \left(2 \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) \cdot \ell\right)\right), U\right) \]
                    3. *-commutativeN/A

                      \[\leadsto \mathsf{+.f64}\left(\left(\mathsf{fma}\left(\frac{1}{3} \cdot \left(J \cdot \left(\cos \left(\frac{1}{2} \cdot K\right) \cdot {\ell}^{2}\right)\right), \ell, \left(2 \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) \cdot \ell\right)\right), U\right) \]
                    4. associate-*r*N/A

                      \[\leadsto \mathsf{+.f64}\left(\left(\mathsf{fma}\left(\frac{1}{3} \cdot \left(\left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right) \cdot {\ell}^{2}\right), \ell, \left(2 \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) \cdot \ell\right)\right), U\right) \]
                    5. associate-*l*N/A

                      \[\leadsto \mathsf{+.f64}\left(\left(\mathsf{fma}\left(\left(\frac{1}{3} \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) \cdot {\ell}^{2}, \ell, \left(2 \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) \cdot \ell\right)\right), U\right) \]
                    6. *-commutativeN/A

                      \[\leadsto \mathsf{+.f64}\left(\left(\mathsf{fma}\left({\ell}^{2} \cdot \left(\frac{1}{3} \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right), \ell, \left(2 \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) \cdot \ell\right)\right), U\right) \]
                    7. fma-undefineN/A

                      \[\leadsto \mathsf{+.f64}\left(\left(\left({\ell}^{2} \cdot \left(\frac{1}{3} \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right)\right) \cdot \ell + \left(2 \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) \cdot \ell\right), U\right) \]
                    8. distribute-rgt-inN/A

                      \[\leadsto \mathsf{+.f64}\left(\left(\ell \cdot \left({\ell}^{2} \cdot \left(\frac{1}{3} \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) + 2 \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right)\right), U\right) \]
                    9. *-lowering-*.f64N/A

                      \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\ell, \left({\ell}^{2} \cdot \left(\frac{1}{3} \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) + 2 \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right)\right), U\right) \]
                  5. Simplified88.3%

                    \[\leadsto \color{blue}{\ell \cdot \left(\cos \left(0.5 \cdot K\right) \cdot \left(J \cdot \left(2 + 0.3333333333333333 \cdot \left(\ell \cdot \ell\right)\right)\right)\right)} + U \]
                  6. Taylor expanded in K around 0

                    \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\ell, \color{blue}{\left(J \cdot \left(2 + \frac{1}{3} \cdot {\ell}^{2}\right)\right)}\right), U\right) \]
                  7. Step-by-step derivation
                    1. *-lowering-*.f64N/A

                      \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(J, \left(2 + \frac{1}{3} \cdot {\ell}^{2}\right)\right)\right), U\right) \]
                    2. +-lowering-+.f64N/A

                      \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(J, \mathsf{+.f64}\left(2, \left(\frac{1}{3} \cdot {\ell}^{2}\right)\right)\right)\right), U\right) \]
                    3. *-commutativeN/A

                      \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(J, \mathsf{+.f64}\left(2, \left({\ell}^{2} \cdot \frac{1}{3}\right)\right)\right)\right), U\right) \]
                    4. unpow2N/A

                      \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(J, \mathsf{+.f64}\left(2, \left(\left(\ell \cdot \ell\right) \cdot \frac{1}{3}\right)\right)\right)\right), U\right) \]
                    5. associate-*l*N/A

                      \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(J, \mathsf{+.f64}\left(2, \left(\ell \cdot \left(\ell \cdot \frac{1}{3}\right)\right)\right)\right)\right), U\right) \]
                    6. *-lowering-*.f64N/A

                      \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(J, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\ell, \left(\ell \cdot \frac{1}{3}\right)\right)\right)\right)\right), U\right) \]
                    7. *-lowering-*.f6476.4%

                      \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(J, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \frac{1}{3}\right)\right)\right)\right)\right), U\right) \]
                  8. Simplified76.4%

                    \[\leadsto \ell \cdot \color{blue}{\left(J \cdot \left(2 + \ell \cdot \left(\ell \cdot 0.3333333333333333\right)\right)\right)} + U \]
                  9. Taylor expanded in l around 0

                    \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(J, \color{blue}{2}\right)\right), U\right) \]
                  10. Step-by-step derivation
                    1. Simplified76.3%

                      \[\leadsto \ell \cdot \left(J \cdot \color{blue}{2}\right) + U \]
                    2. Taylor expanded in U around inf

                      \[\leadsto \color{blue}{U \cdot \left(1 + 2 \cdot \frac{J \cdot \ell}{U}\right)} \]
                    3. Step-by-step derivation
                      1. *-lowering-*.f64N/A

                        \[\leadsto \mathsf{*.f64}\left(U, \color{blue}{\left(1 + 2 \cdot \frac{J \cdot \ell}{U}\right)}\right) \]
                      2. +-lowering-+.f64N/A

                        \[\leadsto \mathsf{*.f64}\left(U, \mathsf{+.f64}\left(1, \color{blue}{\left(2 \cdot \frac{J \cdot \ell}{U}\right)}\right)\right) \]
                      3. associate-*r/N/A

                        \[\leadsto \mathsf{*.f64}\left(U, \mathsf{+.f64}\left(1, \left(\frac{2 \cdot \left(J \cdot \ell\right)}{\color{blue}{U}}\right)\right)\right) \]
                      4. /-lowering-/.f64N/A

                        \[\leadsto \mathsf{*.f64}\left(U, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\left(2 \cdot \left(J \cdot \ell\right)\right), \color{blue}{U}\right)\right)\right) \]
                      5. *-commutativeN/A

                        \[\leadsto \mathsf{*.f64}\left(U, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\left(\left(J \cdot \ell\right) \cdot 2\right), U\right)\right)\right) \]
                      6. associate-*r*N/A

                        \[\leadsto \mathsf{*.f64}\left(U, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\left(J \cdot \left(\ell \cdot 2\right)\right), U\right)\right)\right) \]
                      7. *-commutativeN/A

                        \[\leadsto \mathsf{*.f64}\left(U, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\left(J \cdot \left(2 \cdot \ell\right)\right), U\right)\right)\right) \]
                      8. *-lowering-*.f64N/A

                        \[\leadsto \mathsf{*.f64}\left(U, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(J, \left(2 \cdot \ell\right)\right), U\right)\right)\right) \]
                      9. *-commutativeN/A

                        \[\leadsto \mathsf{*.f64}\left(U, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(J, \left(\ell \cdot 2\right)\right), U\right)\right)\right) \]
                      10. *-lowering-*.f6476.8%

                        \[\leadsto \mathsf{*.f64}\left(U, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\ell, 2\right)\right), U\right)\right)\right) \]
                    4. Simplified76.8%

                      \[\leadsto \color{blue}{U \cdot \left(1 + \frac{J \cdot \left(\ell \cdot 2\right)}{U}\right)} \]
                  11. Recombined 2 regimes into one program.
                  12. Final simplification70.6%

                    \[\leadsto \begin{array}{l} \mathbf{if}\;\ell \leq -5 \cdot 10^{+63}:\\ \;\;\;\;0.3333333333333333 \cdot \left(J \cdot \left(\ell \cdot \left(\ell \cdot \ell\right)\right)\right)\\ \mathbf{elif}\;\ell \leq 1.68 \cdot 10^{+16}:\\ \;\;\;\;U \cdot \left(1 + \frac{J \cdot \left(2 \cdot \ell\right)}{U}\right)\\ \mathbf{else}:\\ \;\;\;\;0.3333333333333333 \cdot \left(J \cdot \left(\ell \cdot \left(\ell \cdot \ell\right)\right)\right)\\ \end{array} \]
                  13. Add Preprocessing

                  Alternative 24: 73.5% accurate, 16.4× speedup?

                  \[\begin{array}{l} \\ \begin{array}{l} t_0 := 0.3333333333333333 \cdot \left(J \cdot \left(\ell \cdot \left(\ell \cdot \ell\right)\right)\right)\\ \mathbf{if}\;\ell \leq -880000:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;\ell \leq 3.9 \cdot 10^{+14}:\\ \;\;\;\;U + \ell \cdot \left(J \cdot 2\right)\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \]
                  (FPCore (J l K U)
                   :precision binary64
                   (let* ((t_0 (* 0.3333333333333333 (* J (* l (* l l))))))
                     (if (<= l -880000.0) t_0 (if (<= l 3.9e+14) (+ U (* l (* J 2.0))) t_0))))
                  double code(double J, double l, double K, double U) {
                  	double t_0 = 0.3333333333333333 * (J * (l * (l * l)));
                  	double tmp;
                  	if (l <= -880000.0) {
                  		tmp = t_0;
                  	} else if (l <= 3.9e+14) {
                  		tmp = U + (l * (J * 2.0));
                  	} 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) :: tmp
                      t_0 = 0.3333333333333333d0 * (j * (l * (l * l)))
                      if (l <= (-880000.0d0)) then
                          tmp = t_0
                      else if (l <= 3.9d+14) then
                          tmp = u + (l * (j * 2.0d0))
                      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 = 0.3333333333333333 * (J * (l * (l * l)));
                  	double tmp;
                  	if (l <= -880000.0) {
                  		tmp = t_0;
                  	} else if (l <= 3.9e+14) {
                  		tmp = U + (l * (J * 2.0));
                  	} else {
                  		tmp = t_0;
                  	}
                  	return tmp;
                  }
                  
                  def code(J, l, K, U):
                  	t_0 = 0.3333333333333333 * (J * (l * (l * l)))
                  	tmp = 0
                  	if l <= -880000.0:
                  		tmp = t_0
                  	elif l <= 3.9e+14:
                  		tmp = U + (l * (J * 2.0))
                  	else:
                  		tmp = t_0
                  	return tmp
                  
                  function code(J, l, K, U)
                  	t_0 = Float64(0.3333333333333333 * Float64(J * Float64(l * Float64(l * l))))
                  	tmp = 0.0
                  	if (l <= -880000.0)
                  		tmp = t_0;
                  	elseif (l <= 3.9e+14)
                  		tmp = Float64(U + Float64(l * Float64(J * 2.0)));
                  	else
                  		tmp = t_0;
                  	end
                  	return tmp
                  end
                  
                  function tmp_2 = code(J, l, K, U)
                  	t_0 = 0.3333333333333333 * (J * (l * (l * l)));
                  	tmp = 0.0;
                  	if (l <= -880000.0)
                  		tmp = t_0;
                  	elseif (l <= 3.9e+14)
                  		tmp = U + (l * (J * 2.0));
                  	else
                  		tmp = t_0;
                  	end
                  	tmp_2 = tmp;
                  end
                  
                  code[J_, l_, K_, U_] := Block[{t$95$0 = N[(0.3333333333333333 * N[(J * N[(l * N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[l, -880000.0], t$95$0, If[LessEqual[l, 3.9e+14], N[(U + N[(l * N[(J * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]
                  
                  \begin{array}{l}
                  
                  \\
                  \begin{array}{l}
                  t_0 := 0.3333333333333333 \cdot \left(J \cdot \left(\ell \cdot \left(\ell \cdot \ell\right)\right)\right)\\
                  \mathbf{if}\;\ell \leq -880000:\\
                  \;\;\;\;t\_0\\
                  
                  \mathbf{elif}\;\ell \leq 3.9 \cdot 10^{+14}:\\
                  \;\;\;\;U + \ell \cdot \left(J \cdot 2\right)\\
                  
                  \mathbf{else}:\\
                  \;\;\;\;t\_0\\
                  
                  
                  \end{array}
                  \end{array}
                  
                  Derivation
                  1. Split input into 2 regimes
                  2. if l < -8.8e5 or 3.9e14 < l

                    1. Initial program 100.0%

                      \[\left(J \cdot \left(e^{\ell} - e^{-\ell}\right)\right) \cdot \cos \left(\frac{K}{2}\right) + U \]
                    2. Add Preprocessing
                    3. Taylor expanded in l around 0

                      \[\leadsto \mathsf{+.f64}\left(\color{blue}{\left(\ell \cdot \left(\frac{1}{3} \cdot \left(J \cdot \left({\ell}^{2} \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) + 2 \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right)\right)}, U\right) \]
                    4. Step-by-step derivation
                      1. distribute-rgt-inN/A

                        \[\leadsto \mathsf{+.f64}\left(\left(\left(\frac{1}{3} \cdot \left(J \cdot \left({\ell}^{2} \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right)\right) \cdot \ell + \left(2 \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) \cdot \ell\right), U\right) \]
                      2. fma-defineN/A

                        \[\leadsto \mathsf{+.f64}\left(\left(\mathsf{fma}\left(\frac{1}{3} \cdot \left(J \cdot \left({\ell}^{2} \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right), \ell, \left(2 \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) \cdot \ell\right)\right), U\right) \]
                      3. *-commutativeN/A

                        \[\leadsto \mathsf{+.f64}\left(\left(\mathsf{fma}\left(\frac{1}{3} \cdot \left(J \cdot \left(\cos \left(\frac{1}{2} \cdot K\right) \cdot {\ell}^{2}\right)\right), \ell, \left(2 \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) \cdot \ell\right)\right), U\right) \]
                      4. associate-*r*N/A

                        \[\leadsto \mathsf{+.f64}\left(\left(\mathsf{fma}\left(\frac{1}{3} \cdot \left(\left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right) \cdot {\ell}^{2}\right), \ell, \left(2 \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) \cdot \ell\right)\right), U\right) \]
                      5. associate-*l*N/A

                        \[\leadsto \mathsf{+.f64}\left(\left(\mathsf{fma}\left(\left(\frac{1}{3} \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) \cdot {\ell}^{2}, \ell, \left(2 \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) \cdot \ell\right)\right), U\right) \]
                      6. *-commutativeN/A

                        \[\leadsto \mathsf{+.f64}\left(\left(\mathsf{fma}\left({\ell}^{2} \cdot \left(\frac{1}{3} \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right), \ell, \left(2 \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) \cdot \ell\right)\right), U\right) \]
                      7. fma-undefineN/A

                        \[\leadsto \mathsf{+.f64}\left(\left(\left({\ell}^{2} \cdot \left(\frac{1}{3} \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right)\right) \cdot \ell + \left(2 \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) \cdot \ell\right), U\right) \]
                      8. distribute-rgt-inN/A

                        \[\leadsto \mathsf{+.f64}\left(\left(\ell \cdot \left({\ell}^{2} \cdot \left(\frac{1}{3} \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) + 2 \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right)\right), U\right) \]
                      9. *-lowering-*.f64N/A

                        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\ell, \left({\ell}^{2} \cdot \left(\frac{1}{3} \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) + 2 \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right)\right), U\right) \]
                    5. Simplified70.1%

                      \[\leadsto \color{blue}{\ell \cdot \left(\cos \left(0.5 \cdot K\right) \cdot \left(J \cdot \left(2 + 0.3333333333333333 \cdot \left(\ell \cdot \ell\right)\right)\right)\right)} + U \]
                    6. Taylor expanded in K around 0

                      \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\ell, \color{blue}{\left(J \cdot \left(2 + \frac{1}{3} \cdot {\ell}^{2}\right)\right)}\right), U\right) \]
                    7. Step-by-step derivation
                      1. *-lowering-*.f64N/A

                        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(J, \left(2 + \frac{1}{3} \cdot {\ell}^{2}\right)\right)\right), U\right) \]
                      2. +-lowering-+.f64N/A

                        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(J, \mathsf{+.f64}\left(2, \left(\frac{1}{3} \cdot {\ell}^{2}\right)\right)\right)\right), U\right) \]
                      3. *-commutativeN/A

                        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(J, \mathsf{+.f64}\left(2, \left({\ell}^{2} \cdot \frac{1}{3}\right)\right)\right)\right), U\right) \]
                      4. unpow2N/A

                        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(J, \mathsf{+.f64}\left(2, \left(\left(\ell \cdot \ell\right) \cdot \frac{1}{3}\right)\right)\right)\right), U\right) \]
                      5. associate-*l*N/A

                        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(J, \mathsf{+.f64}\left(2, \left(\ell \cdot \left(\ell \cdot \frac{1}{3}\right)\right)\right)\right)\right), U\right) \]
                      6. *-lowering-*.f64N/A

                        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(J, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\ell, \left(\ell \cdot \frac{1}{3}\right)\right)\right)\right)\right), U\right) \]
                      7. *-lowering-*.f6451.9%

                        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(J, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \frac{1}{3}\right)\right)\right)\right)\right), U\right) \]
                    8. Simplified51.9%

                      \[\leadsto \ell \cdot \color{blue}{\left(J \cdot \left(2 + \ell \cdot \left(\ell \cdot 0.3333333333333333\right)\right)\right)} + U \]
                    9. Taylor expanded in l around inf

                      \[\leadsto \color{blue}{\frac{1}{3} \cdot \left(J \cdot {\ell}^{3}\right)} \]
                    10. Step-by-step derivation
                      1. *-lowering-*.f64N/A

                        \[\leadsto \mathsf{*.f64}\left(\frac{1}{3}, \color{blue}{\left(J \cdot {\ell}^{3}\right)}\right) \]
                      2. *-lowering-*.f64N/A

                        \[\leadsto \mathsf{*.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(J, \color{blue}{\left({\ell}^{3}\right)}\right)\right) \]
                      3. cube-multN/A

                        \[\leadsto \mathsf{*.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(J, \left(\ell \cdot \color{blue}{\left(\ell \cdot \ell\right)}\right)\right)\right) \]
                      4. unpow2N/A

                        \[\leadsto \mathsf{*.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(J, \left(\ell \cdot {\ell}^{\color{blue}{2}}\right)\right)\right) \]
                      5. *-lowering-*.f64N/A

                        \[\leadsto \mathsf{*.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\ell, \color{blue}{\left({\ell}^{2}\right)}\right)\right)\right) \]
                      6. unpow2N/A

                        \[\leadsto \mathsf{*.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\ell, \left(\ell \cdot \color{blue}{\ell}\right)\right)\right)\right) \]
                      7. *-lowering-*.f6456.1%

                        \[\leadsto \mathsf{*.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \color{blue}{\ell}\right)\right)\right)\right) \]
                    11. Simplified56.1%

                      \[\leadsto \color{blue}{0.3333333333333333 \cdot \left(J \cdot \left(\ell \cdot \left(\ell \cdot \ell\right)\right)\right)} \]

                    if -8.8e5 < l < 3.9e14

                    1. Initial program 78.3%

                      \[\left(J \cdot \left(e^{\ell} - e^{-\ell}\right)\right) \cdot \cos \left(\frac{K}{2}\right) + U \]
                    2. Add Preprocessing
                    3. Taylor expanded in l around 0

                      \[\leadsto \mathsf{+.f64}\left(\color{blue}{\left(\ell \cdot \left(\frac{1}{3} \cdot \left(J \cdot \left({\ell}^{2} \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) + 2 \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right)\right)}, U\right) \]
                    4. Step-by-step derivation
                      1. distribute-rgt-inN/A

                        \[\leadsto \mathsf{+.f64}\left(\left(\left(\frac{1}{3} \cdot \left(J \cdot \left({\ell}^{2} \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right)\right) \cdot \ell + \left(2 \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) \cdot \ell\right), U\right) \]
                      2. fma-defineN/A

                        \[\leadsto \mathsf{+.f64}\left(\left(\mathsf{fma}\left(\frac{1}{3} \cdot \left(J \cdot \left({\ell}^{2} \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right), \ell, \left(2 \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) \cdot \ell\right)\right), U\right) \]
                      3. *-commutativeN/A

                        \[\leadsto \mathsf{+.f64}\left(\left(\mathsf{fma}\left(\frac{1}{3} \cdot \left(J \cdot \left(\cos \left(\frac{1}{2} \cdot K\right) \cdot {\ell}^{2}\right)\right), \ell, \left(2 \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) \cdot \ell\right)\right), U\right) \]
                      4. associate-*r*N/A

                        \[\leadsto \mathsf{+.f64}\left(\left(\mathsf{fma}\left(\frac{1}{3} \cdot \left(\left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right) \cdot {\ell}^{2}\right), \ell, \left(2 \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) \cdot \ell\right)\right), U\right) \]
                      5. associate-*l*N/A

                        \[\leadsto \mathsf{+.f64}\left(\left(\mathsf{fma}\left(\left(\frac{1}{3} \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) \cdot {\ell}^{2}, \ell, \left(2 \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) \cdot \ell\right)\right), U\right) \]
                      6. *-commutativeN/A

                        \[\leadsto \mathsf{+.f64}\left(\left(\mathsf{fma}\left({\ell}^{2} \cdot \left(\frac{1}{3} \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right), \ell, \left(2 \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) \cdot \ell\right)\right), U\right) \]
                      7. fma-undefineN/A

                        \[\leadsto \mathsf{+.f64}\left(\left(\left({\ell}^{2} \cdot \left(\frac{1}{3} \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right)\right) \cdot \ell + \left(2 \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) \cdot \ell\right), U\right) \]
                      8. distribute-rgt-inN/A

                        \[\leadsto \mathsf{+.f64}\left(\left(\ell \cdot \left({\ell}^{2} \cdot \left(\frac{1}{3} \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) + 2 \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right)\right), U\right) \]
                      9. *-lowering-*.f64N/A

                        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\ell, \left({\ell}^{2} \cdot \left(\frac{1}{3} \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) + 2 \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right)\right), U\right) \]
                    5. Simplified98.3%

                      \[\leadsto \color{blue}{\ell \cdot \left(\cos \left(0.5 \cdot K\right) \cdot \left(J \cdot \left(2 + 0.3333333333333333 \cdot \left(\ell \cdot \ell\right)\right)\right)\right)} + U \]
                    6. Taylor expanded in K around 0

                      \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\ell, \color{blue}{\left(J \cdot \left(2 + \frac{1}{3} \cdot {\ell}^{2}\right)\right)}\right), U\right) \]
                    7. Step-by-step derivation
                      1. *-lowering-*.f64N/A

                        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(J, \left(2 + \frac{1}{3} \cdot {\ell}^{2}\right)\right)\right), U\right) \]
                      2. +-lowering-+.f64N/A

                        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(J, \mathsf{+.f64}\left(2, \left(\frac{1}{3} \cdot {\ell}^{2}\right)\right)\right)\right), U\right) \]
                      3. *-commutativeN/A

                        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(J, \mathsf{+.f64}\left(2, \left({\ell}^{2} \cdot \frac{1}{3}\right)\right)\right)\right), U\right) \]
                      4. unpow2N/A

                        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(J, \mathsf{+.f64}\left(2, \left(\left(\ell \cdot \ell\right) \cdot \frac{1}{3}\right)\right)\right)\right), U\right) \]
                      5. associate-*l*N/A

                        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(J, \mathsf{+.f64}\left(2, \left(\ell \cdot \left(\ell \cdot \frac{1}{3}\right)\right)\right)\right)\right), U\right) \]
                      6. *-lowering-*.f64N/A

                        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(J, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\ell, \left(\ell \cdot \frac{1}{3}\right)\right)\right)\right)\right), U\right) \]
                      7. *-lowering-*.f6485.1%

                        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(J, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \frac{1}{3}\right)\right)\right)\right)\right), U\right) \]
                    8. Simplified85.1%

                      \[\leadsto \ell \cdot \color{blue}{\left(J \cdot \left(2 + \ell \cdot \left(\ell \cdot 0.3333333333333333\right)\right)\right)} + U \]
                    9. Taylor expanded in l around 0

                      \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(J, \color{blue}{2}\right)\right), U\right) \]
                    10. Step-by-step derivation
                      1. Simplified85.1%

                        \[\leadsto \ell \cdot \left(J \cdot \color{blue}{2}\right) + U \]
                    11. Recombined 2 regimes into one program.
                    12. Final simplification70.4%

                      \[\leadsto \begin{array}{l} \mathbf{if}\;\ell \leq -880000:\\ \;\;\;\;0.3333333333333333 \cdot \left(J \cdot \left(\ell \cdot \left(\ell \cdot \ell\right)\right)\right)\\ \mathbf{elif}\;\ell \leq 3.9 \cdot 10^{+14}:\\ \;\;\;\;U + \ell \cdot \left(J \cdot 2\right)\\ \mathbf{else}:\\ \;\;\;\;0.3333333333333333 \cdot \left(J \cdot \left(\ell \cdot \left(\ell \cdot \ell\right)\right)\right)\\ \end{array} \]
                    13. Add Preprocessing

                    Alternative 25: 76.9% accurate, 16.4× speedup?

                    \[\begin{array}{l} \\ U + J \cdot \left(\ell \cdot \left(2 + \left(\ell \cdot \ell\right) \cdot \left(0.3333333333333333 + \left(\ell \cdot \ell\right) \cdot 0.016666666666666666\right)\right)\right) \end{array} \]
                    (FPCore (J l K U)
                     :precision binary64
                     (+
                      U
                      (*
                       J
                       (*
                        l
                        (+
                         2.0
                         (* (* l l) (+ 0.3333333333333333 (* (* l l) 0.016666666666666666))))))))
                    double code(double J, double l, double K, double U) {
                    	return U + (J * (l * (2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * 0.016666666666666666))))));
                    }
                    
                    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 + (j * (l * (2.0d0 + ((l * l) * (0.3333333333333333d0 + ((l * l) * 0.016666666666666666d0))))))
                    end function
                    
                    public static double code(double J, double l, double K, double U) {
                    	return U + (J * (l * (2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * 0.016666666666666666))))));
                    }
                    
                    def code(J, l, K, U):
                    	return U + (J * (l * (2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * 0.016666666666666666))))))
                    
                    function code(J, l, K, U)
                    	return Float64(U + Float64(J * Float64(l * Float64(2.0 + Float64(Float64(l * l) * Float64(0.3333333333333333 + Float64(Float64(l * l) * 0.016666666666666666)))))))
                    end
                    
                    function tmp = code(J, l, K, U)
                    	tmp = U + (J * (l * (2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * 0.016666666666666666))))));
                    end
                    
                    code[J_, l_, K_, U_] := N[(U + N[(J * N[(l * N[(2.0 + N[(N[(l * l), $MachinePrecision] * N[(0.3333333333333333 + N[(N[(l * l), $MachinePrecision] * 0.016666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
                    
                    \begin{array}{l}
                    
                    \\
                    U + J \cdot \left(\ell \cdot \left(2 + \left(\ell \cdot \ell\right) \cdot \left(0.3333333333333333 + \left(\ell \cdot \ell\right) \cdot 0.016666666666666666\right)\right)\right)
                    \end{array}
                    
                    Derivation
                    1. Initial program 89.3%

                      \[\left(J \cdot \left(e^{\ell} - e^{-\ell}\right)\right) \cdot \cos \left(\frac{K}{2}\right) + U \]
                    2. Step-by-step derivation
                      1. +-lowering-+.f64N/A

                        \[\leadsto \mathsf{+.f64}\left(\left(\left(J \cdot \left(e^{\ell} - e^{\mathsf{neg}\left(\ell\right)}\right)\right) \cdot \cos \left(\frac{K}{2}\right)\right), \color{blue}{U}\right) \]
                      2. associate-*l*N/A

                        \[\leadsto \mathsf{+.f64}\left(\left(J \cdot \left(\left(e^{\ell} - e^{\mathsf{neg}\left(\ell\right)}\right) \cdot \cos \left(\frac{K}{2}\right)\right)\right), U\right) \]
                      3. *-commutativeN/A

                        \[\leadsto \mathsf{+.f64}\left(\left(\left(\left(e^{\ell} - e^{\mathsf{neg}\left(\ell\right)}\right) \cdot \cos \left(\frac{K}{2}\right)\right) \cdot J\right), U\right) \]
                      4. associate-*l*N/A

                        \[\leadsto \mathsf{+.f64}\left(\left(\left(e^{\ell} - e^{\mathsf{neg}\left(\ell\right)}\right) \cdot \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
                      5. *-lowering-*.f64N/A

                        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(e^{\ell} - e^{\mathsf{neg}\left(\ell\right)}\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
                      6. sub-negN/A

                        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(e^{\ell} + \left(\mathsf{neg}\left(e^{\mathsf{neg}\left(\ell\right)}\right)\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
                      7. +-lowering-+.f64N/A

                        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\left(e^{\ell}\right), \left(\mathsf{neg}\left(e^{\mathsf{neg}\left(\ell\right)}\right)\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
                      8. exp-lowering-exp.f64N/A

                        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \left(\mathsf{neg}\left(e^{\mathsf{neg}\left(\ell\right)}\right)\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
                      9. exp-negN/A

                        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \left(\mathsf{neg}\left(\frac{1}{e^{\ell}}\right)\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
                      10. distribute-neg-fracN/A

                        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \left(\frac{\mathsf{neg}\left(1\right)}{e^{\ell}}\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
                      11. metadata-evalN/A

                        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \left(\frac{-1}{e^{\ell}}\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
                      12. /-lowering-/.f64N/A

                        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \mathsf{/.f64}\left(-1, \left(e^{\ell}\right)\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
                      13. exp-lowering-exp.f64N/A

                        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \mathsf{/.f64}\left(-1, \mathsf{exp.f64}\left(\ell\right)\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
                      14. *-commutativeN/A

                        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \mathsf{/.f64}\left(-1, \mathsf{exp.f64}\left(\ell\right)\right)\right), \left(J \cdot \cos \left(\frac{K}{2}\right)\right)\right), U\right) \]
                      15. *-lowering-*.f64N/A

                        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \mathsf{/.f64}\left(-1, \mathsf{exp.f64}\left(\ell\right)\right)\right), \mathsf{*.f64}\left(J, \cos \left(\frac{K}{2}\right)\right)\right), U\right) \]
                      16. cos-lowering-cos.f64N/A

                        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \mathsf{/.f64}\left(-1, \mathsf{exp.f64}\left(\ell\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\left(\frac{K}{2}\right)\right)\right)\right), U\right) \]
                      17. /-lowering-/.f6489.3%

                        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \mathsf{/.f64}\left(-1, \mathsf{exp.f64}\left(\ell\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
                    3. Simplified89.3%

                      \[\leadsto \color{blue}{\left(e^{\ell} + \frac{-1}{e^{\ell}}\right) \cdot \left(J \cdot \cos \left(\frac{K}{2}\right)\right) + U} \]
                    4. Add Preprocessing
                    5. Taylor expanded in l around 0

                      \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\color{blue}{\left(\ell \cdot \left(2 + {\ell}^{2} \cdot \left(\frac{1}{3} + \frac{1}{60} \cdot {\ell}^{2}\right)\right)\right)}, \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
                    6. Step-by-step derivation
                      1. *-lowering-*.f64N/A

                        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \left(2 + {\ell}^{2} \cdot \left(\frac{1}{3} + \frac{1}{60} \cdot {\ell}^{2}\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
                      2. +-lowering-+.f64N/A

                        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \left({\ell}^{2} \cdot \left(\frac{1}{3} + \frac{1}{60} \cdot {\ell}^{2}\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
                      3. *-lowering-*.f64N/A

                        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\left({\ell}^{2}\right), \left(\frac{1}{3} + \frac{1}{60} \cdot {\ell}^{2}\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
                      4. unpow2N/A

                        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\left(\ell \cdot \ell\right), \left(\frac{1}{3} + \frac{1}{60} \cdot {\ell}^{2}\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
                      5. *-lowering-*.f64N/A

                        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \left(\frac{1}{3} + \frac{1}{60} \cdot {\ell}^{2}\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
                      6. +-lowering-+.f64N/A

                        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \left(\frac{1}{60} \cdot {\ell}^{2}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
                      7. *-commutativeN/A

                        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \left({\ell}^{2} \cdot \frac{1}{60}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
                      8. *-lowering-*.f64N/A

                        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\left({\ell}^{2}\right), \frac{1}{60}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
                      9. unpow2N/A

                        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\left(\ell \cdot \ell\right), \frac{1}{60}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
                      10. *-lowering-*.f6492.5%

                        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \frac{1}{60}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
                    7. Simplified92.5%

                      \[\leadsto \color{blue}{\left(\ell \cdot \left(2 + \left(\ell \cdot \ell\right) \cdot \left(0.3333333333333333 + \left(\ell \cdot \ell\right) \cdot 0.016666666666666666\right)\right)\right)} \cdot \left(J \cdot \cos \left(\frac{K}{2}\right)\right) + U \]
                    8. Taylor expanded in K around 0

                      \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \frac{1}{60}\right)\right)\right)\right)\right), \color{blue}{J}\right), U\right) \]
                    9. Step-by-step derivation
                      1. Simplified73.7%

                        \[\leadsto \left(\ell \cdot \left(2 + \left(\ell \cdot \ell\right) \cdot \left(0.3333333333333333 + \left(\ell \cdot \ell\right) \cdot 0.016666666666666666\right)\right)\right) \cdot \color{blue}{J} + U \]
                      2. Final simplification73.7%

                        \[\leadsto U + J \cdot \left(\ell \cdot \left(2 + \left(\ell \cdot \ell\right) \cdot \left(0.3333333333333333 + \left(\ell \cdot \ell\right) \cdot 0.016666666666666666\right)\right)\right) \]
                      3. Add Preprocessing

                      Alternative 26: 76.3% accurate, 16.4× speedup?

                      \[\begin{array}{l} \\ U + \ell \cdot \left(J \cdot \left(2 + \ell \cdot \left(\ell \cdot \left(0.3333333333333333 + \left(\ell \cdot \ell\right) \cdot 0.016666666666666666\right)\right)\right)\right) \end{array} \]
                      (FPCore (J l K U)
                       :precision binary64
                       (+
                        U
                        (*
                         l
                         (*
                          J
                          (+
                           2.0
                           (* l (* l (+ 0.3333333333333333 (* (* l l) 0.016666666666666666)))))))))
                      double code(double J, double l, double K, double U) {
                      	return U + (l * (J * (2.0 + (l * (l * (0.3333333333333333 + ((l * l) * 0.016666666666666666)))))));
                      }
                      
                      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 + (l * (l * (0.3333333333333333d0 + ((l * l) * 0.016666666666666666d0)))))))
                      end function
                      
                      public static double code(double J, double l, double K, double U) {
                      	return U + (l * (J * (2.0 + (l * (l * (0.3333333333333333 + ((l * l) * 0.016666666666666666)))))));
                      }
                      
                      def code(J, l, K, U):
                      	return U + (l * (J * (2.0 + (l * (l * (0.3333333333333333 + ((l * l) * 0.016666666666666666)))))))
                      
                      function code(J, l, K, U)
                      	return Float64(U + Float64(l * Float64(J * Float64(2.0 + Float64(l * Float64(l * Float64(0.3333333333333333 + Float64(Float64(l * l) * 0.016666666666666666))))))))
                      end
                      
                      function tmp = code(J, l, K, U)
                      	tmp = U + (l * (J * (2.0 + (l * (l * (0.3333333333333333 + ((l * l) * 0.016666666666666666)))))));
                      end
                      
                      code[J_, l_, K_, U_] := N[(U + N[(l * N[(J * N[(2.0 + N[(l * N[(l * N[(0.3333333333333333 + N[(N[(l * l), $MachinePrecision] * 0.016666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
                      
                      \begin{array}{l}
                      
                      \\
                      U + \ell \cdot \left(J \cdot \left(2 + \ell \cdot \left(\ell \cdot \left(0.3333333333333333 + \left(\ell \cdot \ell\right) \cdot 0.016666666666666666\right)\right)\right)\right)
                      \end{array}
                      
                      Derivation
                      1. Initial program 89.3%

                        \[\left(J \cdot \left(e^{\ell} - e^{-\ell}\right)\right) \cdot \cos \left(\frac{K}{2}\right) + U \]
                      2. Step-by-step derivation
                        1. +-lowering-+.f64N/A

                          \[\leadsto \mathsf{+.f64}\left(\left(\left(J \cdot \left(e^{\ell} - e^{\mathsf{neg}\left(\ell\right)}\right)\right) \cdot \cos \left(\frac{K}{2}\right)\right), \color{blue}{U}\right) \]
                        2. associate-*l*N/A

                          \[\leadsto \mathsf{+.f64}\left(\left(J \cdot \left(\left(e^{\ell} - e^{\mathsf{neg}\left(\ell\right)}\right) \cdot \cos \left(\frac{K}{2}\right)\right)\right), U\right) \]
                        3. *-commutativeN/A

                          \[\leadsto \mathsf{+.f64}\left(\left(\left(\left(e^{\ell} - e^{\mathsf{neg}\left(\ell\right)}\right) \cdot \cos \left(\frac{K}{2}\right)\right) \cdot J\right), U\right) \]
                        4. associate-*l*N/A

                          \[\leadsto \mathsf{+.f64}\left(\left(\left(e^{\ell} - e^{\mathsf{neg}\left(\ell\right)}\right) \cdot \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
                        5. *-lowering-*.f64N/A

                          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(e^{\ell} - e^{\mathsf{neg}\left(\ell\right)}\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
                        6. sub-negN/A

                          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(e^{\ell} + \left(\mathsf{neg}\left(e^{\mathsf{neg}\left(\ell\right)}\right)\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
                        7. +-lowering-+.f64N/A

                          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\left(e^{\ell}\right), \left(\mathsf{neg}\left(e^{\mathsf{neg}\left(\ell\right)}\right)\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
                        8. exp-lowering-exp.f64N/A

                          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \left(\mathsf{neg}\left(e^{\mathsf{neg}\left(\ell\right)}\right)\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
                        9. exp-negN/A

                          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \left(\mathsf{neg}\left(\frac{1}{e^{\ell}}\right)\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
                        10. distribute-neg-fracN/A

                          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \left(\frac{\mathsf{neg}\left(1\right)}{e^{\ell}}\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
                        11. metadata-evalN/A

                          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \left(\frac{-1}{e^{\ell}}\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
                        12. /-lowering-/.f64N/A

                          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \mathsf{/.f64}\left(-1, \left(e^{\ell}\right)\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
                        13. exp-lowering-exp.f64N/A

                          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \mathsf{/.f64}\left(-1, \mathsf{exp.f64}\left(\ell\right)\right)\right), \left(\cos \left(\frac{K}{2}\right) \cdot J\right)\right), U\right) \]
                        14. *-commutativeN/A

                          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \mathsf{/.f64}\left(-1, \mathsf{exp.f64}\left(\ell\right)\right)\right), \left(J \cdot \cos \left(\frac{K}{2}\right)\right)\right), U\right) \]
                        15. *-lowering-*.f64N/A

                          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \mathsf{/.f64}\left(-1, \mathsf{exp.f64}\left(\ell\right)\right)\right), \mathsf{*.f64}\left(J, \cos \left(\frac{K}{2}\right)\right)\right), U\right) \]
                        16. cos-lowering-cos.f64N/A

                          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \mathsf{/.f64}\left(-1, \mathsf{exp.f64}\left(\ell\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\left(\frac{K}{2}\right)\right)\right)\right), U\right) \]
                        17. /-lowering-/.f6489.3%

                          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{exp.f64}\left(\ell\right), \mathsf{/.f64}\left(-1, \mathsf{exp.f64}\left(\ell\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
                      3. Simplified89.3%

                        \[\leadsto \color{blue}{\left(e^{\ell} + \frac{-1}{e^{\ell}}\right) \cdot \left(J \cdot \cos \left(\frac{K}{2}\right)\right) + U} \]
                      4. Add Preprocessing
                      5. Taylor expanded in l around 0

                        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\color{blue}{\left(\ell \cdot \left(2 + {\ell}^{2} \cdot \left(\frac{1}{3} + \frac{1}{60} \cdot {\ell}^{2}\right)\right)\right)}, \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
                      6. Step-by-step derivation
                        1. *-lowering-*.f64N/A

                          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \left(2 + {\ell}^{2} \cdot \left(\frac{1}{3} + \frac{1}{60} \cdot {\ell}^{2}\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
                        2. +-lowering-+.f64N/A

                          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \left({\ell}^{2} \cdot \left(\frac{1}{3} + \frac{1}{60} \cdot {\ell}^{2}\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
                        3. *-lowering-*.f64N/A

                          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\left({\ell}^{2}\right), \left(\frac{1}{3} + \frac{1}{60} \cdot {\ell}^{2}\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
                        4. unpow2N/A

                          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\left(\ell \cdot \ell\right), \left(\frac{1}{3} + \frac{1}{60} \cdot {\ell}^{2}\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
                        5. *-lowering-*.f64N/A

                          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \left(\frac{1}{3} + \frac{1}{60} \cdot {\ell}^{2}\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
                        6. +-lowering-+.f64N/A

                          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \left(\frac{1}{60} \cdot {\ell}^{2}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
                        7. *-commutativeN/A

                          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \left({\ell}^{2} \cdot \frac{1}{60}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
                        8. *-lowering-*.f64N/A

                          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\left({\ell}^{2}\right), \frac{1}{60}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
                        9. unpow2N/A

                          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\left(\ell \cdot \ell\right), \frac{1}{60}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
                        10. *-lowering-*.f6492.5%

                          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \frac{1}{60}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), U\right) \]
                      7. Simplified92.5%

                        \[\leadsto \color{blue}{\left(\ell \cdot \left(2 + \left(\ell \cdot \ell\right) \cdot \left(0.3333333333333333 + \left(\ell \cdot \ell\right) \cdot 0.016666666666666666\right)\right)\right)} \cdot \left(J \cdot \cos \left(\frac{K}{2}\right)\right) + U \]
                      8. Taylor expanded in K around 0

                        \[\leadsto \mathsf{+.f64}\left(\color{blue}{\left(J \cdot \left(\ell \cdot \left(2 + {\ell}^{2} \cdot \left(\frac{1}{3} + \frac{1}{60} \cdot {\ell}^{2}\right)\right)\right)\right)}, U\right) \]
                      9. Step-by-step derivation
                        1. *-commutativeN/A

                          \[\leadsto \mathsf{+.f64}\left(\left(\left(\ell \cdot \left(2 + {\ell}^{2} \cdot \left(\frac{1}{3} + \frac{1}{60} \cdot {\ell}^{2}\right)\right)\right) \cdot J\right), U\right) \]
                        2. associate-*l*N/A

                          \[\leadsto \mathsf{+.f64}\left(\left(\ell \cdot \left(\left(2 + {\ell}^{2} \cdot \left(\frac{1}{3} + \frac{1}{60} \cdot {\ell}^{2}\right)\right) \cdot J\right)\right), U\right) \]
                        3. *-lowering-*.f64N/A

                          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\ell, \left(\left(2 + {\ell}^{2} \cdot \left(\frac{1}{3} + \frac{1}{60} \cdot {\ell}^{2}\right)\right) \cdot J\right)\right), U\right) \]
                        4. *-lowering-*.f64N/A

                          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\left(2 + {\ell}^{2} \cdot \left(\frac{1}{3} + \frac{1}{60} \cdot {\ell}^{2}\right)\right), J\right)\right), U\right) \]
                        5. +-lowering-+.f64N/A

                          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\mathsf{+.f64}\left(2, \left({\ell}^{2} \cdot \left(\frac{1}{3} + \frac{1}{60} \cdot {\ell}^{2}\right)\right)\right), J\right)\right), U\right) \]
                        6. unpow2N/A

                          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\mathsf{+.f64}\left(2, \left(\left(\ell \cdot \ell\right) \cdot \left(\frac{1}{3} + \frac{1}{60} \cdot {\ell}^{2}\right)\right)\right), J\right)\right), U\right) \]
                        7. associate-*l*N/A

                          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\mathsf{+.f64}\left(2, \left(\ell \cdot \left(\ell \cdot \left(\frac{1}{3} + \frac{1}{60} \cdot {\ell}^{2}\right)\right)\right)\right), J\right)\right), U\right) \]
                        8. *-lowering-*.f64N/A

                          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\ell, \left(\ell \cdot \left(\frac{1}{3} + \frac{1}{60} \cdot {\ell}^{2}\right)\right)\right)\right), J\right)\right), U\right) \]
                        9. *-lowering-*.f64N/A

                          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \left(\frac{1}{3} + \frac{1}{60} \cdot {\ell}^{2}\right)\right)\right)\right), J\right)\right), U\right) \]
                        10. +-lowering-+.f64N/A

                          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(\frac{1}{3}, \left(\frac{1}{60} \cdot {\ell}^{2}\right)\right)\right)\right)\right), J\right)\right), U\right) \]
                        11. *-commutativeN/A

                          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(\frac{1}{3}, \left({\ell}^{2} \cdot \frac{1}{60}\right)\right)\right)\right)\right), J\right)\right), U\right) \]
                        12. *-lowering-*.f64N/A

                          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\left({\ell}^{2}\right), \frac{1}{60}\right)\right)\right)\right)\right), J\right)\right), U\right) \]
                        13. unpow2N/A

                          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\left(\ell \cdot \ell\right), \frac{1}{60}\right)\right)\right)\right)\right), J\right)\right), U\right) \]
                        14. *-lowering-*.f6472.6%

                          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \frac{1}{60}\right)\right)\right)\right)\right), J\right)\right), U\right) \]
                      10. Simplified72.6%

                        \[\leadsto \color{blue}{\ell \cdot \left(\left(2 + \ell \cdot \left(\ell \cdot \left(0.3333333333333333 + \left(\ell \cdot \ell\right) \cdot 0.016666666666666666\right)\right)\right) \cdot J\right)} + U \]
                      11. Final simplification72.6%

                        \[\leadsto U + \ell \cdot \left(J \cdot \left(2 + \ell \cdot \left(\ell \cdot \left(0.3333333333333333 + \left(\ell \cdot \ell\right) \cdot 0.016666666666666666\right)\right)\right)\right) \]
                      12. Add Preprocessing

                      Alternative 27: 72.5% accurate, 18.4× speedup?

                      \[\begin{array}{l} \\ U \cdot \left(1 + \frac{\ell \cdot \left(J \cdot \left(2 + \ell \cdot \left(\ell \cdot 0.3333333333333333\right)\right)\right)}{U}\right) \end{array} \]
                      (FPCore (J l K U)
                       :precision binary64
                       (* U (+ 1.0 (/ (* l (* J (+ 2.0 (* l (* l 0.3333333333333333))))) U))))
                      double code(double J, double l, double K, double U) {
                      	return U * (1.0 + ((l * (J * (2.0 + (l * (l * 0.3333333333333333))))) / 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 * (1.0d0 + ((l * (j * (2.0d0 + (l * (l * 0.3333333333333333d0))))) / u))
                      end function
                      
                      public static double code(double J, double l, double K, double U) {
                      	return U * (1.0 + ((l * (J * (2.0 + (l * (l * 0.3333333333333333))))) / U));
                      }
                      
                      def code(J, l, K, U):
                      	return U * (1.0 + ((l * (J * (2.0 + (l * (l * 0.3333333333333333))))) / U))
                      
                      function code(J, l, K, U)
                      	return Float64(U * Float64(1.0 + Float64(Float64(l * Float64(J * Float64(2.0 + Float64(l * Float64(l * 0.3333333333333333))))) / U)))
                      end
                      
                      function tmp = code(J, l, K, U)
                      	tmp = U * (1.0 + ((l * (J * (2.0 + (l * (l * 0.3333333333333333))))) / U));
                      end
                      
                      code[J_, l_, K_, U_] := N[(U * N[(1.0 + N[(N[(l * N[(J * N[(2.0 + N[(l * N[(l * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
                      
                      \begin{array}{l}
                      
                      \\
                      U \cdot \left(1 + \frac{\ell \cdot \left(J \cdot \left(2 + \ell \cdot \left(\ell \cdot 0.3333333333333333\right)\right)\right)}{U}\right)
                      \end{array}
                      
                      Derivation
                      1. Initial program 89.3%

                        \[\left(J \cdot \left(e^{\ell} - e^{-\ell}\right)\right) \cdot \cos \left(\frac{K}{2}\right) + U \]
                      2. Add Preprocessing
                      3. Taylor expanded in l around 0

                        \[\leadsto \mathsf{+.f64}\left(\color{blue}{\left(\ell \cdot \left(\frac{1}{3} \cdot \left(J \cdot \left({\ell}^{2} \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) + 2 \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right)\right)}, U\right) \]
                      4. Step-by-step derivation
                        1. distribute-rgt-inN/A

                          \[\leadsto \mathsf{+.f64}\left(\left(\left(\frac{1}{3} \cdot \left(J \cdot \left({\ell}^{2} \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right)\right) \cdot \ell + \left(2 \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) \cdot \ell\right), U\right) \]
                        2. fma-defineN/A

                          \[\leadsto \mathsf{+.f64}\left(\left(\mathsf{fma}\left(\frac{1}{3} \cdot \left(J \cdot \left({\ell}^{2} \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right), \ell, \left(2 \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) \cdot \ell\right)\right), U\right) \]
                        3. *-commutativeN/A

                          \[\leadsto \mathsf{+.f64}\left(\left(\mathsf{fma}\left(\frac{1}{3} \cdot \left(J \cdot \left(\cos \left(\frac{1}{2} \cdot K\right) \cdot {\ell}^{2}\right)\right), \ell, \left(2 \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) \cdot \ell\right)\right), U\right) \]
                        4. associate-*r*N/A

                          \[\leadsto \mathsf{+.f64}\left(\left(\mathsf{fma}\left(\frac{1}{3} \cdot \left(\left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right) \cdot {\ell}^{2}\right), \ell, \left(2 \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) \cdot \ell\right)\right), U\right) \]
                        5. associate-*l*N/A

                          \[\leadsto \mathsf{+.f64}\left(\left(\mathsf{fma}\left(\left(\frac{1}{3} \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) \cdot {\ell}^{2}, \ell, \left(2 \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) \cdot \ell\right)\right), U\right) \]
                        6. *-commutativeN/A

                          \[\leadsto \mathsf{+.f64}\left(\left(\mathsf{fma}\left({\ell}^{2} \cdot \left(\frac{1}{3} \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right), \ell, \left(2 \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) \cdot \ell\right)\right), U\right) \]
                        7. fma-undefineN/A

                          \[\leadsto \mathsf{+.f64}\left(\left(\left({\ell}^{2} \cdot \left(\frac{1}{3} \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right)\right) \cdot \ell + \left(2 \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) \cdot \ell\right), U\right) \]
                        8. distribute-rgt-inN/A

                          \[\leadsto \mathsf{+.f64}\left(\left(\ell \cdot \left({\ell}^{2} \cdot \left(\frac{1}{3} \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) + 2 \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right)\right), U\right) \]
                        9. *-lowering-*.f64N/A

                          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\ell, \left({\ell}^{2} \cdot \left(\frac{1}{3} \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) + 2 \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right)\right), U\right) \]
                      5. Simplified84.0%

                        \[\leadsto \color{blue}{\ell \cdot \left(\cos \left(0.5 \cdot K\right) \cdot \left(J \cdot \left(2 + 0.3333333333333333 \cdot \left(\ell \cdot \ell\right)\right)\right)\right)} + U \]
                      6. Taylor expanded in K around 0

                        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\ell, \color{blue}{\left(J \cdot \left(2 + \frac{1}{3} \cdot {\ell}^{2}\right)\right)}\right), U\right) \]
                      7. Step-by-step derivation
                        1. *-lowering-*.f64N/A

                          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(J, \left(2 + \frac{1}{3} \cdot {\ell}^{2}\right)\right)\right), U\right) \]
                        2. +-lowering-+.f64N/A

                          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(J, \mathsf{+.f64}\left(2, \left(\frac{1}{3} \cdot {\ell}^{2}\right)\right)\right)\right), U\right) \]
                        3. *-commutativeN/A

                          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(J, \mathsf{+.f64}\left(2, \left({\ell}^{2} \cdot \frac{1}{3}\right)\right)\right)\right), U\right) \]
                        4. unpow2N/A

                          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(J, \mathsf{+.f64}\left(2, \left(\left(\ell \cdot \ell\right) \cdot \frac{1}{3}\right)\right)\right)\right), U\right) \]
                        5. associate-*l*N/A

                          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(J, \mathsf{+.f64}\left(2, \left(\ell \cdot \left(\ell \cdot \frac{1}{3}\right)\right)\right)\right)\right), U\right) \]
                        6. *-lowering-*.f64N/A

                          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(J, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\ell, \left(\ell \cdot \frac{1}{3}\right)\right)\right)\right)\right), U\right) \]
                        7. *-lowering-*.f6468.2%

                          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(J, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \frac{1}{3}\right)\right)\right)\right)\right), U\right) \]
                      8. Simplified68.2%

                        \[\leadsto \ell \cdot \color{blue}{\left(J \cdot \left(2 + \ell \cdot \left(\ell \cdot 0.3333333333333333\right)\right)\right)} + U \]
                      9. Taylor expanded in U around inf

                        \[\leadsto \color{blue}{U \cdot \left(1 + \frac{J \cdot \left(\ell \cdot \left(2 + \frac{1}{3} \cdot {\ell}^{2}\right)\right)}{U}\right)} \]
                      10. Step-by-step derivation
                        1. *-lowering-*.f64N/A

                          \[\leadsto \mathsf{*.f64}\left(U, \color{blue}{\left(1 + \frac{J \cdot \left(\ell \cdot \left(2 + \frac{1}{3} \cdot {\ell}^{2}\right)\right)}{U}\right)}\right) \]
                        2. +-lowering-+.f64N/A

                          \[\leadsto \mathsf{*.f64}\left(U, \mathsf{+.f64}\left(1, \color{blue}{\left(\frac{J \cdot \left(\ell \cdot \left(2 + \frac{1}{3} \cdot {\ell}^{2}\right)\right)}{U}\right)}\right)\right) \]
                        3. /-lowering-/.f64N/A

                          \[\leadsto \mathsf{*.f64}\left(U, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\left(J \cdot \left(\ell \cdot \left(2 + \frac{1}{3} \cdot {\ell}^{2}\right)\right)\right), \color{blue}{U}\right)\right)\right) \]
                        4. *-commutativeN/A

                          \[\leadsto \mathsf{*.f64}\left(U, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\left(\left(\ell \cdot \left(2 + \frac{1}{3} \cdot {\ell}^{2}\right)\right) \cdot J\right), U\right)\right)\right) \]
                        5. associate-*l*N/A

                          \[\leadsto \mathsf{*.f64}\left(U, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\left(\ell \cdot \left(\left(2 + \frac{1}{3} \cdot {\ell}^{2}\right) \cdot J\right)\right), U\right)\right)\right) \]
                        6. *-commutativeN/A

                          \[\leadsto \mathsf{*.f64}\left(U, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\left(\ell \cdot \left(J \cdot \left(2 + \frac{1}{3} \cdot {\ell}^{2}\right)\right)\right), U\right)\right)\right) \]
                        7. *-lowering-*.f64N/A

                          \[\leadsto \mathsf{*.f64}\left(U, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \left(J \cdot \left(2 + \frac{1}{3} \cdot {\ell}^{2}\right)\right)\right), U\right)\right)\right) \]
                        8. *-commutativeN/A

                          \[\leadsto \mathsf{*.f64}\left(U, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \left(\left(2 + \frac{1}{3} \cdot {\ell}^{2}\right) \cdot J\right)\right), U\right)\right)\right) \]
                        9. *-lowering-*.f64N/A

                          \[\leadsto \mathsf{*.f64}\left(U, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\left(2 + \frac{1}{3} \cdot {\ell}^{2}\right), J\right)\right), U\right)\right)\right) \]
                        10. +-lowering-+.f64N/A

                          \[\leadsto \mathsf{*.f64}\left(U, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\mathsf{+.f64}\left(2, \left(\frac{1}{3} \cdot {\ell}^{2}\right)\right), J\right)\right), U\right)\right)\right) \]
                        11. *-commutativeN/A

                          \[\leadsto \mathsf{*.f64}\left(U, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\mathsf{+.f64}\left(2, \left({\ell}^{2} \cdot \frac{1}{3}\right)\right), J\right)\right), U\right)\right)\right) \]
                        12. unpow2N/A

                          \[\leadsto \mathsf{*.f64}\left(U, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\mathsf{+.f64}\left(2, \left(\left(\ell \cdot \ell\right) \cdot \frac{1}{3}\right)\right), J\right)\right), U\right)\right)\right) \]
                        13. associate-*l*N/A

                          \[\leadsto \mathsf{*.f64}\left(U, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\mathsf{+.f64}\left(2, \left(\ell \cdot \left(\ell \cdot \frac{1}{3}\right)\right)\right), J\right)\right), U\right)\right)\right) \]
                        14. *-commutativeN/A

                          \[\leadsto \mathsf{*.f64}\left(U, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\mathsf{+.f64}\left(2, \left(\ell \cdot \left(\frac{1}{3} \cdot \ell\right)\right)\right), J\right)\right), U\right)\right)\right) \]
                        15. *-lowering-*.f64N/A

                          \[\leadsto \mathsf{*.f64}\left(U, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\ell, \left(\frac{1}{3} \cdot \ell\right)\right)\right), J\right)\right), U\right)\right)\right) \]
                        16. *-commutativeN/A

                          \[\leadsto \mathsf{*.f64}\left(U, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\ell, \left(\ell \cdot \frac{1}{3}\right)\right)\right), J\right)\right), U\right)\right)\right) \]
                        17. *-lowering-*.f6469.6%

                          \[\leadsto \mathsf{*.f64}\left(U, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \frac{1}{3}\right)\right)\right), J\right)\right), U\right)\right)\right) \]
                      11. Simplified69.6%

                        \[\leadsto \color{blue}{U \cdot \left(1 + \frac{\ell \cdot \left(\left(2 + \ell \cdot \left(\ell \cdot 0.3333333333333333\right)\right) \cdot J\right)}{U}\right)} \]
                      12. Final simplification69.6%

                        \[\leadsto U \cdot \left(1 + \frac{\ell \cdot \left(J \cdot \left(2 + \ell \cdot \left(\ell \cdot 0.3333333333333333\right)\right)\right)}{U}\right) \]
                      13. Add Preprocessing

                      Alternative 28: 48.1% accurate, 20.8× speedup?

                      \[\begin{array}{l} \\ \begin{array}{l} t_0 := J \cdot \left(2 \cdot \ell\right)\\ \mathbf{if}\;\ell \leq -1020:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;\ell \leq 4600000000000:\\ \;\;\;\;U\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \]
                      (FPCore (J l K U)
                       :precision binary64
                       (let* ((t_0 (* J (* 2.0 l))))
                         (if (<= l -1020.0) t_0 (if (<= l 4600000000000.0) U t_0))))
                      double code(double J, double l, double K, double U) {
                      	double t_0 = J * (2.0 * l);
                      	double tmp;
                      	if (l <= -1020.0) {
                      		tmp = t_0;
                      	} else if (l <= 4600000000000.0) {
                      		tmp = U;
                      	} 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) :: tmp
                          t_0 = j * (2.0d0 * l)
                          if (l <= (-1020.0d0)) then
                              tmp = t_0
                          else if (l <= 4600000000000.0d0) then
                              tmp = u
                          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 = J * (2.0 * l);
                      	double tmp;
                      	if (l <= -1020.0) {
                      		tmp = t_0;
                      	} else if (l <= 4600000000000.0) {
                      		tmp = U;
                      	} else {
                      		tmp = t_0;
                      	}
                      	return tmp;
                      }
                      
                      def code(J, l, K, U):
                      	t_0 = J * (2.0 * l)
                      	tmp = 0
                      	if l <= -1020.0:
                      		tmp = t_0
                      	elif l <= 4600000000000.0:
                      		tmp = U
                      	else:
                      		tmp = t_0
                      	return tmp
                      
                      function code(J, l, K, U)
                      	t_0 = Float64(J * Float64(2.0 * l))
                      	tmp = 0.0
                      	if (l <= -1020.0)
                      		tmp = t_0;
                      	elseif (l <= 4600000000000.0)
                      		tmp = U;
                      	else
                      		tmp = t_0;
                      	end
                      	return tmp
                      end
                      
                      function tmp_2 = code(J, l, K, U)
                      	t_0 = J * (2.0 * l);
                      	tmp = 0.0;
                      	if (l <= -1020.0)
                      		tmp = t_0;
                      	elseif (l <= 4600000000000.0)
                      		tmp = U;
                      	else
                      		tmp = t_0;
                      	end
                      	tmp_2 = tmp;
                      end
                      
                      code[J_, l_, K_, U_] := Block[{t$95$0 = N[(J * N[(2.0 * l), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[l, -1020.0], t$95$0, If[LessEqual[l, 4600000000000.0], U, t$95$0]]]
                      
                      \begin{array}{l}
                      
                      \\
                      \begin{array}{l}
                      t_0 := J \cdot \left(2 \cdot \ell\right)\\
                      \mathbf{if}\;\ell \leq -1020:\\
                      \;\;\;\;t\_0\\
                      
                      \mathbf{elif}\;\ell \leq 4600000000000:\\
                      \;\;\;\;U\\
                      
                      \mathbf{else}:\\
                      \;\;\;\;t\_0\\
                      
                      
                      \end{array}
                      \end{array}
                      
                      Derivation
                      1. Split input into 2 regimes
                      2. if l < -1020 or 4.6e12 < l

                        1. Initial program 100.0%

                          \[\left(J \cdot \left(e^{\ell} - e^{-\ell}\right)\right) \cdot \cos \left(\frac{K}{2}\right) + U \]
                        2. Add Preprocessing
                        3. Taylor expanded in l around 0

                          \[\leadsto \mathsf{+.f64}\left(\color{blue}{\left(\ell \cdot \left(\frac{1}{3} \cdot \left(J \cdot \left({\ell}^{2} \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) + 2 \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right)\right)}, U\right) \]
                        4. Step-by-step derivation
                          1. distribute-rgt-inN/A

                            \[\leadsto \mathsf{+.f64}\left(\left(\left(\frac{1}{3} \cdot \left(J \cdot \left({\ell}^{2} \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right)\right) \cdot \ell + \left(2 \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) \cdot \ell\right), U\right) \]
                          2. fma-defineN/A

                            \[\leadsto \mathsf{+.f64}\left(\left(\mathsf{fma}\left(\frac{1}{3} \cdot \left(J \cdot \left({\ell}^{2} \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right), \ell, \left(2 \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) \cdot \ell\right)\right), U\right) \]
                          3. *-commutativeN/A

                            \[\leadsto \mathsf{+.f64}\left(\left(\mathsf{fma}\left(\frac{1}{3} \cdot \left(J \cdot \left(\cos \left(\frac{1}{2} \cdot K\right) \cdot {\ell}^{2}\right)\right), \ell, \left(2 \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) \cdot \ell\right)\right), U\right) \]
                          4. associate-*r*N/A

                            \[\leadsto \mathsf{+.f64}\left(\left(\mathsf{fma}\left(\frac{1}{3} \cdot \left(\left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right) \cdot {\ell}^{2}\right), \ell, \left(2 \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) \cdot \ell\right)\right), U\right) \]
                          5. associate-*l*N/A

                            \[\leadsto \mathsf{+.f64}\left(\left(\mathsf{fma}\left(\left(\frac{1}{3} \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) \cdot {\ell}^{2}, \ell, \left(2 \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) \cdot \ell\right)\right), U\right) \]
                          6. *-commutativeN/A

                            \[\leadsto \mathsf{+.f64}\left(\left(\mathsf{fma}\left({\ell}^{2} \cdot \left(\frac{1}{3} \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right), \ell, \left(2 \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) \cdot \ell\right)\right), U\right) \]
                          7. fma-undefineN/A

                            \[\leadsto \mathsf{+.f64}\left(\left(\left({\ell}^{2} \cdot \left(\frac{1}{3} \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right)\right) \cdot \ell + \left(2 \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) \cdot \ell\right), U\right) \]
                          8. distribute-rgt-inN/A

                            \[\leadsto \mathsf{+.f64}\left(\left(\ell \cdot \left({\ell}^{2} \cdot \left(\frac{1}{3} \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) + 2 \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right)\right), U\right) \]
                          9. *-lowering-*.f64N/A

                            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\ell, \left({\ell}^{2} \cdot \left(\frac{1}{3} \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) + 2 \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right)\right), U\right) \]
                        5. Simplified70.1%

                          \[\leadsto \color{blue}{\ell \cdot \left(\cos \left(0.5 \cdot K\right) \cdot \left(J \cdot \left(2 + 0.3333333333333333 \cdot \left(\ell \cdot \ell\right)\right)\right)\right)} + U \]
                        6. Taylor expanded in K around 0

                          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\ell, \color{blue}{\left(J \cdot \left(2 + \frac{1}{3} \cdot {\ell}^{2}\right)\right)}\right), U\right) \]
                        7. Step-by-step derivation
                          1. *-lowering-*.f64N/A

                            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(J, \left(2 + \frac{1}{3} \cdot {\ell}^{2}\right)\right)\right), U\right) \]
                          2. +-lowering-+.f64N/A

                            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(J, \mathsf{+.f64}\left(2, \left(\frac{1}{3} \cdot {\ell}^{2}\right)\right)\right)\right), U\right) \]
                          3. *-commutativeN/A

                            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(J, \mathsf{+.f64}\left(2, \left({\ell}^{2} \cdot \frac{1}{3}\right)\right)\right)\right), U\right) \]
                          4. unpow2N/A

                            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(J, \mathsf{+.f64}\left(2, \left(\left(\ell \cdot \ell\right) \cdot \frac{1}{3}\right)\right)\right)\right), U\right) \]
                          5. associate-*l*N/A

                            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(J, \mathsf{+.f64}\left(2, \left(\ell \cdot \left(\ell \cdot \frac{1}{3}\right)\right)\right)\right)\right), U\right) \]
                          6. *-lowering-*.f64N/A

                            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(J, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\ell, \left(\ell \cdot \frac{1}{3}\right)\right)\right)\right)\right), U\right) \]
                          7. *-lowering-*.f6451.9%

                            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(J, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \frac{1}{3}\right)\right)\right)\right)\right), U\right) \]
                        8. Simplified51.9%

                          \[\leadsto \ell \cdot \color{blue}{\left(J \cdot \left(2 + \ell \cdot \left(\ell \cdot 0.3333333333333333\right)\right)\right)} + U \]
                        9. Taylor expanded in l around 0

                          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(J, \color{blue}{2}\right)\right), U\right) \]
                        10. Step-by-step derivation
                          1. Simplified21.2%

                            \[\leadsto \ell \cdot \left(J \cdot \color{blue}{2}\right) + U \]
                          2. Taylor expanded in l around inf

                            \[\leadsto \color{blue}{2 \cdot \left(J \cdot \ell\right)} \]
                          3. Step-by-step derivation
                            1. *-commutativeN/A

                              \[\leadsto \left(J \cdot \ell\right) \cdot \color{blue}{2} \]
                            2. associate-*r*N/A

                              \[\leadsto J \cdot \color{blue}{\left(\ell \cdot 2\right)} \]
                            3. *-commutativeN/A

                              \[\leadsto J \cdot \left(2 \cdot \color{blue}{\ell}\right) \]
                            4. *-lowering-*.f64N/A

                              \[\leadsto \mathsf{*.f64}\left(J, \color{blue}{\left(2 \cdot \ell\right)}\right) \]
                            5. *-commutativeN/A

                              \[\leadsto \mathsf{*.f64}\left(J, \left(\ell \cdot \color{blue}{2}\right)\right) \]
                            6. *-lowering-*.f6420.8%

                              \[\leadsto \mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\ell, \color{blue}{2}\right)\right) \]
                          4. Simplified20.8%

                            \[\leadsto \color{blue}{J \cdot \left(\ell \cdot 2\right)} \]

                          if -1020 < l < 4.6e12

                          1. Initial program 78.3%

                            \[\left(J \cdot \left(e^{\ell} - e^{-\ell}\right)\right) \cdot \cos \left(\frac{K}{2}\right) + U \]
                          2. Add Preprocessing
                          3. Taylor expanded in J around 0

                            \[\leadsto \color{blue}{U} \]
                          4. Step-by-step derivation
                            1. Simplified76.2%

                              \[\leadsto \color{blue}{U} \]
                          5. Recombined 2 regimes into one program.
                          6. Final simplification48.1%

                            \[\leadsto \begin{array}{l} \mathbf{if}\;\ell \leq -1020:\\ \;\;\;\;J \cdot \left(2 \cdot \ell\right)\\ \mathbf{elif}\;\ell \leq 4600000000000:\\ \;\;\;\;U\\ \mathbf{else}:\\ \;\;\;\;J \cdot \left(2 \cdot \ell\right)\\ \end{array} \]
                          7. Add Preprocessing

                          Alternative 29: 71.5% accurate, 24.0× speedup?

                          \[\begin{array}{l} \\ U + \ell \cdot \left(J \cdot \left(2 + \ell \cdot \left(\ell \cdot 0.3333333333333333\right)\right)\right) \end{array} \]
                          (FPCore (J l K U)
                           :precision binary64
                           (+ U (* l (* J (+ 2.0 (* l (* l 0.3333333333333333)))))))
                          double code(double J, double l, double K, double U) {
                          	return U + (l * (J * (2.0 + (l * (l * 0.3333333333333333)))));
                          }
                          
                          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 + (l * (l * 0.3333333333333333d0)))))
                          end function
                          
                          public static double code(double J, double l, double K, double U) {
                          	return U + (l * (J * (2.0 + (l * (l * 0.3333333333333333)))));
                          }
                          
                          def code(J, l, K, U):
                          	return U + (l * (J * (2.0 + (l * (l * 0.3333333333333333)))))
                          
                          function code(J, l, K, U)
                          	return Float64(U + Float64(l * Float64(J * Float64(2.0 + Float64(l * Float64(l * 0.3333333333333333))))))
                          end
                          
                          function tmp = code(J, l, K, U)
                          	tmp = U + (l * (J * (2.0 + (l * (l * 0.3333333333333333)))));
                          end
                          
                          code[J_, l_, K_, U_] := N[(U + N[(l * N[(J * N[(2.0 + N[(l * N[(l * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
                          
                          \begin{array}{l}
                          
                          \\
                          U + \ell \cdot \left(J \cdot \left(2 + \ell \cdot \left(\ell \cdot 0.3333333333333333\right)\right)\right)
                          \end{array}
                          
                          Derivation
                          1. Initial program 89.3%

                            \[\left(J \cdot \left(e^{\ell} - e^{-\ell}\right)\right) \cdot \cos \left(\frac{K}{2}\right) + U \]
                          2. Add Preprocessing
                          3. Taylor expanded in l around 0

                            \[\leadsto \mathsf{+.f64}\left(\color{blue}{\left(\ell \cdot \left(\frac{1}{3} \cdot \left(J \cdot \left({\ell}^{2} \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) + 2 \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right)\right)}, U\right) \]
                          4. Step-by-step derivation
                            1. distribute-rgt-inN/A

                              \[\leadsto \mathsf{+.f64}\left(\left(\left(\frac{1}{3} \cdot \left(J \cdot \left({\ell}^{2} \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right)\right) \cdot \ell + \left(2 \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) \cdot \ell\right), U\right) \]
                            2. fma-defineN/A

                              \[\leadsto \mathsf{+.f64}\left(\left(\mathsf{fma}\left(\frac{1}{3} \cdot \left(J \cdot \left({\ell}^{2} \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right), \ell, \left(2 \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) \cdot \ell\right)\right), U\right) \]
                            3. *-commutativeN/A

                              \[\leadsto \mathsf{+.f64}\left(\left(\mathsf{fma}\left(\frac{1}{3} \cdot \left(J \cdot \left(\cos \left(\frac{1}{2} \cdot K\right) \cdot {\ell}^{2}\right)\right), \ell, \left(2 \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) \cdot \ell\right)\right), U\right) \]
                            4. associate-*r*N/A

                              \[\leadsto \mathsf{+.f64}\left(\left(\mathsf{fma}\left(\frac{1}{3} \cdot \left(\left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right) \cdot {\ell}^{2}\right), \ell, \left(2 \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) \cdot \ell\right)\right), U\right) \]
                            5. associate-*l*N/A

                              \[\leadsto \mathsf{+.f64}\left(\left(\mathsf{fma}\left(\left(\frac{1}{3} \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) \cdot {\ell}^{2}, \ell, \left(2 \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) \cdot \ell\right)\right), U\right) \]
                            6. *-commutativeN/A

                              \[\leadsto \mathsf{+.f64}\left(\left(\mathsf{fma}\left({\ell}^{2} \cdot \left(\frac{1}{3} \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right), \ell, \left(2 \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) \cdot \ell\right)\right), U\right) \]
                            7. fma-undefineN/A

                              \[\leadsto \mathsf{+.f64}\left(\left(\left({\ell}^{2} \cdot \left(\frac{1}{3} \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right)\right) \cdot \ell + \left(2 \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) \cdot \ell\right), U\right) \]
                            8. distribute-rgt-inN/A

                              \[\leadsto \mathsf{+.f64}\left(\left(\ell \cdot \left({\ell}^{2} \cdot \left(\frac{1}{3} \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) + 2 \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right)\right), U\right) \]
                            9. *-lowering-*.f64N/A

                              \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\ell, \left({\ell}^{2} \cdot \left(\frac{1}{3} \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) + 2 \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right)\right), U\right) \]
                          5. Simplified84.0%

                            \[\leadsto \color{blue}{\ell \cdot \left(\cos \left(0.5 \cdot K\right) \cdot \left(J \cdot \left(2 + 0.3333333333333333 \cdot \left(\ell \cdot \ell\right)\right)\right)\right)} + U \]
                          6. Taylor expanded in K around 0

                            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\ell, \color{blue}{\left(J \cdot \left(2 + \frac{1}{3} \cdot {\ell}^{2}\right)\right)}\right), U\right) \]
                          7. Step-by-step derivation
                            1. *-lowering-*.f64N/A

                              \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(J, \left(2 + \frac{1}{3} \cdot {\ell}^{2}\right)\right)\right), U\right) \]
                            2. +-lowering-+.f64N/A

                              \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(J, \mathsf{+.f64}\left(2, \left(\frac{1}{3} \cdot {\ell}^{2}\right)\right)\right)\right), U\right) \]
                            3. *-commutativeN/A

                              \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(J, \mathsf{+.f64}\left(2, \left({\ell}^{2} \cdot \frac{1}{3}\right)\right)\right)\right), U\right) \]
                            4. unpow2N/A

                              \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(J, \mathsf{+.f64}\left(2, \left(\left(\ell \cdot \ell\right) \cdot \frac{1}{3}\right)\right)\right)\right), U\right) \]
                            5. associate-*l*N/A

                              \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(J, \mathsf{+.f64}\left(2, \left(\ell \cdot \left(\ell \cdot \frac{1}{3}\right)\right)\right)\right)\right), U\right) \]
                            6. *-lowering-*.f64N/A

                              \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(J, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\ell, \left(\ell \cdot \frac{1}{3}\right)\right)\right)\right)\right), U\right) \]
                            7. *-lowering-*.f6468.2%

                              \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(J, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \frac{1}{3}\right)\right)\right)\right)\right), U\right) \]
                          8. Simplified68.2%

                            \[\leadsto \ell \cdot \color{blue}{\left(J \cdot \left(2 + \ell \cdot \left(\ell \cdot 0.3333333333333333\right)\right)\right)} + U \]
                          9. Final simplification68.2%

                            \[\leadsto U + \ell \cdot \left(J \cdot \left(2 + \ell \cdot \left(\ell \cdot 0.3333333333333333\right)\right)\right) \]
                          10. Add Preprocessing

                          Alternative 30: 55.7% accurate, 44.6× speedup?

                          \[\begin{array}{l} \\ U + \ell \cdot \left(J \cdot 2\right) \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}
                          
                          Derivation
                          1. Initial program 89.3%

                            \[\left(J \cdot \left(e^{\ell} - e^{-\ell}\right)\right) \cdot \cos \left(\frac{K}{2}\right) + U \]
                          2. Add Preprocessing
                          3. Taylor expanded in l around 0

                            \[\leadsto \mathsf{+.f64}\left(\color{blue}{\left(\ell \cdot \left(\frac{1}{3} \cdot \left(J \cdot \left({\ell}^{2} \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) + 2 \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right)\right)}, U\right) \]
                          4. Step-by-step derivation
                            1. distribute-rgt-inN/A

                              \[\leadsto \mathsf{+.f64}\left(\left(\left(\frac{1}{3} \cdot \left(J \cdot \left({\ell}^{2} \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right)\right) \cdot \ell + \left(2 \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) \cdot \ell\right), U\right) \]
                            2. fma-defineN/A

                              \[\leadsto \mathsf{+.f64}\left(\left(\mathsf{fma}\left(\frac{1}{3} \cdot \left(J \cdot \left({\ell}^{2} \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right), \ell, \left(2 \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) \cdot \ell\right)\right), U\right) \]
                            3. *-commutativeN/A

                              \[\leadsto \mathsf{+.f64}\left(\left(\mathsf{fma}\left(\frac{1}{3} \cdot \left(J \cdot \left(\cos \left(\frac{1}{2} \cdot K\right) \cdot {\ell}^{2}\right)\right), \ell, \left(2 \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) \cdot \ell\right)\right), U\right) \]
                            4. associate-*r*N/A

                              \[\leadsto \mathsf{+.f64}\left(\left(\mathsf{fma}\left(\frac{1}{3} \cdot \left(\left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right) \cdot {\ell}^{2}\right), \ell, \left(2 \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) \cdot \ell\right)\right), U\right) \]
                            5. associate-*l*N/A

                              \[\leadsto \mathsf{+.f64}\left(\left(\mathsf{fma}\left(\left(\frac{1}{3} \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) \cdot {\ell}^{2}, \ell, \left(2 \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) \cdot \ell\right)\right), U\right) \]
                            6. *-commutativeN/A

                              \[\leadsto \mathsf{+.f64}\left(\left(\mathsf{fma}\left({\ell}^{2} \cdot \left(\frac{1}{3} \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right), \ell, \left(2 \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) \cdot \ell\right)\right), U\right) \]
                            7. fma-undefineN/A

                              \[\leadsto \mathsf{+.f64}\left(\left(\left({\ell}^{2} \cdot \left(\frac{1}{3} \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right)\right) \cdot \ell + \left(2 \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) \cdot \ell\right), U\right) \]
                            8. distribute-rgt-inN/A

                              \[\leadsto \mathsf{+.f64}\left(\left(\ell \cdot \left({\ell}^{2} \cdot \left(\frac{1}{3} \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) + 2 \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right)\right), U\right) \]
                            9. *-lowering-*.f64N/A

                              \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\ell, \left({\ell}^{2} \cdot \left(\frac{1}{3} \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) + 2 \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right)\right), U\right) \]
                          5. Simplified84.0%

                            \[\leadsto \color{blue}{\ell \cdot \left(\cos \left(0.5 \cdot K\right) \cdot \left(J \cdot \left(2 + 0.3333333333333333 \cdot \left(\ell \cdot \ell\right)\right)\right)\right)} + U \]
                          6. Taylor expanded in K around 0

                            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\ell, \color{blue}{\left(J \cdot \left(2 + \frac{1}{3} \cdot {\ell}^{2}\right)\right)}\right), U\right) \]
                          7. Step-by-step derivation
                            1. *-lowering-*.f64N/A

                              \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(J, \left(2 + \frac{1}{3} \cdot {\ell}^{2}\right)\right)\right), U\right) \]
                            2. +-lowering-+.f64N/A

                              \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(J, \mathsf{+.f64}\left(2, \left(\frac{1}{3} \cdot {\ell}^{2}\right)\right)\right)\right), U\right) \]
                            3. *-commutativeN/A

                              \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(J, \mathsf{+.f64}\left(2, \left({\ell}^{2} \cdot \frac{1}{3}\right)\right)\right)\right), U\right) \]
                            4. unpow2N/A

                              \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(J, \mathsf{+.f64}\left(2, \left(\left(\ell \cdot \ell\right) \cdot \frac{1}{3}\right)\right)\right)\right), U\right) \]
                            5. associate-*l*N/A

                              \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(J, \mathsf{+.f64}\left(2, \left(\ell \cdot \left(\ell \cdot \frac{1}{3}\right)\right)\right)\right)\right), U\right) \]
                            6. *-lowering-*.f64N/A

                              \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(J, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\ell, \left(\ell \cdot \frac{1}{3}\right)\right)\right)\right)\right), U\right) \]
                            7. *-lowering-*.f6468.2%

                              \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(J, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \frac{1}{3}\right)\right)\right)\right)\right), U\right) \]
                          8. Simplified68.2%

                            \[\leadsto \ell \cdot \color{blue}{\left(J \cdot \left(2 + \ell \cdot \left(\ell \cdot 0.3333333333333333\right)\right)\right)} + U \]
                          9. Taylor expanded in l around 0

                            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(J, \color{blue}{2}\right)\right), U\right) \]
                          10. Step-by-step derivation
                            1. Simplified52.6%

                              \[\leadsto \ell \cdot \left(J \cdot \color{blue}{2}\right) + U \]
                            2. Final simplification52.6%

                              \[\leadsto U + \ell \cdot \left(J \cdot 2\right) \]
                            3. Add Preprocessing

                            Alternative 31: 38.0% accurate, 312.0× speedup?

                            \[\begin{array}{l} \\ U \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}
                            
                            Derivation
                            1. Initial program 89.3%

                              \[\left(J \cdot \left(e^{\ell} - e^{-\ell}\right)\right) \cdot \cos \left(\frac{K}{2}\right) + U \]
                            2. Add Preprocessing
                            3. Taylor expanded in J around 0

                              \[\leadsto \color{blue}{U} \]
                            4. Step-by-step derivation
                              1. Simplified38.8%

                                \[\leadsto \color{blue}{U} \]
                              2. Add Preprocessing

                              Reproduce

                              ?
                              herbie shell --seed 2024288 
                              (FPCore (J l K U)
                                :name "Maksimov and Kolovsky, Equation (4)"
                                :precision binary64
                                (+ (* (* J (- (exp l) (exp (- l)))) (cos (/ K 2.0))) U))