Maksimov and Kolovsky, Equation (4)

Percentage Accurate: 86.1% → 99.9%
Time: 14.7s
Alternatives: 23
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 23 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.1% 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: 99.9% accurate, 1.5× speedup?

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

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

    \[\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 \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) \]
    2. *-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) \]
    3. *-lowering-*.f64N/A

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

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

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

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

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

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

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

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

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

Alternative 2: 87.3% accurate, 1.0× speedup?

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

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

\mathbf{elif}\;t\_0 \leq -0.05:\\
\;\;\;\;U + t\_0 \cdot \left(\ell \cdot \left(2 \cdot J\right)\right)\\

\mathbf{else}:\\
\;\;\;\;U + \sinh \ell \cdot \frac{J}{0.5}\\


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

    1. Initial program 95.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(\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. *-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), \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. 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), \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) \]
      9. *-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(\mathsf{*.f64}\left(\ell, \ell\right), \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) \]
      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(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{60}, \left(\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) \]
      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(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{60}, \left({\ell}^{2} \cdot \frac{1}{2520}\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right), U\right) \]
      12. 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(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{60}, \left(\left(\ell \cdot \ell\right) \cdot \frac{1}{2520}\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right), U\right) \]
      13. 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}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{60}, \left(\ell \cdot \left(\ell \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) \]
      14. *-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(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{60}, \mathsf{*.f64}\left(\ell, \left(\ell \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-*.f6497.2%

        \[\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), \mathsf{+.f64}\left(\frac{1}{60}, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \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. Simplified97.2%

      \[\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 \left(0.016666666666666666 + \ell \cdot \left(\ell \cdot 0.0003968253968253968\right)\right)\right)\right)\right)}\right) \cdot \cos \left(\frac{K}{2}\right) + U \]
    6. Taylor expanded in K around 0

      \[\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), \mathsf{+.f64}\left(\frac{1}{60}, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \frac{1}{2520}\right)\right)\right)\right)\right)\right)\right)\right)\right), \color{blue}{\left(1 + \frac{-1}{8} \cdot {K}^{2}\right)}\right), U\right) \]
    7. Step-by-step derivation
      1. +-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(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{60}, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \frac{1}{2520}\right)\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{+.f64}\left(1, \left(\frac{-1}{8} \cdot {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, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{60}, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \frac{1}{2520}\right)\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{8}, \left({K}^{2}\right)\right)\right)\right), U\right) \]
      3. 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(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{60}, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \frac{1}{2520}\right)\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{8}, \left(K \cdot K\right)\right)\right)\right), U\right) \]
      4. *-lowering-*.f6480.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), \mathsf{+.f64}\left(\frac{1}{60}, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \frac{1}{2520}\right)\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{*.f64}\left(K, K\right)\right)\right)\right), U\right) \]
    8. Simplified80.5%

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

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

    1. Initial program 85.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. associate-*r*N/A

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

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(\ell \cdot \left(2 \cdot J\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(\ell, \left(2 \cdot J\right)\right), \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right), U\right) \]
      4. *-lowering-*.f6481.9%

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

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

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

    1. Initial program 87.2%

      \[\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 \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) \]
      2. *-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) \]
      3. *-lowering-*.f64N/A

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\color{blue}{1} \cdot \left(2 \cdot \sinh \ell\right)\right) \cdot J + U \]
      2. Step-by-step derivation
        1. *-lft-identityN/A

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

          \[\leadsto \mathsf{+.f64}\left(\left(J \cdot \left(2 \cdot \sinh \ell\right)\right), U\right) \]
        3. /-rgt-identityN/A

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

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

          \[\leadsto \mathsf{+.f64}\left(\left(\frac{J}{\frac{\frac{1}{2}}{\sinh \ell}}\right), U\right) \]
        6. associate-/r/N/A

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

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

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(J, \left(\frac{1}{2}\right)\right), \sinh \ell\right), U\right) \]
        9. metadata-evalN/A

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

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(J, \frac{1}{2}\right), \mathsf{sinh.f64}\left(\ell\right)\right), U\right) \]
      3. Applied egg-rr95.3%

        \[\leadsto \color{blue}{\frac{J}{0.5} \cdot \sinh \ell} + U \]
    7. Recombined 3 regimes into one program.
    8. Final simplification91.2%

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

    Alternative 3: 93.2% accurate, 1.4× speedup?

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

      1. Initial program 90.1%

        \[\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. fma-undefineN/A

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

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

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\ell, \left(\left(\frac{1}{3} \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) \cdot {\ell}^{2} + 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 \]

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

      1. Initial program 87.4%

        \[\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 \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) \]
        2. *-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) \]
        3. *-lowering-*.f64N/A

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \left(\color{blue}{1} \cdot \left(2 \cdot \sinh \ell\right)\right) \cdot J + U \]
        2. Step-by-step derivation
          1. *-lft-identityN/A

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

            \[\leadsto \mathsf{+.f64}\left(\left(J \cdot \left(2 \cdot \sinh \ell\right)\right), U\right) \]
          3. /-rgt-identityN/A

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

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

            \[\leadsto \mathsf{+.f64}\left(\left(\frac{J}{\frac{\frac{1}{2}}{\sinh \ell}}\right), U\right) \]
          6. associate-/r/N/A

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

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

            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(J, \left(\frac{1}{2}\right)\right), \sinh \ell\right), U\right) \]
          9. metadata-evalN/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(J, \frac{1}{2}\right), \sinh \ell\right), U\right) \]
          10. sinh-lowering-sinh.f6495.8%

            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(J, \frac{1}{2}\right), \mathsf{sinh.f64}\left(\ell\right)\right), U\right) \]
        3. Applied egg-rr95.8%

          \[\leadsto \color{blue}{\frac{J}{0.5} \cdot \sinh \ell} + U \]
      7. Recombined 2 regimes into one program.
      8. Final simplification94.4%

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

      Alternative 4: 88.9% accurate, 2.3× speedup?

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

        1. Initial program 89.4%

          \[\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 \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) \]
          2. *-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) \]
          3. *-lowering-*.f64N/A

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \left(\color{blue}{1} \cdot \left(2 \cdot \sinh \ell\right)\right) \cdot J + U \]
          2. Step-by-step derivation
            1. *-lft-identityN/A

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

              \[\leadsto \mathsf{+.f64}\left(\left(J \cdot \left(2 \cdot \sinh \ell\right)\right), U\right) \]
            3. /-rgt-identityN/A

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

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

              \[\leadsto \mathsf{+.f64}\left(\left(\frac{J}{\frac{\frac{1}{2}}{\sinh \ell}}\right), U\right) \]
            6. associate-/r/N/A

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

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

              \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(J, \left(\frac{1}{2}\right)\right), \sinh \ell\right), U\right) \]
            9. metadata-evalN/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(J, \frac{1}{2}\right), \sinh \ell\right), U\right) \]
            10. sinh-lowering-sinh.f6486.6%

              \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(J, \frac{1}{2}\right), \mathsf{sinh.f64}\left(\ell\right)\right), U\right) \]
          3. Applied egg-rr86.6%

            \[\leadsto \color{blue}{\frac{J}{0.5} \cdot \sinh \ell} + U \]

          if 3.2000000000000001e-7 < (/.f64 K #s(literal 2 binary64))

          1. Initial program 84.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 + {\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. *-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), \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. 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), \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) \]
            9. *-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(\mathsf{*.f64}\left(\ell, \ell\right), \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) \]
            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(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{60}, \left(\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) \]
            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(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{60}, \left({\ell}^{2} \cdot \frac{1}{2520}\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right), U\right) \]
            12. 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(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{60}, \left(\left(\ell \cdot \ell\right) \cdot \frac{1}{2520}\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right), U\right) \]
            13. 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}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{60}, \left(\ell \cdot \left(\ell \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) \]
            14. *-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(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{60}, \mathsf{*.f64}\left(\ell, \left(\ell \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-*.f6496.9%

              \[\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), \mathsf{+.f64}\left(\frac{1}{60}, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \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. Simplified96.9%

            \[\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 \left(0.016666666666666666 + \ell \cdot \left(\ell \cdot 0.0003968253968253968\right)\right)\right)\right)\right)}\right) \cdot \cos \left(\frac{K}{2}\right) + U \]
        7. Recombined 2 regimes into one program.
        8. Final simplification89.2%

          \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{K}{2} \leq 3.2 \cdot 10^{-7}:\\ \;\;\;\;U + \sinh \ell \cdot \frac{J}{0.5}\\ \mathbf{else}:\\ \;\;\;\;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 \left(0.016666666666666666 + \ell \cdot \left(\ell \cdot 0.0003968253968253968\right)\right)\right)\right)\right)\right)\\ \end{array} \]
        9. Add Preprocessing

        Alternative 5: 88.4% accurate, 2.4× speedup?

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

          1. Initial program 89.4%

            \[\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 \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) \]
            2. *-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) \]
            3. *-lowering-*.f64N/A

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \left(\color{blue}{1} \cdot \left(2 \cdot \sinh \ell\right)\right) \cdot J + U \]
            2. Step-by-step derivation
              1. *-lft-identityN/A

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

                \[\leadsto \mathsf{+.f64}\left(\left(J \cdot \left(2 \cdot \sinh \ell\right)\right), U\right) \]
              3. /-rgt-identityN/A

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

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

                \[\leadsto \mathsf{+.f64}\left(\left(\frac{J}{\frac{\frac{1}{2}}{\sinh \ell}}\right), U\right) \]
              6. associate-/r/N/A

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

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

                \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(J, \left(\frac{1}{2}\right)\right), \sinh \ell\right), U\right) \]
              9. metadata-evalN/A

                \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(J, \frac{1}{2}\right), \sinh \ell\right), U\right) \]
              10. sinh-lowering-sinh.f6486.6%

                \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(J, \frac{1}{2}\right), \mathsf{sinh.f64}\left(\ell\right)\right), U\right) \]
            3. Applied egg-rr86.6%

              \[\leadsto \color{blue}{\frac{J}{0.5} \cdot \sinh \ell} + U \]

            if 3.2000000000000001e-7 < (/.f64 K #s(literal 2 binary64))

            1. Initial program 84.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 + {\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. unpow2N/A

                \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \left(\left(\ell \cdot \ell\right) \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) \]
              4. associate-*l*N/A

                \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \left(\ell \cdot \left(\ell \cdot \left(\frac{1}{3} + \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) \]
              5. *-commutativeN/A

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

                \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\ell, \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)\right)\right), \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right), U\right) \]
              11. *-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(\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)\right)\right), \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right), U\right) \]
              12. unpow2N/A

                \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\ell, \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), \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right), U\right) \]
              13. *-lowering-*.f6496.8%

                \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\ell, \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), \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right), U\right) \]
            5. Simplified96.8%

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

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

          Alternative 6: 87.1% accurate, 2.5× speedup?

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

            1. Initial program 89.4%

              \[\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 \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) \]
              2. *-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) \]
              3. *-lowering-*.f64N/A

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \left(\color{blue}{1} \cdot \left(2 \cdot \sinh \ell\right)\right) \cdot J + U \]
              2. Step-by-step derivation
                1. *-lft-identityN/A

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

                  \[\leadsto \mathsf{+.f64}\left(\left(J \cdot \left(2 \cdot \sinh \ell\right)\right), U\right) \]
                3. /-rgt-identityN/A

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

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

                  \[\leadsto \mathsf{+.f64}\left(\left(\frac{J}{\frac{\frac{1}{2}}{\sinh \ell}}\right), U\right) \]
                6. associate-/r/N/A

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

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

                  \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(J, \left(\frac{1}{2}\right)\right), \sinh \ell\right), U\right) \]
                9. metadata-evalN/A

                  \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(J, \frac{1}{2}\right), \sinh \ell\right), U\right) \]
                10. sinh-lowering-sinh.f6486.6%

                  \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(J, \frac{1}{2}\right), \mathsf{sinh.f64}\left(\ell\right)\right), U\right) \]
              3. Applied egg-rr86.6%

                \[\leadsto \color{blue}{\frac{J}{0.5} \cdot \sinh \ell} + U \]

              if 3.2000000000000001e-7 < (/.f64 K #s(literal 2 binary64))

              1. Initial program 84.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-*.f6489.3%

                  \[\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. Simplified89.3%

                \[\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 \]
            7. Recombined 2 regimes into one program.
            8. Final simplification87.3%

              \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{K}{2} \leq 3.2 \cdot 10^{-7}:\\ \;\;\;\;U + \sinh \ell \cdot \frac{J}{0.5}\\ \mathbf{else}:\\ \;\;\;\;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)\\ \end{array} \]
            9. Add Preprocessing

            Alternative 7: 86.1% accurate, 2.6× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;\ell \leq -0.00083:\\ \;\;\;\;U + \sinh \ell \cdot \frac{J}{0.5}\\ \mathbf{elif}\;\ell \leq 7.5 \cdot 10^{-6}:\\ \;\;\;\;U + \ell \cdot \left(\cos \left(K \cdot 0.5\right) \cdot \left(2 \cdot J\right)\right)\\ \mathbf{else}:\\ \;\;\;\;U + \left(J \cdot \left(\ell \cdot \left(2 + \left(\ell \cdot \ell\right) \cdot \left(0.3333333333333333 + \left(\ell \cdot \ell\right) \cdot \left(0.016666666666666666 + \ell \cdot \left(\ell \cdot 0.0003968253968253968\right)\right)\right)\right)\right)\right) \cdot \left(-0.125 \cdot \left(K \cdot K\right) + 1\right)\\ \end{array} \end{array} \]
            (FPCore (J l K U)
             :precision binary64
             (if (<= l -0.00083)
               (+ U (* (sinh l) (/ J 0.5)))
               (if (<= l 7.5e-6)
                 (+ U (* l (* (cos (* K 0.5)) (* 2.0 J))))
                 (+
                  U
                  (*
                   (*
                    J
                    (*
                     l
                     (+
                      2.0
                      (*
                       (* l l)
                       (+
                        0.3333333333333333
                        (*
                         (* l l)
                         (+ 0.016666666666666666 (* l (* l 0.0003968253968253968)))))))))
                   (+ (* -0.125 (* K K)) 1.0))))))
            double code(double J, double l, double K, double U) {
            	double tmp;
            	if (l <= -0.00083) {
            		tmp = U + (sinh(l) * (J / 0.5));
            	} else if (l <= 7.5e-6) {
            		tmp = U + (l * (cos((K * 0.5)) * (2.0 * J)));
            	} else {
            		tmp = U + ((J * (l * (2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * (0.016666666666666666 + (l * (l * 0.0003968253968253968))))))))) * ((-0.125 * (K * K)) + 1.0));
            	}
            	return tmp;
            }
            
            real(8) function code(j, l, k, u)
                real(8), intent (in) :: j
                real(8), intent (in) :: l
                real(8), intent (in) :: k
                real(8), intent (in) :: u
                real(8) :: tmp
                if (l <= (-0.00083d0)) then
                    tmp = u + (sinh(l) * (j / 0.5d0))
                else if (l <= 7.5d-6) then
                    tmp = u + (l * (cos((k * 0.5d0)) * (2.0d0 * j)))
                else
                    tmp = u + ((j * (l * (2.0d0 + ((l * l) * (0.3333333333333333d0 + ((l * l) * (0.016666666666666666d0 + (l * (l * 0.0003968253968253968d0))))))))) * (((-0.125d0) * (k * k)) + 1.0d0))
                end if
                code = tmp
            end function
            
            public static double code(double J, double l, double K, double U) {
            	double tmp;
            	if (l <= -0.00083) {
            		tmp = U + (Math.sinh(l) * (J / 0.5));
            	} else if (l <= 7.5e-6) {
            		tmp = U + (l * (Math.cos((K * 0.5)) * (2.0 * J)));
            	} else {
            		tmp = U + ((J * (l * (2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * (0.016666666666666666 + (l * (l * 0.0003968253968253968))))))))) * ((-0.125 * (K * K)) + 1.0));
            	}
            	return tmp;
            }
            
            def code(J, l, K, U):
            	tmp = 0
            	if l <= -0.00083:
            		tmp = U + (math.sinh(l) * (J / 0.5))
            	elif l <= 7.5e-6:
            		tmp = U + (l * (math.cos((K * 0.5)) * (2.0 * J)))
            	else:
            		tmp = U + ((J * (l * (2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * (0.016666666666666666 + (l * (l * 0.0003968253968253968))))))))) * ((-0.125 * (K * K)) + 1.0))
            	return tmp
            
            function code(J, l, K, U)
            	tmp = 0.0
            	if (l <= -0.00083)
            		tmp = Float64(U + Float64(sinh(l) * Float64(J / 0.5)));
            	elseif (l <= 7.5e-6)
            		tmp = Float64(U + Float64(l * Float64(cos(Float64(K * 0.5)) * Float64(2.0 * J))));
            	else
            		tmp = Float64(U + Float64(Float64(J * Float64(l * Float64(2.0 + Float64(Float64(l * l) * Float64(0.3333333333333333 + Float64(Float64(l * l) * Float64(0.016666666666666666 + Float64(l * Float64(l * 0.0003968253968253968))))))))) * Float64(Float64(-0.125 * Float64(K * K)) + 1.0)));
            	end
            	return tmp
            end
            
            function tmp_2 = code(J, l, K, U)
            	tmp = 0.0;
            	if (l <= -0.00083)
            		tmp = U + (sinh(l) * (J / 0.5));
            	elseif (l <= 7.5e-6)
            		tmp = U + (l * (cos((K * 0.5)) * (2.0 * J)));
            	else
            		tmp = U + ((J * (l * (2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * (0.016666666666666666 + (l * (l * 0.0003968253968253968))))))))) * ((-0.125 * (K * K)) + 1.0));
            	end
            	tmp_2 = tmp;
            end
            
            code[J_, l_, K_, U_] := If[LessEqual[l, -0.00083], N[(U + N[(N[Sinh[l], $MachinePrecision] * N[(J / 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[l, 7.5e-6], N[(U + N[(l * N[(N[Cos[N[(K * 0.5), $MachinePrecision]], $MachinePrecision] * N[(2.0 * J), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(U + N[(N[(J * N[(l * N[(2.0 + N[(N[(l * l), $MachinePrecision] * N[(0.3333333333333333 + N[(N[(l * l), $MachinePrecision] * N[(0.016666666666666666 + N[(l * N[(l * 0.0003968253968253968), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(-0.125 * N[(K * K), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
            
            \begin{array}{l}
            
            \\
            \begin{array}{l}
            \mathbf{if}\;\ell \leq -0.00083:\\
            \;\;\;\;U + \sinh \ell \cdot \frac{J}{0.5}\\
            
            \mathbf{elif}\;\ell \leq 7.5 \cdot 10^{-6}:\\
            \;\;\;\;U + \ell \cdot \left(\cos \left(K \cdot 0.5\right) \cdot \left(2 \cdot J\right)\right)\\
            
            \mathbf{else}:\\
            \;\;\;\;U + \left(J \cdot \left(\ell \cdot \left(2 + \left(\ell \cdot \ell\right) \cdot \left(0.3333333333333333 + \left(\ell \cdot \ell\right) \cdot \left(0.016666666666666666 + \ell \cdot \left(\ell \cdot 0.0003968253968253968\right)\right)\right)\right)\right)\right) \cdot \left(-0.125 \cdot \left(K \cdot K\right) + 1\right)\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 3 regimes
            2. if l < -8.3000000000000001e-4

              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. Step-by-step derivation
                1. 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) \]
                2. *-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) \]
                3. *-lowering-*.f64N/A

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto \left(\color{blue}{1} \cdot \left(2 \cdot \sinh \ell\right)\right) \cdot J + U \]
                2. Step-by-step derivation
                  1. *-lft-identityN/A

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

                    \[\leadsto \mathsf{+.f64}\left(\left(J \cdot \left(2 \cdot \sinh \ell\right)\right), U\right) \]
                  3. /-rgt-identityN/A

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

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

                    \[\leadsto \mathsf{+.f64}\left(\left(\frac{J}{\frac{\frac{1}{2}}{\sinh \ell}}\right), U\right) \]
                  6. associate-/r/N/A

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

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

                    \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(J, \left(\frac{1}{2}\right)\right), \sinh \ell\right), U\right) \]
                  9. metadata-evalN/A

                    \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(J, \frac{1}{2}\right), \sinh \ell\right), U\right) \]
                  10. sinh-lowering-sinh.f6477.2%

                    \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(J, \frac{1}{2}\right), \mathsf{sinh.f64}\left(\ell\right)\right), U\right) \]
                3. Applied egg-rr77.2%

                  \[\leadsto \color{blue}{\frac{J}{0.5} \cdot \sinh \ell} + U \]

                if -8.3000000000000001e-4 < l < 7.50000000000000019e-6

                1. Initial program 77.8%

                  \[\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. fma-undefineN/A

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

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

                    \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\ell, \left(\left(\frac{1}{3} \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) \cdot {\ell}^{2} + 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 l around 0

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

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

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

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

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

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

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

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

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

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

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

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

                if 7.50000000000000019e-6 < l

                1. Initial program 99.7%

                  \[\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. *-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), \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. 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), \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) \]
                  9. *-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(\mathsf{*.f64}\left(\ell, \ell\right), \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) \]
                  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(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{60}, \left(\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) \]
                  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(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{60}, \left({\ell}^{2} \cdot \frac{1}{2520}\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right), U\right) \]
                  12. 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(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{60}, \left(\left(\ell \cdot \ell\right) \cdot \frac{1}{2520}\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right), U\right) \]
                  13. 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}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{60}, \left(\ell \cdot \left(\ell \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) \]
                  14. *-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(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{60}, \mathsf{*.f64}\left(\ell, \left(\ell \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-*.f6493.8%

                    \[\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), \mathsf{+.f64}\left(\frac{1}{60}, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \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. Simplified93.8%

                  \[\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 \left(0.016666666666666666 + \ell \cdot \left(\ell \cdot 0.0003968253968253968\right)\right)\right)\right)\right)}\right) \cdot \cos \left(\frac{K}{2}\right) + U \]
                6. Taylor expanded in K around 0

                  \[\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), \mathsf{+.f64}\left(\frac{1}{60}, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \frac{1}{2520}\right)\right)\right)\right)\right)\right)\right)\right)\right), \color{blue}{\left(1 + \frac{-1}{8} \cdot {K}^{2}\right)}\right), U\right) \]
                7. Step-by-step derivation
                  1. +-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(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{60}, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \frac{1}{2520}\right)\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{+.f64}\left(1, \left(\frac{-1}{8} \cdot {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, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{60}, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \frac{1}{2520}\right)\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{8}, \left({K}^{2}\right)\right)\right)\right), U\right) \]
                  3. 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(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{60}, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \frac{1}{2520}\right)\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{8}, \left(K \cdot K\right)\right)\right)\right), U\right) \]
                  4. *-lowering-*.f6476.6%

                    \[\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), \mathsf{+.f64}\left(\frac{1}{60}, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \frac{1}{2520}\right)\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{*.f64}\left(K, K\right)\right)\right)\right), U\right) \]
                8. Simplified76.6%

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

                \[\leadsto \begin{array}{l} \mathbf{if}\;\ell \leq -0.00083:\\ \;\;\;\;U + \sinh \ell \cdot \frac{J}{0.5}\\ \mathbf{elif}\;\ell \leq 7.5 \cdot 10^{-6}:\\ \;\;\;\;U + \ell \cdot \left(\cos \left(K \cdot 0.5\right) \cdot \left(2 \cdot J\right)\right)\\ \mathbf{else}:\\ \;\;\;\;U + \left(J \cdot \left(\ell \cdot \left(2 + \left(\ell \cdot \ell\right) \cdot \left(0.3333333333333333 + \left(\ell \cdot \ell\right) \cdot \left(0.016666666666666666 + \ell \cdot \left(\ell \cdot 0.0003968253968253968\right)\right)\right)\right)\right)\right) \cdot \left(-0.125 \cdot \left(K \cdot K\right) + 1\right)\\ \end{array} \]
              9. Add Preprocessing

              Alternative 8: 81.5% accurate, 2.8× speedup?

              \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;\ell \leq 2.5 \cdot 10^{+148}:\\ \;\;\;\;U + \sinh \ell \cdot \frac{J}{0.5}\\ \mathbf{else}:\\ \;\;\;\;\left(J \cdot 0.3333333333333333\right) \cdot \left(\left(-0.125 \cdot \left(K \cdot K\right) + 1\right) \cdot \left(\ell \cdot \left(\ell \cdot \ell\right)\right)\right)\\ \end{array} \end{array} \]
              (FPCore (J l K U)
               :precision binary64
               (if (<= l 2.5e+148)
                 (+ U (* (sinh l) (/ J 0.5)))
                 (* (* J 0.3333333333333333) (* (+ (* -0.125 (* K K)) 1.0) (* l (* l l))))))
              double code(double J, double l, double K, double U) {
              	double tmp;
              	if (l <= 2.5e+148) {
              		tmp = U + (sinh(l) * (J / 0.5));
              	} else {
              		tmp = (J * 0.3333333333333333) * (((-0.125 * (K * K)) + 1.0) * (l * (l * l)));
              	}
              	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.5d+148) then
                      tmp = u + (sinh(l) * (j / 0.5d0))
                  else
                      tmp = (j * 0.3333333333333333d0) * ((((-0.125d0) * (k * k)) + 1.0d0) * (l * (l * l)))
                  end if
                  code = tmp
              end function
              
              public static double code(double J, double l, double K, double U) {
              	double tmp;
              	if (l <= 2.5e+148) {
              		tmp = U + (Math.sinh(l) * (J / 0.5));
              	} else {
              		tmp = (J * 0.3333333333333333) * (((-0.125 * (K * K)) + 1.0) * (l * (l * l)));
              	}
              	return tmp;
              }
              
              def code(J, l, K, U):
              	tmp = 0
              	if l <= 2.5e+148:
              		tmp = U + (math.sinh(l) * (J / 0.5))
              	else:
              		tmp = (J * 0.3333333333333333) * (((-0.125 * (K * K)) + 1.0) * (l * (l * l)))
              	return tmp
              
              function code(J, l, K, U)
              	tmp = 0.0
              	if (l <= 2.5e+148)
              		tmp = Float64(U + Float64(sinh(l) * Float64(J / 0.5)));
              	else
              		tmp = Float64(Float64(J * 0.3333333333333333) * Float64(Float64(Float64(-0.125 * Float64(K * K)) + 1.0) * Float64(l * Float64(l * l))));
              	end
              	return tmp
              end
              
              function tmp_2 = code(J, l, K, U)
              	tmp = 0.0;
              	if (l <= 2.5e+148)
              		tmp = U + (sinh(l) * (J / 0.5));
              	else
              		tmp = (J * 0.3333333333333333) * (((-0.125 * (K * K)) + 1.0) * (l * (l * l)));
              	end
              	tmp_2 = tmp;
              end
              
              code[J_, l_, K_, U_] := If[LessEqual[l, 2.5e+148], N[(U + N[(N[Sinh[l], $MachinePrecision] * N[(J / 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(J * 0.3333333333333333), $MachinePrecision] * N[(N[(N[(-0.125 * N[(K * K), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision] * N[(l * N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
              
              \begin{array}{l}
              
              \\
              \begin{array}{l}
              \mathbf{if}\;\ell \leq 2.5 \cdot 10^{+148}:\\
              \;\;\;\;U + \sinh \ell \cdot \frac{J}{0.5}\\
              
              \mathbf{else}:\\
              \;\;\;\;\left(J \cdot 0.3333333333333333\right) \cdot \left(\left(-0.125 \cdot \left(K \cdot K\right) + 1\right) \cdot \left(\ell \cdot \left(\ell \cdot \ell\right)\right)\right)\\
              
              
              \end{array}
              \end{array}
              
              Derivation
              1. Split input into 2 regimes
              2. if l < 2.50000000000000012e148

                1. Initial program 86.4%

                  \[\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 \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) \]
                  2. *-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) \]
                  3. *-lowering-*.f64N/A

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

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

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

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

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

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

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

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

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

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

                    \[\leadsto \left(\color{blue}{1} \cdot \left(2 \cdot \sinh \ell\right)\right) \cdot J + U \]
                  2. Step-by-step derivation
                    1. *-lft-identityN/A

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

                      \[\leadsto \mathsf{+.f64}\left(\left(J \cdot \left(2 \cdot \sinh \ell\right)\right), U\right) \]
                    3. /-rgt-identityN/A

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

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

                      \[\leadsto \mathsf{+.f64}\left(\left(\frac{J}{\frac{\frac{1}{2}}{\sinh \ell}}\right), U\right) \]
                    6. associate-/r/N/A

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

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

                      \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(J, \left(\frac{1}{2}\right)\right), \sinh \ell\right), U\right) \]
                    9. metadata-evalN/A

                      \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(J, \frac{1}{2}\right), \sinh \ell\right), U\right) \]
                    10. sinh-lowering-sinh.f6482.6%

                      \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(J, \frac{1}{2}\right), \mathsf{sinh.f64}\left(\ell\right)\right), U\right) \]
                  3. Applied egg-rr82.6%

                    \[\leadsto \color{blue}{\frac{J}{0.5} \cdot \sinh \ell} + U \]

                  if 2.50000000000000012e148 < 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. fma-undefineN/A

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

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

                      \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\ell, \left(\left(\frac{1}{3} \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) \cdot {\ell}^{2} + 2 \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right)\right), U\right) \]
                  5. Simplified97.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, \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-*.f6488.2%

                      \[\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. Simplified88.2%

                    \[\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 \]
                  9. Taylor expanded in l around inf

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

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

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

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(J, \frac{1}{3}\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \ell\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{8}, \left(K \cdot \color{blue}{K}\right)\right)\right)\right)\right) \]
                    14. *-lowering-*.f6488.2%

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

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

                  \[\leadsto \begin{array}{l} \mathbf{if}\;\ell \leq 2.5 \cdot 10^{+148}:\\ \;\;\;\;U + \sinh \ell \cdot \frac{J}{0.5}\\ \mathbf{else}:\\ \;\;\;\;\left(J \cdot 0.3333333333333333\right) \cdot \left(\left(-0.125 \cdot \left(K \cdot K\right) + 1\right) \cdot \left(\ell \cdot \left(\ell \cdot \ell\right)\right)\right)\\ \end{array} \]
                9. Add Preprocessing

                Alternative 9: 72.7% accurate, 8.2× speedup?

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

                  1. Initial program 88.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(\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. *-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), \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. 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), \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) \]
                    9. *-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(\mathsf{*.f64}\left(\ell, \ell\right), \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) \]
                    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(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{60}, \left(\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) \]
                    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(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{60}, \left({\ell}^{2} \cdot \frac{1}{2520}\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right), U\right) \]
                    12. 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(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{60}, \left(\left(\ell \cdot \ell\right) \cdot \frac{1}{2520}\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right), U\right) \]
                    13. 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}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{60}, \left(\ell \cdot \left(\ell \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) \]
                    14. *-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(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{60}, \mathsf{*.f64}\left(\ell, \left(\ell \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-*.f6496.6%

                      \[\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), \mathsf{+.f64}\left(\frac{1}{60}, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \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. Simplified96.6%

                    \[\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 \left(0.016666666666666666 + \ell \cdot \left(\ell \cdot 0.0003968253968253968\right)\right)\right)\right)\right)}\right) \cdot \cos \left(\frac{K}{2}\right) + U \]
                  6. Taylor expanded in K around 0

                    \[\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), \mathsf{+.f64}\left(\frac{1}{60}, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \frac{1}{2520}\right)\right)\right)\right)\right)\right)\right)\right)\right), \color{blue}{\left(1 + \frac{-1}{8} \cdot {K}^{2}\right)}\right), U\right) \]
                  7. Step-by-step derivation
                    1. +-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(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{60}, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \frac{1}{2520}\right)\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{+.f64}\left(1, \left(\frac{-1}{8} \cdot {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, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{60}, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \frac{1}{2520}\right)\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{8}, \left({K}^{2}\right)\right)\right)\right), U\right) \]
                    3. 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(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{60}, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \frac{1}{2520}\right)\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{8}, \left(K \cdot K\right)\right)\right)\right), U\right) \]
                    4. *-lowering-*.f6472.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), \mathsf{+.f64}\left(\frac{1}{60}, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \frac{1}{2520}\right)\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{*.f64}\left(K, K\right)\right)\right)\right), U\right) \]
                  8. Simplified72.5%

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

                  if 3.59999999999999996e49 < K

                  1. Initial program 85.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. *-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), \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. 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), \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) \]
                    9. *-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(\mathsf{*.f64}\left(\ell, \ell\right), \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) \]
                    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(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{60}, \left(\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) \]
                    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(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{60}, \left({\ell}^{2} \cdot \frac{1}{2520}\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right), U\right) \]
                    12. 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(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{60}, \left(\left(\ell \cdot \ell\right) \cdot \frac{1}{2520}\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right), U\right) \]
                    13. 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}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{60}, \left(\ell \cdot \left(\ell \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) \]
                    14. *-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(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{60}, \mathsf{*.f64}\left(\ell, \left(\ell \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-*.f6495.9%

                      \[\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), \mathsf{+.f64}\left(\frac{1}{60}, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \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.9%

                    \[\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 \left(0.016666666666666666 + \ell \cdot \left(\ell \cdot 0.0003968253968253968\right)\right)\right)\right)\right)}\right) \cdot \cos \left(\frac{K}{2}\right) + U \]
                  6. 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) \]
                  7. Step-by-step derivation
                    1. *-lowering-*.f64N/A

                      \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(J, \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) \]
                    2. *-lowering-*.f64N/A

                      \[\leadsto \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), U\right) \]
                    3. +-lowering-+.f64N/A

                      \[\leadsto \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), U\right) \]
                    4. *-lowering-*.f64N/A

                      \[\leadsto \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), U\right) \]
                    5. unpow2N/A

                      \[\leadsto \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), U\right) \]
                    6. *-lowering-*.f64N/A

                      \[\leadsto \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), U\right) \]
                    7. +-lowering-+.f64N/A

                      \[\leadsto \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), U\right) \]
                    8. unpow2N/A

                      \[\leadsto \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), U\right) \]
                    9. associate-*l*N/A

                      \[\leadsto \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), U\right) \]
                    10. *-lowering-*.f64N/A

                      \[\leadsto \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), U\right) \]
                    11. *-lowering-*.f64N/A

                      \[\leadsto \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), U\right) \]
                    12. +-lowering-+.f64N/A

                      \[\leadsto \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), U\right) \]
                    13. *-commutativeN/A

                      \[\leadsto \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), U\right) \]
                    14. *-lowering-*.f64N/A

                      \[\leadsto \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), U\right) \]
                    15. unpow2N/A

                      \[\leadsto \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), U\right) \]
                    16. *-lowering-*.f6465.5%

                      \[\leadsto \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), U\right) \]
                  8. Simplified65.5%

                    \[\leadsto \color{blue}{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)} + U \]
                3. Recombined 2 regimes into one program.
                4. Final simplification71.2%

                  \[\leadsto \begin{array}{l} \mathbf{if}\;K \leq 3.6 \cdot 10^{+49}:\\ \;\;\;\;U + \left(J \cdot \left(\ell \cdot \left(2 + \left(\ell \cdot \ell\right) \cdot \left(0.3333333333333333 + \left(\ell \cdot \ell\right) \cdot \left(0.016666666666666666 + \ell \cdot \left(\ell \cdot 0.0003968253968253968\right)\right)\right)\right)\right)\right) \cdot \left(-0.125 \cdot \left(K \cdot K\right) + 1\right)\\ \mathbf{else}:\\ \;\;\;\;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)\\ \end{array} \]
                5. Add Preprocessing

                Alternative 10: 77.8% accurate, 10.4× speedup?

                \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;\ell \leq 1.05 \cdot 10^{+60}:\\ \;\;\;\;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(\ell \cdot \left(-0.125 \cdot \left(K \cdot K\right) + 1\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)\\ \end{array} \end{array} \]
                (FPCore (J l K U)
                 :precision binary64
                 (if (<= l 1.05e+60)
                   (+
                    U
                    (*
                     J
                     (*
                      l
                      (+
                       2.0
                       (*
                        (* l l)
                        (+
                         0.3333333333333333
                         (*
                          l
                          (*
                           l
                           (+ 0.016666666666666666 (* (* l l) 0.0003968253968253968))))))))))
                   (*
                    J
                    (*
                     (* l (+ (* -0.125 (* K K)) 1.0))
                     (+
                      2.0
                      (* (* l l) (+ 0.3333333333333333 (* (* l l) 0.016666666666666666))))))))
                double code(double J, double l, double K, double U) {
                	double tmp;
                	if (l <= 1.05e+60) {
                		tmp = U + (J * (l * (2.0 + ((l * l) * (0.3333333333333333 + (l * (l * (0.016666666666666666 + ((l * l) * 0.0003968253968253968)))))))));
                	} else {
                		tmp = J * ((l * ((-0.125 * (K * K)) + 1.0)) * (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 <= 1.05d+60) then
                        tmp = u + (j * (l * (2.0d0 + ((l * l) * (0.3333333333333333d0 + (l * (l * (0.016666666666666666d0 + ((l * l) * 0.0003968253968253968d0)))))))))
                    else
                        tmp = j * ((l * (((-0.125d0) * (k * k)) + 1.0d0)) * (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 <= 1.05e+60) {
                		tmp = U + (J * (l * (2.0 + ((l * l) * (0.3333333333333333 + (l * (l * (0.016666666666666666 + ((l * l) * 0.0003968253968253968)))))))));
                	} else {
                		tmp = J * ((l * ((-0.125 * (K * K)) + 1.0)) * (2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * 0.016666666666666666)))));
                	}
                	return tmp;
                }
                
                def code(J, l, K, U):
                	tmp = 0
                	if l <= 1.05e+60:
                		tmp = U + (J * (l * (2.0 + ((l * l) * (0.3333333333333333 + (l * (l * (0.016666666666666666 + ((l * l) * 0.0003968253968253968)))))))))
                	else:
                		tmp = J * ((l * ((-0.125 * (K * K)) + 1.0)) * (2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * 0.016666666666666666)))))
                	return tmp
                
                function code(J, l, K, U)
                	tmp = 0.0
                	if (l <= 1.05e+60)
                		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(l * Float64(Float64(-0.125 * Float64(K * K)) + 1.0)) * 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 <= 1.05e+60)
                		tmp = U + (J * (l * (2.0 + ((l * l) * (0.3333333333333333 + (l * (l * (0.016666666666666666 + ((l * l) * 0.0003968253968253968)))))))));
                	else
                		tmp = J * ((l * ((-0.125 * (K * K)) + 1.0)) * (2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * 0.016666666666666666)))));
                	end
                	tmp_2 = tmp;
                end
                
                code[J_, l_, K_, U_] := If[LessEqual[l, 1.05e+60], 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[(l * N[(N[(-0.125 * N[(K * K), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] * N[(2.0 + N[(N[(l * l), $MachinePrecision] * N[(0.3333333333333333 + N[(N[(l * l), $MachinePrecision] * 0.016666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
                
                \begin{array}{l}
                
                \\
                \begin{array}{l}
                \mathbf{if}\;\ell \leq 1.05 \cdot 10^{+60}:\\
                \;\;\;\;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(\ell \cdot \left(-0.125 \cdot \left(K \cdot K\right) + 1\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)\\
                
                
                \end{array}
                \end{array}
                
                Derivation
                1. Split input into 2 regimes
                2. if l < 1.0500000000000001e60

                  1. Initial program 84.8%

                    \[\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. *-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), \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. 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), \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) \]
                    9. *-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(\mathsf{*.f64}\left(\ell, \ell\right), \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) \]
                    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(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{60}, \left(\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) \]
                    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(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{60}, \left({\ell}^{2} \cdot \frac{1}{2520}\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right), U\right) \]
                    12. 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(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{60}, \left(\left(\ell \cdot \ell\right) \cdot \frac{1}{2520}\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right), U\right) \]
                    13. 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}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{60}, \left(\ell \cdot \left(\ell \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) \]
                    14. *-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(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{60}, \mathsf{*.f64}\left(\ell, \left(\ell \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-*.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(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{+.f64}\left(\frac{1}{60}, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \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 + \left(\ell \cdot \ell\right) \cdot \left(0.016666666666666666 + \ell \cdot \left(\ell \cdot 0.0003968253968253968\right)\right)\right)\right)\right)}\right) \cdot \cos \left(\frac{K}{2}\right) + U \]
                  6. 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) \]
                  7. Step-by-step derivation
                    1. *-lowering-*.f64N/A

                      \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(J, \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) \]
                    2. *-lowering-*.f64N/A

                      \[\leadsto \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), U\right) \]
                    3. +-lowering-+.f64N/A

                      \[\leadsto \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), U\right) \]
                    4. *-lowering-*.f64N/A

                      \[\leadsto \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), U\right) \]
                    5. unpow2N/A

                      \[\leadsto \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), U\right) \]
                    6. *-lowering-*.f64N/A

                      \[\leadsto \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), U\right) \]
                    7. +-lowering-+.f64N/A

                      \[\leadsto \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), U\right) \]
                    8. unpow2N/A

                      \[\leadsto \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), U\right) \]
                    9. associate-*l*N/A

                      \[\leadsto \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), U\right) \]
                    10. *-lowering-*.f64N/A

                      \[\leadsto \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), U\right) \]
                    11. *-lowering-*.f64N/A

                      \[\leadsto \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), U\right) \]
                    12. +-lowering-+.f64N/A

                      \[\leadsto \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), U\right) \]
                    13. *-commutativeN/A

                      \[\leadsto \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), U\right) \]
                    14. *-lowering-*.f64N/A

                      \[\leadsto \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), U\right) \]
                    15. unpow2N/A

                      \[\leadsto \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), U\right) \]
                    16. *-lowering-*.f6480.2%

                      \[\leadsto \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), U\right) \]
                  8. Simplified80.2%

                    \[\leadsto \color{blue}{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)} + U \]

                  if 1.0500000000000001e60 < 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(\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. unpow2N/A

                      \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \left(\left(\ell \cdot \ell\right) \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) \]
                    4. associate-*l*N/A

                      \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \left(\ell \cdot \left(\ell \cdot \left(\frac{1}{3} + \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) \]
                    5. *-commutativeN/A

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

                      \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\ell, \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)\right)\right), \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right), U\right) \]
                    11. *-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(\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)\right)\right), \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right), U\right) \]
                    12. unpow2N/A

                      \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\ell, \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), \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right), U\right) \]
                    13. *-lowering-*.f6498.4%

                      \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\ell, \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), \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right), U\right) \]
                  5. Simplified98.4%

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

                    \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\ell, \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), \color{blue}{\left(1 + \frac{-1}{8} \cdot {K}^{2}\right)}\right), U\right) \]
                  7. Step-by-step derivation
                    1. +-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(\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), \mathsf{+.f64}\left(1, \left(\frac{-1}{8} \cdot {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, \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), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{8}, \left({K}^{2}\right)\right)\right)\right), U\right) \]
                    3. unpow2N/A

                      \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\ell, \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), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{8}, \left(K \cdot K\right)\right)\right)\right), U\right) \]
                    4. *-lowering-*.f6479.1%

                      \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\ell, \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), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{*.f64}\left(K, K\right)\right)\right)\right), U\right) \]
                  8. Simplified79.1%

                    \[\leadsto \left(J \cdot \left(\ell \cdot \left(2 + \ell \cdot \left(\ell \cdot \left(0.3333333333333333 + \left(\ell \cdot \ell\right) \cdot 0.016666666666666666\right)\right)\right)\right)\right) \cdot \color{blue}{\left(1 + -0.125 \cdot \left(K \cdot K\right)\right)} + U \]
                  9. 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)} \]
                  10. 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-*.f6480.7%

                      \[\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) \]
                  11. Simplified80.7%

                    \[\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 simplification80.3%

                  \[\leadsto \begin{array}{l} \mathbf{if}\;\ell \leq 1.05 \cdot 10^{+60}:\\ \;\;\;\;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(\ell \cdot \left(-0.125 \cdot \left(K \cdot K\right) + 1\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)\\ \end{array} \]
                5. Add Preprocessing

                Alternative 11: 76.2% accurate, 10.4× speedup?

                \[\begin{array}{l} \\ \begin{array}{l} t_0 := 0.3333333333333333 + \left(\ell \cdot \ell\right) \cdot 0.016666666666666666\\ \mathbf{if}\;\ell \leq 3.2 \cdot 10^{-7}:\\ \;\;\;\;U + \left(2 + \ell \cdot \left(\ell \cdot t\_0\right)\right) \cdot \left(\ell \cdot J\right)\\ \mathbf{else}:\\ \;\;\;\;J \cdot \left(\left(\ell \cdot \left(-0.125 \cdot \left(K \cdot K\right) + 1\right)\right) \cdot \left(2 + \left(\ell \cdot \ell\right) \cdot t\_0\right)\right)\\ \end{array} \end{array} \]
                (FPCore (J l K U)
                 :precision binary64
                 (let* ((t_0 (+ 0.3333333333333333 (* (* l l) 0.016666666666666666))))
                   (if (<= l 3.2e-7)
                     (+ U (* (+ 2.0 (* l (* l t_0))) (* l J)))
                     (* J (* (* l (+ (* -0.125 (* K K)) 1.0)) (+ 2.0 (* (* l l) t_0)))))))
                double code(double J, double l, double K, double U) {
                	double t_0 = 0.3333333333333333 + ((l * l) * 0.016666666666666666);
                	double tmp;
                	if (l <= 3.2e-7) {
                		tmp = U + ((2.0 + (l * (l * t_0))) * (l * J));
                	} else {
                		tmp = J * ((l * ((-0.125 * (K * K)) + 1.0)) * (2.0 + ((l * l) * 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 + ((l * l) * 0.016666666666666666d0)
                    if (l <= 3.2d-7) then
                        tmp = u + ((2.0d0 + (l * (l * t_0))) * (l * j))
                    else
                        tmp = j * ((l * (((-0.125d0) * (k * k)) + 1.0d0)) * (2.0d0 + ((l * l) * 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 + ((l * l) * 0.016666666666666666);
                	double tmp;
                	if (l <= 3.2e-7) {
                		tmp = U + ((2.0 + (l * (l * t_0))) * (l * J));
                	} else {
                		tmp = J * ((l * ((-0.125 * (K * K)) + 1.0)) * (2.0 + ((l * l) * t_0)));
                	}
                	return tmp;
                }
                
                def code(J, l, K, U):
                	t_0 = 0.3333333333333333 + ((l * l) * 0.016666666666666666)
                	tmp = 0
                	if l <= 3.2e-7:
                		tmp = U + ((2.0 + (l * (l * t_0))) * (l * J))
                	else:
                		tmp = J * ((l * ((-0.125 * (K * K)) + 1.0)) * (2.0 + ((l * l) * t_0)))
                	return tmp
                
                function code(J, l, K, U)
                	t_0 = Float64(0.3333333333333333 + Float64(Float64(l * l) * 0.016666666666666666))
                	tmp = 0.0
                	if (l <= 3.2e-7)
                		tmp = Float64(U + Float64(Float64(2.0 + Float64(l * Float64(l * t_0))) * Float64(l * J)));
                	else
                		tmp = Float64(J * Float64(Float64(l * Float64(Float64(-0.125 * Float64(K * K)) + 1.0)) * Float64(2.0 + Float64(Float64(l * l) * t_0))));
                	end
                	return tmp
                end
                
                function tmp_2 = code(J, l, K, U)
                	t_0 = 0.3333333333333333 + ((l * l) * 0.016666666666666666);
                	tmp = 0.0;
                	if (l <= 3.2e-7)
                		tmp = U + ((2.0 + (l * (l * t_0))) * (l * J));
                	else
                		tmp = J * ((l * ((-0.125 * (K * K)) + 1.0)) * (2.0 + ((l * l) * t_0)));
                	end
                	tmp_2 = tmp;
                end
                
                code[J_, l_, K_, U_] := Block[{t$95$0 = N[(0.3333333333333333 + N[(N[(l * l), $MachinePrecision] * 0.016666666666666666), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[l, 3.2e-7], N[(U + N[(N[(2.0 + N[(l * N[(l * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(l * J), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(J * N[(N[(l * N[(N[(-0.125 * N[(K * K), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] * N[(2.0 + N[(N[(l * l), $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
                
                \begin{array}{l}
                
                \\
                \begin{array}{l}
                t_0 := 0.3333333333333333 + \left(\ell \cdot \ell\right) \cdot 0.016666666666666666\\
                \mathbf{if}\;\ell \leq 3.2 \cdot 10^{-7}:\\
                \;\;\;\;U + \left(2 + \ell \cdot \left(\ell \cdot t\_0\right)\right) \cdot \left(\ell \cdot J\right)\\
                
                \mathbf{else}:\\
                \;\;\;\;J \cdot \left(\left(\ell \cdot \left(-0.125 \cdot \left(K \cdot K\right) + 1\right)\right) \cdot \left(2 + \left(\ell \cdot \ell\right) \cdot t\_0\right)\right)\\
                
                
                \end{array}
                \end{array}
                
                Derivation
                1. Split input into 2 regimes
                2. if l < 3.2000000000000001e-7

                  1. Initial program 84.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 + {\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. unpow2N/A

                      \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \left(\left(\ell \cdot \ell\right) \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) \]
                    4. associate-*l*N/A

                      \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \left(\ell \cdot \left(\ell \cdot \left(\frac{1}{3} + \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) \]
                    5. *-commutativeN/A

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

                      \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\ell, \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)\right)\right), \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right), U\right) \]
                    11. *-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(\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)\right)\right), \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right), U\right) \]
                    12. unpow2N/A

                      \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\ell, \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), \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right), U\right) \]
                    13. *-lowering-*.f6496.7%

                      \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\ell, \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), \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right), U\right) \]
                  5. Simplified96.7%

                    \[\leadsto \left(J \cdot \color{blue}{\left(\ell \cdot \left(2 + \ell \cdot \left(\ell \cdot \left(0.3333333333333333 + \left(\ell \cdot \ell\right) \cdot 0.016666666666666666\right)\right)\right)\right)}\right) \cdot \cos \left(\frac{K}{2}\right) + U \]
                  6. 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) \]
                  7. 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. *-commutativeN/A

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

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

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

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

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

                      \[\leadsto \mathsf{+.f64}\left(\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), \left(J \cdot \ell\right)\right), U\right) \]
                    8. associate-*l*N/A

                      \[\leadsto \mathsf{+.f64}\left(\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), \left(J \cdot \ell\right)\right), U\right) \]
                    9. *-lowering-*.f64N/A

                      \[\leadsto \mathsf{+.f64}\left(\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), \left(J \cdot \ell\right)\right), U\right) \]
                    10. *-lowering-*.f64N/A

                      \[\leadsto \mathsf{+.f64}\left(\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), \left(J \cdot \ell\right)\right), U\right) \]
                    11. +-lowering-+.f64N/A

                      \[\leadsto \mathsf{+.f64}\left(\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), \left(J \cdot \ell\right)\right), U\right) \]
                    12. *-commutativeN/A

                      \[\leadsto \mathsf{+.f64}\left(\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), \left(J \cdot \ell\right)\right), U\right) \]
                    13. *-lowering-*.f64N/A

                      \[\leadsto \mathsf{+.f64}\left(\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), \left(J \cdot \ell\right)\right), U\right) \]
                    14. unpow2N/A

                      \[\leadsto \mathsf{+.f64}\left(\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), \left(J \cdot \ell\right)\right), U\right) \]
                    15. *-lowering-*.f64N/A

                      \[\leadsto \mathsf{+.f64}\left(\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), \left(J \cdot \ell\right)\right), U\right) \]
                    16. *-lowering-*.f6481.3%

                      \[\leadsto \mathsf{+.f64}\left(\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), \mathsf{*.f64}\left(J, \ell\right)\right), U\right) \]
                  8. Simplified81.3%

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

                  if 3.2000000000000001e-7 < l

                  1. Initial program 99.2%

                    \[\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. unpow2N/A

                      \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \left(\left(\ell \cdot \ell\right) \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) \]
                    4. associate-*l*N/A

                      \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \left(\ell \cdot \left(\ell \cdot \left(\frac{1}{3} + \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) \]
                    5. *-commutativeN/A

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

                      \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\ell, \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)\right)\right), \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right), U\right) \]
                    11. *-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(\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)\right)\right), \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right), U\right) \]
                    12. unpow2N/A

                      \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\ell, \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), \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right), U\right) \]
                    13. *-lowering-*.f6490.9%

                      \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\ell, \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), \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right), U\right) \]
                  5. Simplified90.9%

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

                    \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\ell, \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), \color{blue}{\left(1 + \frac{-1}{8} \cdot {K}^{2}\right)}\right), U\right) \]
                  7. Step-by-step derivation
                    1. +-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(\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), \mathsf{+.f64}\left(1, \left(\frac{-1}{8} \cdot {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, \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), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{8}, \left({K}^{2}\right)\right)\right)\right), U\right) \]
                    3. unpow2N/A

                      \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\ell, \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), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{8}, \left(K \cdot K\right)\right)\right)\right), U\right) \]
                    4. *-lowering-*.f6472.6%

                      \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\ell, \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), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{*.f64}\left(K, K\right)\right)\right)\right), U\right) \]
                  8. Simplified72.6%

                    \[\leadsto \left(J \cdot \left(\ell \cdot \left(2 + \ell \cdot \left(\ell \cdot \left(0.3333333333333333 + \left(\ell \cdot \ell\right) \cdot 0.016666666666666666\right)\right)\right)\right)\right) \cdot \color{blue}{\left(1 + -0.125 \cdot \left(K \cdot K\right)\right)} + U \]
                  9. 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)} \]
                  10. 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-*.f6474.1%

                      \[\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) \]
                  11. Simplified74.1%

                    \[\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 simplification79.5%

                  \[\leadsto \begin{array}{l} \mathbf{if}\;\ell \leq 3.2 \cdot 10^{-7}:\\ \;\;\;\;U + \left(2 + \ell \cdot \left(\ell \cdot \left(0.3333333333333333 + \left(\ell \cdot \ell\right) \cdot 0.016666666666666666\right)\right)\right) \cdot \left(\ell \cdot J\right)\\ \mathbf{else}:\\ \;\;\;\;J \cdot \left(\left(\ell \cdot \left(-0.125 \cdot \left(K \cdot K\right) + 1\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)\\ \end{array} \]
                5. Add Preprocessing

                Alternative 12: 76.8% accurate, 13.0× speedup?

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

                  1. Initial program 86.4%

                    \[\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 \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) \]
                    2. *-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) \]
                    3. *-lowering-*.f64N/A

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto \left(\color{blue}{1} \cdot \left(2 \cdot \sinh \ell\right)\right) \cdot J + U \]
                    2. 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)}, J\right), U\right) \]
                    3. 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), J\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), J\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), J\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), J\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), J\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), J\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), J\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), J\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), J\right), U\right) \]
                      10. *-lowering-*.f6478.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), J\right), U\right) \]
                    4. Simplified78.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 J + U \]

                    if 2.0000000000000001e148 < 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. fma-undefineN/A

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

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

                        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\ell, \left(\left(\frac{1}{3} \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) \cdot {\ell}^{2} + 2 \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right)\right), U\right) \]
                    5. Simplified97.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, \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-*.f6488.2%

                        \[\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. Simplified88.2%

                      \[\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 \]
                    9. Taylor expanded in l around inf

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

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

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

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

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

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

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

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

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

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

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

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

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

                        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(J, \frac{1}{3}\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \ell\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{8}, \left(K \cdot \color{blue}{K}\right)\right)\right)\right)\right) \]
                      14. *-lowering-*.f6488.2%

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

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

                    \[\leadsto \begin{array}{l} \mathbf{if}\;\ell \leq 2 \cdot 10^{+148}:\\ \;\;\;\;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}:\\ \;\;\;\;\left(J \cdot 0.3333333333333333\right) \cdot \left(\left(-0.125 \cdot \left(K \cdot K\right) + 1\right) \cdot \left(\ell \cdot \left(\ell \cdot \ell\right)\right)\right)\\ \end{array} \]
                  9. Add Preprocessing

                  Alternative 13: 73.9% accurate, 13.5× speedup?

                  \[\begin{array}{l} \\ \begin{array}{l} t_0 := U \cdot \frac{J \cdot \left(\ell \cdot \left(\left(\ell \cdot \ell\right) \cdot 0.3333333333333333\right)\right)}{U}\\ \mathbf{if}\;\ell \leq -1.95 \cdot 10^{+18}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;\ell \leq 940:\\ \;\;\;\;U + J \cdot \left(2 \cdot \ell\right)\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \]
                  (FPCore (J l K U)
                   :precision binary64
                   (let* ((t_0 (* U (/ (* J (* l (* (* l l) 0.3333333333333333))) U))))
                     (if (<= l -1.95e+18) t_0 (if (<= l 940.0) (+ U (* J (* 2.0 l))) t_0))))
                  double code(double J, double l, double K, double U) {
                  	double t_0 = U * ((J * (l * ((l * l) * 0.3333333333333333))) / U);
                  	double tmp;
                  	if (l <= -1.95e+18) {
                  		tmp = t_0;
                  	} else if (l <= 940.0) {
                  		tmp = U + (J * (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 = u * ((j * (l * ((l * l) * 0.3333333333333333d0))) / u)
                      if (l <= (-1.95d+18)) then
                          tmp = t_0
                      else if (l <= 940.0d0) then
                          tmp = u + (j * (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 = U * ((J * (l * ((l * l) * 0.3333333333333333))) / U);
                  	double tmp;
                  	if (l <= -1.95e+18) {
                  		tmp = t_0;
                  	} else if (l <= 940.0) {
                  		tmp = U + (J * (2.0 * l));
                  	} else {
                  		tmp = t_0;
                  	}
                  	return tmp;
                  }
                  
                  def code(J, l, K, U):
                  	t_0 = U * ((J * (l * ((l * l) * 0.3333333333333333))) / U)
                  	tmp = 0
                  	if l <= -1.95e+18:
                  		tmp = t_0
                  	elif l <= 940.0:
                  		tmp = U + (J * (2.0 * l))
                  	else:
                  		tmp = t_0
                  	return tmp
                  
                  function code(J, l, K, U)
                  	t_0 = Float64(U * Float64(Float64(J * Float64(l * Float64(Float64(l * l) * 0.3333333333333333))) / U))
                  	tmp = 0.0
                  	if (l <= -1.95e+18)
                  		tmp = t_0;
                  	elseif (l <= 940.0)
                  		tmp = Float64(U + Float64(J * Float64(2.0 * l)));
                  	else
                  		tmp = t_0;
                  	end
                  	return tmp
                  end
                  
                  function tmp_2 = code(J, l, K, U)
                  	t_0 = U * ((J * (l * ((l * l) * 0.3333333333333333))) / U);
                  	tmp = 0.0;
                  	if (l <= -1.95e+18)
                  		tmp = t_0;
                  	elseif (l <= 940.0)
                  		tmp = U + (J * (2.0 * l));
                  	else
                  		tmp = t_0;
                  	end
                  	tmp_2 = tmp;
                  end
                  
                  code[J_, l_, K_, U_] := Block[{t$95$0 = N[(U * N[(N[(J * N[(l * N[(N[(l * l), $MachinePrecision] * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / U), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[l, -1.95e+18], t$95$0, If[LessEqual[l, 940.0], N[(U + N[(J * N[(2.0 * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]
                  
                  \begin{array}{l}
                  
                  \\
                  \begin{array}{l}
                  t_0 := U \cdot \frac{J \cdot \left(\ell \cdot \left(\left(\ell \cdot \ell\right) \cdot 0.3333333333333333\right)\right)}{U}\\
                  \mathbf{if}\;\ell \leq -1.95 \cdot 10^{+18}:\\
                  \;\;\;\;t\_0\\
                  
                  \mathbf{elif}\;\ell \leq 940:\\
                  \;\;\;\;U + J \cdot \left(2 \cdot \ell\right)\\
                  
                  \mathbf{else}:\\
                  \;\;\;\;t\_0\\
                  
                  
                  \end{array}
                  \end{array}
                  
                  Derivation
                  1. Split input into 2 regimes
                  2. if l < -1.95e18 or 940 < 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. fma-undefineN/A

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

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

                        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\ell, \left(\left(\frac{1}{3} \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) \cdot {\ell}^{2} + 2 \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right)\right), U\right) \]
                    5. Simplified76.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. *-commutativeN/A

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

                        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(J, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\ell, \left(\frac{1}{3} \cdot \ell\right)\right)\right)\right)\right), U\right) \]
                      8. *-commutativeN/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) \]
                      9. *-lowering-*.f6456.7%

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

                      \[\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. associate-*r*N/A

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

                        \[\leadsto \mathsf{*.f64}\left(U, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\left(\left(\ell \cdot J\right) \cdot \left(2 + \frac{1}{3} \cdot {\ell}^{2}\right)\right), U\right)\right)\right) \]
                      6. associate-*l*N/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. *-lowering-*.f64N/A

                        \[\leadsto \mathsf{*.f64}\left(U, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(J, \left(2 + \frac{1}{3} \cdot {\ell}^{2}\right)\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(J, \mathsf{+.f64}\left(2, \left(\frac{1}{3} \cdot {\ell}^{2}\right)\right)\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(J, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\frac{1}{3}, \left({\ell}^{2}\right)\right)\right)\right)\right), U\right)\right)\right) \]
                      11. unpow2N/A

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

                        \[\leadsto \mathsf{*.f64}\left(U, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(J, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\ell, \ell\right)\right)\right)\right)\right), U\right)\right)\right) \]
                    11. Simplified59.2%

                      \[\leadsto \color{blue}{U \cdot \left(1 + \frac{\ell \cdot \left(J \cdot \left(2 + 0.3333333333333333 \cdot \left(\ell \cdot \ell\right)\right)\right)}{U}\right)} \]
                    12. Taylor expanded in l around inf

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

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

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

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

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

                        \[\leadsto \mathsf{*.f64}\left(U, \mathsf{/.f64}\left(\left(J \cdot \left(\frac{1}{3} \cdot {\ell}^{3}\right)\right), U\right)\right) \]
                      6. unpow3N/A

                        \[\leadsto \mathsf{*.f64}\left(U, \mathsf{/.f64}\left(\left(J \cdot \left(\frac{1}{3} \cdot \left(\left(\ell \cdot \ell\right) \cdot \ell\right)\right)\right), U\right)\right) \]
                      7. unpow2N/A

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

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

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

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

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

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

                        \[\leadsto \mathsf{*.f64}\left(U, \mathsf{/.f64}\left(\mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\frac{1}{3}, \left(\ell \cdot \ell\right)\right)\right)\right), U\right)\right) \]
                      14. *-lowering-*.f6463.3%

                        \[\leadsto \mathsf{*.f64}\left(U, \mathsf{/.f64}\left(\mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\ell, \ell\right)\right)\right)\right), U\right)\right) \]
                    14. Simplified63.3%

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

                    if -1.95e18 < l < 940

                    1. Initial program 78.4%

                      \[\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 \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) \]
                      2. *-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) \]
                      3. *-lowering-*.f64N/A

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

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

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

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

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

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

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

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

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

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

                        \[\leadsto \left(\color{blue}{1} \cdot \left(2 \cdot \sinh \ell\right)\right) \cdot J + U \]
                      2. Taylor expanded in l around 0

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

                          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(\ell \cdot 2\right), J\right), U\right) \]
                        2. *-lowering-*.f6485.4%

                          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, 2\right), J\right), U\right) \]
                      4. Simplified85.4%

                        \[\leadsto \color{blue}{\left(\ell \cdot 2\right)} \cdot J + U \]
                    7. Recombined 2 regimes into one program.
                    8. Final simplification75.4%

                      \[\leadsto \begin{array}{l} \mathbf{if}\;\ell \leq -1.95 \cdot 10^{+18}:\\ \;\;\;\;U \cdot \frac{J \cdot \left(\ell \cdot \left(\left(\ell \cdot \ell\right) \cdot 0.3333333333333333\right)\right)}{U}\\ \mathbf{elif}\;\ell \leq 940:\\ \;\;\;\;U + J \cdot \left(2 \cdot \ell\right)\\ \mathbf{else}:\\ \;\;\;\;U \cdot \frac{J \cdot \left(\ell \cdot \left(\left(\ell \cdot \ell\right) \cdot 0.3333333333333333\right)\right)}{U}\\ \end{array} \]
                    9. Add Preprocessing

                    Alternative 14: 73.6% accurate, 14.2× speedup?

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

                      1. Initial program 86.4%

                        \[\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. fma-undefineN/A

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

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

                          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\ell, \left(\left(\frac{1}{3} \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) \cdot {\ell}^{2} + 2 \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right)\right), U\right) \]
                      5. Simplified87.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. *-commutativeN/A

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

                          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(J, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\ell, \left(\frac{1}{3} \cdot \ell\right)\right)\right)\right)\right), U\right) \]
                        8. *-commutativeN/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) \]
                        9. *-lowering-*.f6472.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. Simplified72.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 U around -inf

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

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

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

                          \[\leadsto \mathsf{*.f64}\left(\left(-1 \cdot \frac{J \cdot \left(\ell \cdot \left(2 + \frac{1}{3} \cdot {\ell}^{2}\right)\right)}{U} - 1\right), \color{blue}{\left(-1 \cdot U\right)}\right) \]
                      11. Simplified75.4%

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

                      if 3.09999999999999975e148 < 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. fma-undefineN/A

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

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

                          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\ell, \left(\left(\frac{1}{3} \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) \cdot {\ell}^{2} + 2 \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right)\right), U\right) \]
                      5. Simplified97.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, \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-*.f6488.2%

                          \[\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. Simplified88.2%

                        \[\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 \]
                      9. Taylor expanded in l around inf

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

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

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

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

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

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

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

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

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

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

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

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

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

                          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(J, \frac{1}{3}\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \ell\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{8}, \left(K \cdot \color{blue}{K}\right)\right)\right)\right)\right) \]
                        14. *-lowering-*.f6488.2%

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

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

                      \[\leadsto \begin{array}{l} \mathbf{if}\;\ell \leq 3.1 \cdot 10^{+148}:\\ \;\;\;\;U \cdot \left(J \cdot \left(\left(2 + \left(\ell \cdot \ell\right) \cdot 0.3333333333333333\right) \cdot \frac{\ell}{U}\right) + 1\right)\\ \mathbf{else}:\\ \;\;\;\;\left(J \cdot 0.3333333333333333\right) \cdot \left(\left(-0.125 \cdot \left(K \cdot K\right) + 1\right) \cdot \left(\ell \cdot \left(\ell \cdot \ell\right)\right)\right)\\ \end{array} \]
                    5. Add Preprocessing

                    Alternative 15: 73.8% accurate, 14.2× speedup?

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

                      1. Initial program 84.4%

                        \[\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. fma-undefineN/A

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

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

                          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\ell, \left(\left(\frac{1}{3} \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) \cdot {\ell}^{2} + 2 \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right)\right), U\right) \]
                      5. Simplified93.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. *-commutativeN/A

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

                          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(J, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\ell, \left(\frac{1}{3} \cdot \ell\right)\right)\right)\right)\right), U\right) \]
                        8. *-commutativeN/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) \]
                        9. *-lowering-*.f6478.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. Simplified78.4%

                        \[\leadsto \ell \cdot \color{blue}{\left(J \cdot \left(2 + \ell \cdot \left(\ell \cdot 0.3333333333333333\right)\right)\right)} + U \]
                      9. Step-by-step derivation
                        1. *-commutativeN/A

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

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

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

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

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

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

                          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \left(\frac{1}{3} \cdot \left(\ell \cdot \ell\right)\right)\right)\right), J\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(\frac{1}{3}, \left(\ell \cdot \ell\right)\right)\right)\right), J\right), U\right) \]
                        9. *-lowering-*.f6479.9%

                          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\ell, \ell\right)\right)\right)\right), J\right), U\right) \]
                      10. Applied egg-rr79.9%

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

                      if 2500 < 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. fma-undefineN/A

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

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

                          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\ell, \left(\left(\frac{1}{3} \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) \cdot {\ell}^{2} + 2 \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right)\right), U\right) \]
                      5. Simplified74.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, \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-*.f6467.1%

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

                        \[\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 \]
                      9. Taylor expanded in l around inf

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

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

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

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

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

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

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

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

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

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

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

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

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

                          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(J, \frac{1}{3}\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \ell\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{8}, \left(K \cdot \color{blue}{K}\right)\right)\right)\right)\right) \]
                        14. *-lowering-*.f6468.7%

                          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(J, \frac{1}{3}\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \ell\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{*.f64}\left(K, \color{blue}{K}\right)\right)\right)\right)\right) \]
                      11. Simplified68.7%

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

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

                    Alternative 16: 72.2% accurate, 14.8× speedup?

                    \[\begin{array}{l} \\ \begin{array}{l} t_0 := J \cdot \left(\ell \cdot \left(2 + \left(\ell \cdot \ell\right) \cdot 0.3333333333333333\right)\right)\\ \mathbf{if}\;\ell \leq -0.102:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;\ell \leq 3.2 \cdot 10^{-7}:\\ \;\;\;\;U + J \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 (+ 2.0 (* (* l l) 0.3333333333333333))))))
                       (if (<= l -0.102) t_0 (if (<= l 3.2e-7) (+ U (* J (* 2.0 l))) t_0))))
                    double code(double J, double l, double K, double U) {
                    	double t_0 = J * (l * (2.0 + ((l * l) * 0.3333333333333333)));
                    	double tmp;
                    	if (l <= -0.102) {
                    		tmp = t_0;
                    	} else if (l <= 3.2e-7) {
                    		tmp = U + (J * (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 * (2.0d0 + ((l * l) * 0.3333333333333333d0)))
                        if (l <= (-0.102d0)) then
                            tmp = t_0
                        else if (l <= 3.2d-7) then
                            tmp = u + (j * (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 * (2.0 + ((l * l) * 0.3333333333333333)));
                    	double tmp;
                    	if (l <= -0.102) {
                    		tmp = t_0;
                    	} else if (l <= 3.2e-7) {
                    		tmp = U + (J * (2.0 * l));
                    	} else {
                    		tmp = t_0;
                    	}
                    	return tmp;
                    }
                    
                    def code(J, l, K, U):
                    	t_0 = J * (l * (2.0 + ((l * l) * 0.3333333333333333)))
                    	tmp = 0
                    	if l <= -0.102:
                    		tmp = t_0
                    	elif l <= 3.2e-7:
                    		tmp = U + (J * (2.0 * l))
                    	else:
                    		tmp = t_0
                    	return tmp
                    
                    function code(J, l, K, U)
                    	t_0 = Float64(J * Float64(l * Float64(2.0 + Float64(Float64(l * l) * 0.3333333333333333))))
                    	tmp = 0.0
                    	if (l <= -0.102)
                    		tmp = t_0;
                    	elseif (l <= 3.2e-7)
                    		tmp = Float64(U + Float64(J * Float64(2.0 * l)));
                    	else
                    		tmp = t_0;
                    	end
                    	return tmp
                    end
                    
                    function tmp_2 = code(J, l, K, U)
                    	t_0 = J * (l * (2.0 + ((l * l) * 0.3333333333333333)));
                    	tmp = 0.0;
                    	if (l <= -0.102)
                    		tmp = t_0;
                    	elseif (l <= 3.2e-7)
                    		tmp = U + (J * (2.0 * l));
                    	else
                    		tmp = t_0;
                    	end
                    	tmp_2 = tmp;
                    end
                    
                    code[J_, l_, K_, U_] := Block[{t$95$0 = N[(J * N[(l * N[(2.0 + N[(N[(l * l), $MachinePrecision] * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[l, -0.102], t$95$0, If[LessEqual[l, 3.2e-7], N[(U + N[(J * N[(2.0 * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]
                    
                    \begin{array}{l}
                    
                    \\
                    \begin{array}{l}
                    t_0 := J \cdot \left(\ell \cdot \left(2 + \left(\ell \cdot \ell\right) \cdot 0.3333333333333333\right)\right)\\
                    \mathbf{if}\;\ell \leq -0.102:\\
                    \;\;\;\;t\_0\\
                    
                    \mathbf{elif}\;\ell \leq 3.2 \cdot 10^{-7}:\\
                    \;\;\;\;U + J \cdot \left(2 \cdot \ell\right)\\
                    
                    \mathbf{else}:\\
                    \;\;\;\;t\_0\\
                    
                    
                    \end{array}
                    \end{array}
                    
                    Derivation
                    1. Split input into 2 regimes
                    2. if l < -0.101999999999999993 or 3.2000000000000001e-7 < l

                      1. Initial program 99.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. fma-undefineN/A

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

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

                          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\ell, \left(\left(\frac{1}{3} \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) \cdot {\ell}^{2} + 2 \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right)\right), U\right) \]
                      5. Simplified75.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. *-commutativeN/A

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

                          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(J, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\ell, \left(\frac{1}{3} \cdot \ell\right)\right)\right)\right)\right), U\right) \]
                        8. *-commutativeN/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) \]
                        9. *-lowering-*.f6455.7%

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

                        \[\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. associate-*r*N/A

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

                          \[\leadsto \mathsf{*.f64}\left(U, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\left(\left(\ell \cdot J\right) \cdot \left(2 + \frac{1}{3} \cdot {\ell}^{2}\right)\right), U\right)\right)\right) \]
                        6. associate-*l*N/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. *-lowering-*.f64N/A

                          \[\leadsto \mathsf{*.f64}\left(U, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(J, \left(2 + \frac{1}{3} \cdot {\ell}^{2}\right)\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(J, \mathsf{+.f64}\left(2, \left(\frac{1}{3} \cdot {\ell}^{2}\right)\right)\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(J, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\frac{1}{3}, \left({\ell}^{2}\right)\right)\right)\right)\right), U\right)\right)\right) \]
                        11. unpow2N/A

                          \[\leadsto \mathsf{*.f64}\left(U, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(J, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\frac{1}{3}, \left(\ell \cdot \ell\right)\right)\right)\right)\right), U\right)\right)\right) \]
                        12. *-lowering-*.f6458.0%

                          \[\leadsto \mathsf{*.f64}\left(U, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(J, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\ell, \ell\right)\right)\right)\right)\right), U\right)\right)\right) \]
                      11. Simplified58.0%

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

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

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

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

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

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

                          \[\leadsto \mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\frac{1}{3}, \left(\ell \cdot \color{blue}{\ell}\right)\right)\right)\right)\right) \]
                        6. *-lowering-*.f6459.6%

                          \[\leadsto \mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\ell, \color{blue}{\ell}\right)\right)\right)\right)\right) \]
                      14. Simplified59.6%

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

                      if -0.101999999999999993 < l < 3.2000000000000001e-7

                      1. Initial program 78.0%

                        \[\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 \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) \]
                        2. *-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) \]
                        3. *-lowering-*.f64N/A

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

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

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

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

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

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

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

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

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

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

                          \[\leadsto \left(\color{blue}{1} \cdot \left(2 \cdot \sinh \ell\right)\right) \cdot J + U \]
                        2. Taylor expanded in l around 0

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

                            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(\ell \cdot 2\right), J\right), U\right) \]
                          2. *-lowering-*.f6487.7%

                            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, 2\right), J\right), U\right) \]
                        4. Simplified87.7%

                          \[\leadsto \color{blue}{\left(\ell \cdot 2\right)} \cdot J + U \]
                      7. Recombined 2 regimes into one program.
                      8. Final simplification74.4%

                        \[\leadsto \begin{array}{l} \mathbf{if}\;\ell \leq -0.102:\\ \;\;\;\;J \cdot \left(\ell \cdot \left(2 + \left(\ell \cdot \ell\right) \cdot 0.3333333333333333\right)\right)\\ \mathbf{elif}\;\ell \leq 3.2 \cdot 10^{-7}:\\ \;\;\;\;U + J \cdot \left(2 \cdot \ell\right)\\ \mathbf{else}:\\ \;\;\;\;J \cdot \left(\ell \cdot \left(2 + \left(\ell \cdot \ell\right) \cdot 0.3333333333333333\right)\right)\\ \end{array} \]
                      9. Add Preprocessing

                      Alternative 17: 72.5% accurate, 16.4× speedup?

                      \[\begin{array}{l} \\ \begin{array}{l} t_0 := J \cdot \left(0.3333333333333333 \cdot \left(\ell \cdot \left(\ell \cdot \ell\right)\right)\right)\\ \mathbf{if}\;\ell \leq -6.8 \cdot 10^{+18}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;\ell \leq 5000000:\\ \;\;\;\;U + J \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 (* 0.3333333333333333 (* l (* l l))))))
                         (if (<= l -6.8e+18) t_0 (if (<= l 5000000.0) (+ U (* J (* 2.0 l))) t_0))))
                      double code(double J, double l, double K, double U) {
                      	double t_0 = J * (0.3333333333333333 * (l * (l * l)));
                      	double tmp;
                      	if (l <= -6.8e+18) {
                      		tmp = t_0;
                      	} else if (l <= 5000000.0) {
                      		tmp = U + (J * (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 * (0.3333333333333333d0 * (l * (l * l)))
                          if (l <= (-6.8d+18)) then
                              tmp = t_0
                          else if (l <= 5000000.0d0) then
                              tmp = u + (j * (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 * (0.3333333333333333 * (l * (l * l)));
                      	double tmp;
                      	if (l <= -6.8e+18) {
                      		tmp = t_0;
                      	} else if (l <= 5000000.0) {
                      		tmp = U + (J * (2.0 * l));
                      	} else {
                      		tmp = t_0;
                      	}
                      	return tmp;
                      }
                      
                      def code(J, l, K, U):
                      	t_0 = J * (0.3333333333333333 * (l * (l * l)))
                      	tmp = 0
                      	if l <= -6.8e+18:
                      		tmp = t_0
                      	elif l <= 5000000.0:
                      		tmp = U + (J * (2.0 * l))
                      	else:
                      		tmp = t_0
                      	return tmp
                      
                      function code(J, l, K, U)
                      	t_0 = Float64(J * Float64(0.3333333333333333 * Float64(l * Float64(l * l))))
                      	tmp = 0.0
                      	if (l <= -6.8e+18)
                      		tmp = t_0;
                      	elseif (l <= 5000000.0)
                      		tmp = Float64(U + Float64(J * Float64(2.0 * l)));
                      	else
                      		tmp = t_0;
                      	end
                      	return tmp
                      end
                      
                      function tmp_2 = code(J, l, K, U)
                      	t_0 = J * (0.3333333333333333 * (l * (l * l)));
                      	tmp = 0.0;
                      	if (l <= -6.8e+18)
                      		tmp = t_0;
                      	elseif (l <= 5000000.0)
                      		tmp = U + (J * (2.0 * l));
                      	else
                      		tmp = t_0;
                      	end
                      	tmp_2 = tmp;
                      end
                      
                      code[J_, l_, K_, U_] := Block[{t$95$0 = N[(J * N[(0.3333333333333333 * N[(l * N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[l, -6.8e+18], t$95$0, If[LessEqual[l, 5000000.0], N[(U + N[(J * N[(2.0 * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]
                      
                      \begin{array}{l}
                      
                      \\
                      \begin{array}{l}
                      t_0 := J \cdot \left(0.3333333333333333 \cdot \left(\ell \cdot \left(\ell \cdot \ell\right)\right)\right)\\
                      \mathbf{if}\;\ell \leq -6.8 \cdot 10^{+18}:\\
                      \;\;\;\;t\_0\\
                      
                      \mathbf{elif}\;\ell \leq 5000000:\\
                      \;\;\;\;U + J \cdot \left(2 \cdot \ell\right)\\
                      
                      \mathbf{else}:\\
                      \;\;\;\;t\_0\\
                      
                      
                      \end{array}
                      \end{array}
                      
                      Derivation
                      1. Split input into 2 regimes
                      2. if l < -6.8e18 or 5e6 < 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. fma-undefineN/A

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

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

                            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\ell, \left(\left(\frac{1}{3} \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right) \cdot {\ell}^{2} + 2 \cdot \left(J \cdot \cos \left(\frac{1}{2} \cdot K\right)\right)\right)\right), U\right) \]
                        5. Simplified76.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. *-commutativeN/A

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

                            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(J, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\ell, \left(\frac{1}{3} \cdot \ell\right)\right)\right)\right)\right), U\right) \]
                          8. *-commutativeN/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) \]
                          9. *-lowering-*.f6456.7%

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

                          \[\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. associate-*r*N/A

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

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

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

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

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

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

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

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

                            \[\leadsto \mathsf{*.f64}\left(J, \left(\frac{1}{3} \cdot \left(\left(\ell \cdot \ell\right) \cdot \ell\right)\right)\right) \]
                          10. unpow3N/A

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

                            \[\leadsto \mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\frac{1}{3}, \color{blue}{\left({\ell}^{3}\right)}\right)\right) \]
                          12. cube-multN/A

                            \[\leadsto \mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\frac{1}{3}, \left(\ell \cdot \color{blue}{\left(\ell \cdot \ell\right)}\right)\right)\right) \]
                          13. unpow2N/A

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

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

                            \[\leadsto \mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\ell, \left(\ell \cdot \color{blue}{\ell}\right)\right)\right)\right) \]
                          16. *-lowering-*.f6460.8%

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

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

                        if -6.8e18 < l < 5e6

                        1. Initial program 78.4%

                          \[\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 \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) \]
                          2. *-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) \]
                          3. *-lowering-*.f64N/A

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

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

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

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

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

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

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

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

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

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

                            \[\leadsto \left(\color{blue}{1} \cdot \left(2 \cdot \sinh \ell\right)\right) \cdot J + U \]
                          2. Taylor expanded in l around 0

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

                              \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(\ell \cdot 2\right), J\right), U\right) \]
                            2. *-lowering-*.f6485.4%

                              \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, 2\right), J\right), U\right) \]
                          4. Simplified85.4%

                            \[\leadsto \color{blue}{\left(\ell \cdot 2\right)} \cdot J + U \]
                        7. Recombined 2 regimes into one program.
                        8. Final simplification74.3%

                          \[\leadsto \begin{array}{l} \mathbf{if}\;\ell \leq -6.8 \cdot 10^{+18}:\\ \;\;\;\;J \cdot \left(0.3333333333333333 \cdot \left(\ell \cdot \left(\ell \cdot \ell\right)\right)\right)\\ \mathbf{elif}\;\ell \leq 5000000:\\ \;\;\;\;U + J \cdot \left(2 \cdot \ell\right)\\ \mathbf{else}:\\ \;\;\;\;J \cdot \left(0.3333333333333333 \cdot \left(\ell \cdot \left(\ell \cdot \ell\right)\right)\right)\\ \end{array} \]
                        9. Add Preprocessing

                        Alternative 18: 72.2% accurate, 18.4× speedup?

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

                          \[\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. fma-undefineN/A

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

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

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

                          \[\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. *-commutativeN/A

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

                            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(J, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\ell, \left(\frac{1}{3} \cdot \ell\right)\right)\right)\right)\right), U\right) \]
                          8. *-commutativeN/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) \]
                          9. *-lowering-*.f6472.6%

                            \[\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. Simplified72.6%

                          \[\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. associate-*r*N/A

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

                            \[\leadsto \mathsf{*.f64}\left(U, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\left(\left(\ell \cdot J\right) \cdot \left(2 + \frac{1}{3} \cdot {\ell}^{2}\right)\right), U\right)\right)\right) \]
                          6. associate-*l*N/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. *-lowering-*.f64N/A

                            \[\leadsto \mathsf{*.f64}\left(U, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(J, \left(2 + \frac{1}{3} \cdot {\ell}^{2}\right)\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(J, \mathsf{+.f64}\left(2, \left(\frac{1}{3} \cdot {\ell}^{2}\right)\right)\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(J, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\frac{1}{3}, \left({\ell}^{2}\right)\right)\right)\right)\right), U\right)\right)\right) \]
                          11. unpow2N/A

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

                            \[\leadsto \mathsf{*.f64}\left(U, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(J, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\ell, \ell\right)\right)\right)\right)\right), U\right)\right)\right) \]
                        11. Simplified73.3%

                          \[\leadsto \color{blue}{U \cdot \left(1 + \frac{\ell \cdot \left(J \cdot \left(2 + 0.3333333333333333 \cdot \left(\ell \cdot \ell\right)\right)\right)}{U}\right)} \]
                        12. Step-by-step derivation
                          1. associate-*r*N/A

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

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

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

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

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

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

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

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

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

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

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

                            \[\leadsto \mathsf{*.f64}\left(U, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(J, \ell\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \frac{1}{3}\right)\right)\right), U\right)\right)\right)\right) \]
                        13. Applied egg-rr74.8%

                          \[\leadsto U \cdot \left(1 + \color{blue}{\left(J \cdot \ell\right) \cdot \frac{2 + \ell \cdot \left(\ell \cdot 0.3333333333333333\right)}{U}}\right) \]
                        14. Final simplification74.8%

                          \[\leadsto U \cdot \left(\left(\ell \cdot J\right) \cdot \frac{2 + \ell \cdot \left(\ell \cdot 0.3333333333333333\right)}{U} + 1\right) \]
                        15. Add Preprocessing

                        Alternative 19: 45.7% accurate, 20.8× speedup?

                        \[\begin{array}{l} \\ \begin{array}{l} t_0 := J \cdot \left(2 \cdot \ell\right)\\ \mathbf{if}\;\ell \leq -1.1 \cdot 10^{-19}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;\ell \leq 7.5 \cdot 10^{-6}:\\ \;\;\;\;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 -1.1e-19) t_0 (if (<= l 7.5e-6) U t_0))))
                        double code(double J, double l, double K, double U) {
                        	double t_0 = J * (2.0 * l);
                        	double tmp;
                        	if (l <= -1.1e-19) {
                        		tmp = t_0;
                        	} else if (l <= 7.5e-6) {
                        		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 <= (-1.1d-19)) then
                                tmp = t_0
                            else if (l <= 7.5d-6) 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 <= -1.1e-19) {
                        		tmp = t_0;
                        	} else if (l <= 7.5e-6) {
                        		tmp = U;
                        	} else {
                        		tmp = t_0;
                        	}
                        	return tmp;
                        }
                        
                        def code(J, l, K, U):
                        	t_0 = J * (2.0 * l)
                        	tmp = 0
                        	if l <= -1.1e-19:
                        		tmp = t_0
                        	elif l <= 7.5e-6:
                        		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 <= -1.1e-19)
                        		tmp = t_0;
                        	elseif (l <= 7.5e-6)
                        		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 <= -1.1e-19)
                        		tmp = t_0;
                        	elseif (l <= 7.5e-6)
                        		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, -1.1e-19], t$95$0, If[LessEqual[l, 7.5e-6], U, t$95$0]]]
                        
                        \begin{array}{l}
                        
                        \\
                        \begin{array}{l}
                        t_0 := J \cdot \left(2 \cdot \ell\right)\\
                        \mathbf{if}\;\ell \leq -1.1 \cdot 10^{-19}:\\
                        \;\;\;\;t\_0\\
                        
                        \mathbf{elif}\;\ell \leq 7.5 \cdot 10^{-6}:\\
                        \;\;\;\;U\\
                        
                        \mathbf{else}:\\
                        \;\;\;\;t\_0\\
                        
                        
                        \end{array}
                        \end{array}
                        
                        Derivation
                        1. Split input into 2 regimes
                        2. if l < -1.0999999999999999e-19 or 7.50000000000000019e-6 < l

                          1. Initial program 97.7%

                            \[\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 \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) \]
                            2. *-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) \]
                            3. *-lowering-*.f64N/A

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

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

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

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

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

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

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

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

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

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

                              \[\leadsto \left(\color{blue}{1} \cdot \left(2 \cdot \sinh \ell\right)\right) \cdot J + U \]
                            2. Taylor expanded in l around 0

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

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

                                \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, 2\right), J\right), U\right) \]
                            4. Simplified26.1%

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

                              \[\leadsto \color{blue}{2 \cdot \left(J \cdot \ell\right)} \]
                            6. 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-*.f6425.5%

                                \[\leadsto \mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\ell, \color{blue}{2}\right)\right) \]
                            7. Simplified25.5%

                              \[\leadsto \color{blue}{J \cdot \left(\ell \cdot 2\right)} \]

                            if -1.0999999999999999e-19 < l < 7.50000000000000019e-6

                            1. Initial program 79.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 J around 0

                              \[\leadsto \color{blue}{U} \]
                            4. Step-by-step derivation
                              1. Simplified78.4%

                                \[\leadsto \color{blue}{U} \]
                            5. Recombined 2 regimes into one program.
                            6. Final simplification52.4%

                              \[\leadsto \begin{array}{l} \mathbf{if}\;\ell \leq -1.1 \cdot 10^{-19}:\\ \;\;\;\;J \cdot \left(2 \cdot \ell\right)\\ \mathbf{elif}\;\ell \leq 7.5 \cdot 10^{-6}:\\ \;\;\;\;U\\ \mathbf{else}:\\ \;\;\;\;J \cdot \left(2 \cdot \ell\right)\\ \end{array} \]
                            7. Add Preprocessing

                            Alternative 20: 72.6% accurate, 24.0× speedup?

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

                              \[\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. fma-undefineN/A

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

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

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

                              \[\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. *-commutativeN/A

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

                                \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(J, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\ell, \left(\frac{1}{3} \cdot \ell\right)\right)\right)\right)\right), U\right) \]
                              8. *-commutativeN/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) \]
                              9. *-lowering-*.f6472.6%

                                \[\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. Simplified72.6%

                              \[\leadsto \ell \cdot \color{blue}{\left(J \cdot \left(2 + \ell \cdot \left(\ell \cdot 0.3333333333333333\right)\right)\right)} + U \]
                            9. Step-by-step derivation
                              1. *-commutativeN/A

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

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

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

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

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

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

                                \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \left(\frac{1}{3} \cdot \left(\ell \cdot \ell\right)\right)\right)\right), J\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(\frac{1}{3}, \left(\ell \cdot \ell\right)\right)\right)\right), J\right), U\right) \]
                              9. *-lowering-*.f6474.4%

                                \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(\ell, \ell\right)\right)\right)\right), J\right), U\right) \]
                            10. Applied egg-rr74.4%

                              \[\leadsto \color{blue}{\left(\ell \cdot \left(2 + 0.3333333333333333 \cdot \left(\ell \cdot \ell\right)\right)\right) \cdot J} + U \]
                            11. Final simplification74.4%

                              \[\leadsto U + J \cdot \left(\ell \cdot \left(2 + \left(\ell \cdot \ell\right) \cdot 0.3333333333333333\right)\right) \]
                            12. Add Preprocessing

                            Alternative 21: 70.3% 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 88.2%

                              \[\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. fma-undefineN/A

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

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

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

                              \[\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. *-commutativeN/A

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

                                \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(J, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\ell, \left(\frac{1}{3} \cdot \ell\right)\right)\right)\right)\right), U\right) \]
                              8. *-commutativeN/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) \]
                              9. *-lowering-*.f6472.6%

                                \[\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. Simplified72.6%

                              \[\leadsto \ell \cdot \color{blue}{\left(J \cdot \left(2 + \ell \cdot \left(\ell \cdot 0.3333333333333333\right)\right)\right)} + U \]
                            9. Final simplification72.6%

                              \[\leadsto U + \ell \cdot \left(J \cdot \left(2 + \ell \cdot \left(\ell \cdot 0.3333333333333333\right)\right)\right) \]
                            10. Add Preprocessing

                            Alternative 22: 54.4% accurate, 44.6× speedup?

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

                              \[\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 \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) \]
                              2. *-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) \]
                              3. *-lowering-*.f64N/A

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

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

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

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

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

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

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

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

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

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

                                \[\leadsto \left(\color{blue}{1} \cdot \left(2 \cdot \sinh \ell\right)\right) \cdot J + U \]
                              2. Taylor expanded in l around 0

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

                                  \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(\ell \cdot 2\right), J\right), U\right) \]
                                2. *-lowering-*.f6457.8%

                                  \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, 2\right), J\right), U\right) \]
                              4. Simplified57.8%

                                \[\leadsto \color{blue}{\left(\ell \cdot 2\right)} \cdot J + U \]
                              5. Final simplification57.8%

                                \[\leadsto U + J \cdot \left(2 \cdot \ell\right) \]
                              6. Add Preprocessing

                              Alternative 23: 37.3% 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 88.2%

                                \[\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. Simplified41.2%

                                  \[\leadsto \color{blue}{U} \]
                                2. Add Preprocessing

                                Reproduce

                                ?
                                herbie shell --seed 2024139 
                                (FPCore (J l K U)
                                  :name "Maksimov and Kolovsky, Equation (4)"
                                  :precision binary64
                                  (+ (* (* J (- (exp l) (exp (- l)))) (cos (/ K 2.0))) U))