Toniolo and Linder, Equation (3a)

?

Percentage Accurate: 39.5% → 73.5%
Time: 42.3s
Precision: binary64
Cost: 43600

?

\[ \begin{array}{c}[kx, ky] = \mathsf{sort}([kx, ky])\\ \end{array} \]
\[\sqrt{\frac{1}{2} \cdot \left(1 + \frac{1}{\sqrt{1 + {\left(\frac{2 \cdot \ell}{Om}\right)}^{2} \cdot \left({\sin kx}^{2} + {\sin ky}^{2}\right)}}\right)} \]
\[\begin{array}{l} t_0 := {\sin ky}^{3}\\ t_1 := 0.16666666666666666 \cdot \frac{Om \cdot ky}{\ell} + \frac{Om}{ky \cdot \ell}\\ t_2 := \frac{kx \cdot \left(kx \cdot Om\right)}{t_0 \cdot \ell}\\ t_3 := \sqrt{0.5 + 0.5 \cdot \frac{1}{\mathsf{hypot}\left(1, \left(2 \cdot \frac{\ell}{Om}\right) \cdot \mathsf{hypot}\left(\sin kx, \sin ky\right)\right)}}\\ t_4 := -0.027777777777777776 \cdot \frac{Om}{\ell} + \frac{Om}{\ell} \cdot 0.008333333333333333\\ t_5 := t_4 \cdot {ky}^{3}\\ \mathbf{if}\;kx \leq -1.02 \cdot 10^{+79}:\\ \;\;\;\;{\left(0.5 + \left(-0.5 \cdot \frac{Om}{t_0 \cdot \frac{\ell}{kx \cdot kx}}\right) \cdot -0.25\right)}^{0.5}\\ \mathbf{elif}\;kx \leq -2.1 \cdot 10^{-202}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;kx \leq -4.8 \cdot 10^{-238}:\\ \;\;\;\;{\left(0.5 + -0.25 \cdot \mathsf{fma}\left(-0.5, t_2, t_1 - t_5\right)\right)}^{0.5}\\ \mathbf{elif}\;kx \leq 6.5 \cdot 10^{-225}:\\ \;\;\;\;t_3\\ \mathbf{else}:\\ \;\;\;\;{\left(0.5 + -0.25 \cdot \mathsf{fma}\left(-0.5, t_2, \left(t_1 - {ky}^{5} \cdot \left(\frac{Om}{\ell} \cdot 0.001388888888888889 + \left(\frac{Om}{\ell} \cdot -0.0001984126984126984 + t_4 \cdot 0.16666666666666666\right)\right)\right) - t_5\right)\right)}^{0.5}\\ \end{array} \]
(FPCore (l Om kx ky)
 :precision binary64
 (sqrt
  (*
   (/ 1.0 2.0)
   (+
    1.0
    (/
     1.0
     (sqrt
      (+
       1.0
       (*
        (pow (/ (* 2.0 l) Om) 2.0)
        (+ (pow (sin kx) 2.0) (pow (sin ky) 2.0))))))))))
(FPCore (l Om kx ky)
 :precision binary64
 (let* ((t_0 (pow (sin ky) 3.0))
        (t_1 (+ (* 0.16666666666666666 (/ (* Om ky) l)) (/ Om (* ky l))))
        (t_2 (/ (* kx (* kx Om)) (* t_0 l)))
        (t_3
         (sqrt
          (+
           0.5
           (*
            0.5
            (/
             1.0
             (hypot 1.0 (* (* 2.0 (/ l Om)) (hypot (sin kx) (sin ky)))))))))
        (t_4
         (+
          (* -0.027777777777777776 (/ Om l))
          (* (/ Om l) 0.008333333333333333)))
        (t_5 (* t_4 (pow ky 3.0))))
   (if (<= kx -1.02e+79)
     (pow (+ 0.5 (* (* -0.5 (/ Om (* t_0 (/ l (* kx kx))))) -0.25)) 0.5)
     (if (<= kx -2.1e-202)
       t_3
       (if (<= kx -4.8e-238)
         (pow (+ 0.5 (* -0.25 (fma -0.5 t_2 (- t_1 t_5)))) 0.5)
         (if (<= kx 6.5e-225)
           t_3
           (pow
            (+
             0.5
             (*
              -0.25
              (fma
               -0.5
               t_2
               (-
                (-
                 t_1
                 (*
                  (pow ky 5.0)
                  (+
                   (* (/ Om l) 0.001388888888888889)
                   (+
                    (* (/ Om l) -0.0001984126984126984)
                    (* t_4 0.16666666666666666)))))
                t_5))))
            0.5)))))))
double code(double l, double Om, double kx, double ky) {
	return sqrt(((1.0 / 2.0) * (1.0 + (1.0 / sqrt((1.0 + (pow(((2.0 * l) / Om), 2.0) * (pow(sin(kx), 2.0) + pow(sin(ky), 2.0)))))))));
}
double code(double l, double Om, double kx, double ky) {
	double t_0 = pow(sin(ky), 3.0);
	double t_1 = (0.16666666666666666 * ((Om * ky) / l)) + (Om / (ky * l));
	double t_2 = (kx * (kx * Om)) / (t_0 * l);
	double t_3 = sqrt((0.5 + (0.5 * (1.0 / hypot(1.0, ((2.0 * (l / Om)) * hypot(sin(kx), sin(ky))))))));
	double t_4 = (-0.027777777777777776 * (Om / l)) + ((Om / l) * 0.008333333333333333);
	double t_5 = t_4 * pow(ky, 3.0);
	double tmp;
	if (kx <= -1.02e+79) {
		tmp = pow((0.5 + ((-0.5 * (Om / (t_0 * (l / (kx * kx))))) * -0.25)), 0.5);
	} else if (kx <= -2.1e-202) {
		tmp = t_3;
	} else if (kx <= -4.8e-238) {
		tmp = pow((0.5 + (-0.25 * fma(-0.5, t_2, (t_1 - t_5)))), 0.5);
	} else if (kx <= 6.5e-225) {
		tmp = t_3;
	} else {
		tmp = pow((0.5 + (-0.25 * fma(-0.5, t_2, ((t_1 - (pow(ky, 5.0) * (((Om / l) * 0.001388888888888889) + (((Om / l) * -0.0001984126984126984) + (t_4 * 0.16666666666666666))))) - t_5)))), 0.5);
	}
	return tmp;
}
function code(l, Om, kx, ky)
	return sqrt(Float64(Float64(1.0 / 2.0) * Float64(1.0 + Float64(1.0 / sqrt(Float64(1.0 + Float64((Float64(Float64(2.0 * l) / Om) ^ 2.0) * Float64((sin(kx) ^ 2.0) + (sin(ky) ^ 2.0)))))))))
end
function code(l, Om, kx, ky)
	t_0 = sin(ky) ^ 3.0
	t_1 = Float64(Float64(0.16666666666666666 * Float64(Float64(Om * ky) / l)) + Float64(Om / Float64(ky * l)))
	t_2 = Float64(Float64(kx * Float64(kx * Om)) / Float64(t_0 * l))
	t_3 = sqrt(Float64(0.5 + Float64(0.5 * Float64(1.0 / hypot(1.0, Float64(Float64(2.0 * Float64(l / Om)) * hypot(sin(kx), sin(ky))))))))
	t_4 = Float64(Float64(-0.027777777777777776 * Float64(Om / l)) + Float64(Float64(Om / l) * 0.008333333333333333))
	t_5 = Float64(t_4 * (ky ^ 3.0))
	tmp = 0.0
	if (kx <= -1.02e+79)
		tmp = Float64(0.5 + Float64(Float64(-0.5 * Float64(Om / Float64(t_0 * Float64(l / Float64(kx * kx))))) * -0.25)) ^ 0.5;
	elseif (kx <= -2.1e-202)
		tmp = t_3;
	elseif (kx <= -4.8e-238)
		tmp = Float64(0.5 + Float64(-0.25 * fma(-0.5, t_2, Float64(t_1 - t_5)))) ^ 0.5;
	elseif (kx <= 6.5e-225)
		tmp = t_3;
	else
		tmp = Float64(0.5 + Float64(-0.25 * fma(-0.5, t_2, Float64(Float64(t_1 - Float64((ky ^ 5.0) * Float64(Float64(Float64(Om / l) * 0.001388888888888889) + Float64(Float64(Float64(Om / l) * -0.0001984126984126984) + Float64(t_4 * 0.16666666666666666))))) - t_5)))) ^ 0.5;
	end
	return tmp
end
code[l_, Om_, kx_, ky_] := N[Sqrt[N[(N[(1.0 / 2.0), $MachinePrecision] * N[(1.0 + N[(1.0 / N[Sqrt[N[(1.0 + N[(N[Power[N[(N[(2.0 * l), $MachinePrecision] / Om), $MachinePrecision], 2.0], $MachinePrecision] * N[(N[Power[N[Sin[kx], $MachinePrecision], 2.0], $MachinePrecision] + N[Power[N[Sin[ky], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
code[l_, Om_, kx_, ky_] := Block[{t$95$0 = N[Power[N[Sin[ky], $MachinePrecision], 3.0], $MachinePrecision]}, Block[{t$95$1 = N[(N[(0.16666666666666666 * N[(N[(Om * ky), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] + N[(Om / N[(ky * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(kx * N[(kx * Om), $MachinePrecision]), $MachinePrecision] / N[(t$95$0 * l), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[Sqrt[N[(0.5 + N[(0.5 * N[(1.0 / N[Sqrt[1.0 ^ 2 + N[(N[(2.0 * N[(l / Om), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[Sin[kx], $MachinePrecision] ^ 2 + N[Sin[ky], $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$4 = N[(N[(-0.027777777777777776 * N[(Om / l), $MachinePrecision]), $MachinePrecision] + N[(N[(Om / l), $MachinePrecision] * 0.008333333333333333), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(t$95$4 * N[Power[ky, 3.0], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[kx, -1.02e+79], N[Power[N[(0.5 + N[(N[(-0.5 * N[(Om / N[(t$95$0 * N[(l / N[(kx * kx), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * -0.25), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision], If[LessEqual[kx, -2.1e-202], t$95$3, If[LessEqual[kx, -4.8e-238], N[Power[N[(0.5 + N[(-0.25 * N[(-0.5 * t$95$2 + N[(t$95$1 - t$95$5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision], If[LessEqual[kx, 6.5e-225], t$95$3, N[Power[N[(0.5 + N[(-0.25 * N[(-0.5 * t$95$2 + N[(N[(t$95$1 - N[(N[Power[ky, 5.0], $MachinePrecision] * N[(N[(N[(Om / l), $MachinePrecision] * 0.001388888888888889), $MachinePrecision] + N[(N[(N[(Om / l), $MachinePrecision] * -0.0001984126984126984), $MachinePrecision] + N[(t$95$4 * 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]]]]]]]]]]]
\sqrt{\frac{1}{2} \cdot \left(1 + \frac{1}{\sqrt{1 + {\left(\frac{2 \cdot \ell}{Om}\right)}^{2} \cdot \left({\sin kx}^{2} + {\sin ky}^{2}\right)}}\right)}
\begin{array}{l}
t_0 := {\sin ky}^{3}\\
t_1 := 0.16666666666666666 \cdot \frac{Om \cdot ky}{\ell} + \frac{Om}{ky \cdot \ell}\\
t_2 := \frac{kx \cdot \left(kx \cdot Om\right)}{t_0 \cdot \ell}\\
t_3 := \sqrt{0.5 + 0.5 \cdot \frac{1}{\mathsf{hypot}\left(1, \left(2 \cdot \frac{\ell}{Om}\right) \cdot \mathsf{hypot}\left(\sin kx, \sin ky\right)\right)}}\\
t_4 := -0.027777777777777776 \cdot \frac{Om}{\ell} + \frac{Om}{\ell} \cdot 0.008333333333333333\\
t_5 := t_4 \cdot {ky}^{3}\\
\mathbf{if}\;kx \leq -1.02 \cdot 10^{+79}:\\
\;\;\;\;{\left(0.5 + \left(-0.5 \cdot \frac{Om}{t_0 \cdot \frac{\ell}{kx \cdot kx}}\right) \cdot -0.25\right)}^{0.5}\\

\mathbf{elif}\;kx \leq -2.1 \cdot 10^{-202}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;kx \leq -4.8 \cdot 10^{-238}:\\
\;\;\;\;{\left(0.5 + -0.25 \cdot \mathsf{fma}\left(-0.5, t_2, t_1 - t_5\right)\right)}^{0.5}\\

\mathbf{elif}\;kx \leq 6.5 \cdot 10^{-225}:\\
\;\;\;\;t_3\\

\mathbf{else}:\\
\;\;\;\;{\left(0.5 + -0.25 \cdot \mathsf{fma}\left(-0.5, t_2, \left(t_1 - {ky}^{5} \cdot \left(\frac{Om}{\ell} \cdot 0.001388888888888889 + \left(\frac{Om}{\ell} \cdot -0.0001984126984126984 + t_4 \cdot 0.16666666666666666\right)\right)\right) - t_5\right)\right)}^{0.5}\\


\end{array}

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.

Herbie found 16 alternatives:

AlternativeAccuracySpeedup

Accuracy vs Speed

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.

Bogosity?

Bogosity

Derivation?

  1. Split input into 4 regimes
  2. if kx < -1.02000000000000006e79

    1. Initial program 3.1%

      \[\sqrt{\frac{1}{2} \cdot \left(1 + \frac{1}{\sqrt{1 + {\left(\frac{2 \cdot \ell}{Om}\right)}^{2} \cdot \left({\sin kx}^{2} + {\sin ky}^{2}\right)}}\right)} \]
    2. Simplified3.1%

      \[\leadsto \color{blue}{\sqrt{0.5 + \frac{1}{\sqrt{1 + {\left(\frac{2}{\frac{Om}{\ell}}\right)}^{2} \cdot \left({\sin kx}^{2} + {\sin ky}^{2}\right)}} \cdot 0.5}} \]
      Step-by-step derivation

      [Start]3.1%

      \[ \sqrt{\frac{1}{2} \cdot \left(1 + \frac{1}{\sqrt{1 + {\left(\frac{2 \cdot \ell}{Om}\right)}^{2} \cdot \left({\sin kx}^{2} + {\sin ky}^{2}\right)}}\right)} \]

      distribute-rgt-in [=>]3.1%

      \[ \sqrt{\color{blue}{1 \cdot \frac{1}{2} + \frac{1}{\sqrt{1 + {\left(\frac{2 \cdot \ell}{Om}\right)}^{2} \cdot \left({\sin kx}^{2} + {\sin ky}^{2}\right)}} \cdot \frac{1}{2}}} \]

      metadata-eval [=>]3.1%

      \[ \sqrt{1 \cdot \color{blue}{0.5} + \frac{1}{\sqrt{1 + {\left(\frac{2 \cdot \ell}{Om}\right)}^{2} \cdot \left({\sin kx}^{2} + {\sin ky}^{2}\right)}} \cdot \frac{1}{2}} \]

      metadata-eval [=>]3.1%

      \[ \sqrt{\color{blue}{0.5} + \frac{1}{\sqrt{1 + {\left(\frac{2 \cdot \ell}{Om}\right)}^{2} \cdot \left({\sin kx}^{2} + {\sin ky}^{2}\right)}} \cdot \frac{1}{2}} \]

      associate-/l* [=>]3.1%

      \[ \sqrt{0.5 + \frac{1}{\sqrt{1 + {\color{blue}{\left(\frac{2}{\frac{Om}{\ell}}\right)}}^{2} \cdot \left({\sin kx}^{2} + {\sin ky}^{2}\right)}} \cdot \frac{1}{2}} \]

      metadata-eval [=>]3.1%

      \[ \sqrt{0.5 + \frac{1}{\sqrt{1 + {\left(\frac{2}{\frac{Om}{\ell}}\right)}^{2} \cdot \left({\sin kx}^{2} + {\sin ky}^{2}\right)}} \cdot \color{blue}{0.5}} \]
    3. Taylor expanded in l around -inf 6.9%

      \[\leadsto \sqrt{0.5 + \color{blue}{\left(-0.5 \cdot \left(\sqrt{\frac{1}{{\sin ky}^{2} + {\sin kx}^{2}}} \cdot \frac{Om}{\ell}\right)\right)} \cdot 0.5} \]
    4. Simplified6.9%

      \[\leadsto \sqrt{0.5 + \color{blue}{\left(\left(\sqrt{\frac{1}{{\sin ky}^{2} + {\sin kx}^{2}}} \cdot \frac{Om}{\ell}\right) \cdot -0.5\right)} \cdot 0.5} \]
      Step-by-step derivation

      [Start]6.9%

      \[ \sqrt{0.5 + \left(-0.5 \cdot \left(\sqrt{\frac{1}{{\sin ky}^{2} + {\sin kx}^{2}}} \cdot \frac{Om}{\ell}\right)\right) \cdot 0.5} \]

      *-commutative [=>]6.9%

      \[ \sqrt{0.5 + \color{blue}{\left(\left(\sqrt{\frac{1}{{\sin ky}^{2} + {\sin kx}^{2}}} \cdot \frac{Om}{\ell}\right) \cdot -0.5\right)} \cdot 0.5} \]
    5. Taylor expanded in kx around 0 34.2%

      \[\leadsto \sqrt{0.5 + \left(\color{blue}{\left(-0.5 \cdot \frac{Om \cdot {kx}^{2}}{\ell \cdot {\sin ky}^{3}} + \frac{Om}{\ell \cdot \sin ky}\right)} \cdot -0.5\right) \cdot 0.5} \]
    6. Simplified36.4%

      \[\leadsto \sqrt{0.5 + \left(\color{blue}{\mathsf{fma}\left(-0.5, \frac{Om \cdot \left(kx \cdot kx\right)}{\ell \cdot {\sin ky}^{3}}, \frac{\frac{Om}{\ell}}{\sin ky}\right)} \cdot -0.5\right) \cdot 0.5} \]
      Step-by-step derivation

      [Start]34.2%

      \[ \sqrt{0.5 + \left(\left(-0.5 \cdot \frac{Om \cdot {kx}^{2}}{\ell \cdot {\sin ky}^{3}} + \frac{Om}{\ell \cdot \sin ky}\right) \cdot -0.5\right) \cdot 0.5} \]

      fma-def [=>]34.2%

      \[ \sqrt{0.5 + \left(\color{blue}{\mathsf{fma}\left(-0.5, \frac{Om \cdot {kx}^{2}}{\ell \cdot {\sin ky}^{3}}, \frac{Om}{\ell \cdot \sin ky}\right)} \cdot -0.5\right) \cdot 0.5} \]

      unpow2 [=>]34.2%

      \[ \sqrt{0.5 + \left(\mathsf{fma}\left(-0.5, \frac{Om \cdot \color{blue}{\left(kx \cdot kx\right)}}{\ell \cdot {\sin ky}^{3}}, \frac{Om}{\ell \cdot \sin ky}\right) \cdot -0.5\right) \cdot 0.5} \]

      associate-/r* [=>]36.4%

      \[ \sqrt{0.5 + \left(\mathsf{fma}\left(-0.5, \frac{Om \cdot \left(kx \cdot kx\right)}{\ell \cdot {\sin ky}^{3}}, \color{blue}{\frac{\frac{Om}{\ell}}{\sin ky}}\right) \cdot -0.5\right) \cdot 0.5} \]
    7. Taylor expanded in kx around inf 38.7%

      \[\leadsto \sqrt{0.5 + \left(\color{blue}{\left(-0.5 \cdot \frac{Om \cdot {kx}^{2}}{\ell \cdot {\sin ky}^{3}}\right)} \cdot -0.5\right) \cdot 0.5} \]
    8. Simplified36.5%

      \[\leadsto \sqrt{0.5 + \left(\color{blue}{\left(-0.5 \cdot \frac{\frac{Om}{\frac{\ell}{kx \cdot kx}}}{{\sin ky}^{3}}\right)} \cdot -0.5\right) \cdot 0.5} \]
      Step-by-step derivation

      [Start]38.7%

      \[ \sqrt{0.5 + \left(\left(-0.5 \cdot \frac{Om \cdot {kx}^{2}}{\ell \cdot {\sin ky}^{3}}\right) \cdot -0.5\right) \cdot 0.5} \]

      unpow2 [=>]38.7%

      \[ \sqrt{0.5 + \left(\left(-0.5 \cdot \frac{Om \cdot \color{blue}{\left(kx \cdot kx\right)}}{\ell \cdot {\sin ky}^{3}}\right) \cdot -0.5\right) \cdot 0.5} \]

      associate-*l* [<=]36.5%

      \[ \sqrt{0.5 + \left(\left(-0.5 \cdot \frac{\color{blue}{\left(Om \cdot kx\right) \cdot kx}}{\ell \cdot {\sin ky}^{3}}\right) \cdot -0.5\right) \cdot 0.5} \]

      associate-/r* [=>]36.5%

      \[ \sqrt{0.5 + \left(\left(-0.5 \cdot \color{blue}{\frac{\frac{\left(Om \cdot kx\right) \cdot kx}{\ell}}{{\sin ky}^{3}}}\right) \cdot -0.5\right) \cdot 0.5} \]

      associate-*l* [=>]38.7%

      \[ \sqrt{0.5 + \left(\left(-0.5 \cdot \frac{\frac{\color{blue}{Om \cdot \left(kx \cdot kx\right)}}{\ell}}{{\sin ky}^{3}}\right) \cdot -0.5\right) \cdot 0.5} \]

      unpow2 [<=]38.7%

      \[ \sqrt{0.5 + \left(\left(-0.5 \cdot \frac{\frac{Om \cdot \color{blue}{{kx}^{2}}}{\ell}}{{\sin ky}^{3}}\right) \cdot -0.5\right) \cdot 0.5} \]

      associate-/l* [=>]36.5%

      \[ \sqrt{0.5 + \left(\left(-0.5 \cdot \frac{\color{blue}{\frac{Om}{\frac{\ell}{{kx}^{2}}}}}{{\sin ky}^{3}}\right) \cdot -0.5\right) \cdot 0.5} \]

      unpow2 [=>]36.5%

      \[ \sqrt{0.5 + \left(\left(-0.5 \cdot \frac{\frac{Om}{\frac{\ell}{\color{blue}{kx \cdot kx}}}}{{\sin ky}^{3}}\right) \cdot -0.5\right) \cdot 0.5} \]
    9. Applied egg-rr95.6%

      \[\leadsto \color{blue}{{\left(0.5 + \left(-0.5 \cdot \frac{Om}{{\sin ky}^{3} \cdot \frac{\ell}{kx \cdot kx}}\right) \cdot -0.25\right)}^{0.5}} \]
      Step-by-step derivation

      [Start]36.5%

      \[ \sqrt{0.5 + \left(\left(-0.5 \cdot \frac{\frac{Om}{\frac{\ell}{kx \cdot kx}}}{{\sin ky}^{3}}\right) \cdot -0.5\right) \cdot 0.5} \]

      pow1/2 [=>]93.4%

      \[ \color{blue}{{\left(0.5 + \left(\left(-0.5 \cdot \frac{\frac{Om}{\frac{\ell}{kx \cdot kx}}}{{\sin ky}^{3}}\right) \cdot -0.5\right) \cdot 0.5\right)}^{0.5}} \]

      associate-*l* [=>]93.4%

      \[ {\left(0.5 + \color{blue}{\left(-0.5 \cdot \frac{\frac{Om}{\frac{\ell}{kx \cdot kx}}}{{\sin ky}^{3}}\right) \cdot \left(-0.5 \cdot 0.5\right)}\right)}^{0.5} \]

      associate-/l/ [=>]95.6%

      \[ {\left(0.5 + \left(-0.5 \cdot \color{blue}{\frac{Om}{{\sin ky}^{3} \cdot \frac{\ell}{kx \cdot kx}}}\right) \cdot \left(-0.5 \cdot 0.5\right)\right)}^{0.5} \]

      metadata-eval [=>]95.6%

      \[ {\left(0.5 + \left(-0.5 \cdot \frac{Om}{{\sin ky}^{3} \cdot \frac{\ell}{kx \cdot kx}}\right) \cdot \color{blue}{-0.25}\right)}^{0.5} \]

    if -1.02000000000000006e79 < kx < -2.09999999999999985e-202 or -4.7999999999999997e-238 < kx < 6.5000000000000005e-225

    1. Initial program 60.6%

      \[\sqrt{\frac{1}{2} \cdot \left(1 + \frac{1}{\sqrt{1 + {\left(\frac{2 \cdot \ell}{Om}\right)}^{2} \cdot \left({\sin kx}^{2} + {\sin ky}^{2}\right)}}\right)} \]
    2. Simplified60.6%

      \[\leadsto \color{blue}{\sqrt{0.5 + \frac{1}{\sqrt{1 + {\left(\frac{2}{\frac{Om}{\ell}}\right)}^{2} \cdot \left({\sin kx}^{2} + {\sin ky}^{2}\right)}} \cdot 0.5}} \]
      Step-by-step derivation

      [Start]60.6%

      \[ \sqrt{\frac{1}{2} \cdot \left(1 + \frac{1}{\sqrt{1 + {\left(\frac{2 \cdot \ell}{Om}\right)}^{2} \cdot \left({\sin kx}^{2} + {\sin ky}^{2}\right)}}\right)} \]

      distribute-rgt-in [=>]60.6%

      \[ \sqrt{\color{blue}{1 \cdot \frac{1}{2} + \frac{1}{\sqrt{1 + {\left(\frac{2 \cdot \ell}{Om}\right)}^{2} \cdot \left({\sin kx}^{2} + {\sin ky}^{2}\right)}} \cdot \frac{1}{2}}} \]

      metadata-eval [=>]60.6%

      \[ \sqrt{1 \cdot \color{blue}{0.5} + \frac{1}{\sqrt{1 + {\left(\frac{2 \cdot \ell}{Om}\right)}^{2} \cdot \left({\sin kx}^{2} + {\sin ky}^{2}\right)}} \cdot \frac{1}{2}} \]

      metadata-eval [=>]60.6%

      \[ \sqrt{\color{blue}{0.5} + \frac{1}{\sqrt{1 + {\left(\frac{2 \cdot \ell}{Om}\right)}^{2} \cdot \left({\sin kx}^{2} + {\sin ky}^{2}\right)}} \cdot \frac{1}{2}} \]

      associate-/l* [=>]60.6%

      \[ \sqrt{0.5 + \frac{1}{\sqrt{1 + {\color{blue}{\left(\frac{2}{\frac{Om}{\ell}}\right)}}^{2} \cdot \left({\sin kx}^{2} + {\sin ky}^{2}\right)}} \cdot \frac{1}{2}} \]

      metadata-eval [=>]60.6%

      \[ \sqrt{0.5 + \frac{1}{\sqrt{1 + {\left(\frac{2}{\frac{Om}{\ell}}\right)}^{2} \cdot \left({\sin kx}^{2} + {\sin ky}^{2}\right)}} \cdot \color{blue}{0.5}} \]
    3. Applied egg-rr66.6%

      \[\leadsto \sqrt{0.5 + \frac{1}{\color{blue}{\mathsf{hypot}\left(1, \left(2 \cdot \frac{\ell}{Om}\right) \cdot \mathsf{hypot}\left(\sin kx, \sin ky\right)\right)}} \cdot 0.5} \]
      Step-by-step derivation

      [Start]60.6%

      \[ \sqrt{0.5 + \frac{1}{\sqrt{1 + {\left(\frac{2}{\frac{Om}{\ell}}\right)}^{2} \cdot \left({\sin kx}^{2} + {\sin ky}^{2}\right)}} \cdot 0.5} \]

      add-sqr-sqrt [=>]60.6%

      \[ \sqrt{0.5 + \frac{1}{\sqrt{1 + \color{blue}{\sqrt{{\left(\frac{2}{\frac{Om}{\ell}}\right)}^{2} \cdot \left({\sin kx}^{2} + {\sin ky}^{2}\right)} \cdot \sqrt{{\left(\frac{2}{\frac{Om}{\ell}}\right)}^{2} \cdot \left({\sin kx}^{2} + {\sin ky}^{2}\right)}}}} \cdot 0.5} \]

      hypot-1-def [=>]60.6%

      \[ \sqrt{0.5 + \frac{1}{\color{blue}{\mathsf{hypot}\left(1, \sqrt{{\left(\frac{2}{\frac{Om}{\ell}}\right)}^{2} \cdot \left({\sin kx}^{2} + {\sin ky}^{2}\right)}\right)}} \cdot 0.5} \]

      sqrt-prod [=>]60.6%

      \[ \sqrt{0.5 + \frac{1}{\mathsf{hypot}\left(1, \color{blue}{\sqrt{{\left(\frac{2}{\frac{Om}{\ell}}\right)}^{2}} \cdot \sqrt{{\sin kx}^{2} + {\sin ky}^{2}}}\right)} \cdot 0.5} \]

      unpow2 [=>]60.6%

      \[ \sqrt{0.5 + \frac{1}{\mathsf{hypot}\left(1, \sqrt{\color{blue}{\frac{2}{\frac{Om}{\ell}} \cdot \frac{2}{\frac{Om}{\ell}}}} \cdot \sqrt{{\sin kx}^{2} + {\sin ky}^{2}}\right)} \cdot 0.5} \]

      sqrt-prod [=>]38.2%

      \[ \sqrt{0.5 + \frac{1}{\mathsf{hypot}\left(1, \color{blue}{\left(\sqrt{\frac{2}{\frac{Om}{\ell}}} \cdot \sqrt{\frac{2}{\frac{Om}{\ell}}}\right)} \cdot \sqrt{{\sin kx}^{2} + {\sin ky}^{2}}\right)} \cdot 0.5} \]

      add-sqr-sqrt [<=]65.0%

      \[ \sqrt{0.5 + \frac{1}{\mathsf{hypot}\left(1, \color{blue}{\frac{2}{\frac{Om}{\ell}}} \cdot \sqrt{{\sin kx}^{2} + {\sin ky}^{2}}\right)} \cdot 0.5} \]

      div-inv [=>]65.0%

      \[ \sqrt{0.5 + \frac{1}{\mathsf{hypot}\left(1, \color{blue}{\left(2 \cdot \frac{1}{\frac{Om}{\ell}}\right)} \cdot \sqrt{{\sin kx}^{2} + {\sin ky}^{2}}\right)} \cdot 0.5} \]

      clear-num [<=]65.0%

      \[ \sqrt{0.5 + \frac{1}{\mathsf{hypot}\left(1, \left(2 \cdot \color{blue}{\frac{\ell}{Om}}\right) \cdot \sqrt{{\sin kx}^{2} + {\sin ky}^{2}}\right)} \cdot 0.5} \]

      unpow2 [=>]65.0%

      \[ \sqrt{0.5 + \frac{1}{\mathsf{hypot}\left(1, \left(2 \cdot \frac{\ell}{Om}\right) \cdot \sqrt{\color{blue}{\sin kx \cdot \sin kx} + {\sin ky}^{2}}\right)} \cdot 0.5} \]

      unpow2 [=>]65.0%

      \[ \sqrt{0.5 + \frac{1}{\mathsf{hypot}\left(1, \left(2 \cdot \frac{\ell}{Om}\right) \cdot \sqrt{\sin kx \cdot \sin kx + \color{blue}{\sin ky \cdot \sin ky}}\right)} \cdot 0.5} \]

      hypot-def [=>]66.6%

      \[ \sqrt{0.5 + \frac{1}{\mathsf{hypot}\left(1, \left(2 \cdot \frac{\ell}{Om}\right) \cdot \color{blue}{\mathsf{hypot}\left(\sin kx, \sin ky\right)}\right)} \cdot 0.5} \]

    if -2.09999999999999985e-202 < kx < -4.7999999999999997e-238

    1. Initial program 41.9%

      \[\sqrt{\frac{1}{2} \cdot \left(1 + \frac{1}{\sqrt{1 + {\left(\frac{2 \cdot \ell}{Om}\right)}^{2} \cdot \left({\sin kx}^{2} + {\sin ky}^{2}\right)}}\right)} \]
    2. Simplified41.9%

      \[\leadsto \color{blue}{\sqrt{0.5 + \frac{1}{\sqrt{1 + {\left(\frac{2}{\frac{Om}{\ell}}\right)}^{2} \cdot \left({\sin kx}^{2} + {\sin ky}^{2}\right)}} \cdot 0.5}} \]
      Step-by-step derivation

      [Start]41.9%

      \[ \sqrt{\frac{1}{2} \cdot \left(1 + \frac{1}{\sqrt{1 + {\left(\frac{2 \cdot \ell}{Om}\right)}^{2} \cdot \left({\sin kx}^{2} + {\sin ky}^{2}\right)}}\right)} \]

      distribute-rgt-in [=>]41.9%

      \[ \sqrt{\color{blue}{1 \cdot \frac{1}{2} + \frac{1}{\sqrt{1 + {\left(\frac{2 \cdot \ell}{Om}\right)}^{2} \cdot \left({\sin kx}^{2} + {\sin ky}^{2}\right)}} \cdot \frac{1}{2}}} \]

      metadata-eval [=>]41.9%

      \[ \sqrt{1 \cdot \color{blue}{0.5} + \frac{1}{\sqrt{1 + {\left(\frac{2 \cdot \ell}{Om}\right)}^{2} \cdot \left({\sin kx}^{2} + {\sin ky}^{2}\right)}} \cdot \frac{1}{2}} \]

      metadata-eval [=>]41.9%

      \[ \sqrt{\color{blue}{0.5} + \frac{1}{\sqrt{1 + {\left(\frac{2 \cdot \ell}{Om}\right)}^{2} \cdot \left({\sin kx}^{2} + {\sin ky}^{2}\right)}} \cdot \frac{1}{2}} \]

      associate-/l* [=>]41.9%

      \[ \sqrt{0.5 + \frac{1}{\sqrt{1 + {\color{blue}{\left(\frac{2}{\frac{Om}{\ell}}\right)}}^{2} \cdot \left({\sin kx}^{2} + {\sin ky}^{2}\right)}} \cdot \frac{1}{2}} \]

      metadata-eval [=>]41.9%

      \[ \sqrt{0.5 + \frac{1}{\sqrt{1 + {\left(\frac{2}{\frac{Om}{\ell}}\right)}^{2} \cdot \left({\sin kx}^{2} + {\sin ky}^{2}\right)}} \cdot \color{blue}{0.5}} \]
    3. Taylor expanded in l around -inf 40.6%

      \[\leadsto \sqrt{0.5 + \color{blue}{\left(-0.5 \cdot \left(\sqrt{\frac{1}{{\sin ky}^{2} + {\sin kx}^{2}}} \cdot \frac{Om}{\ell}\right)\right)} \cdot 0.5} \]
    4. Simplified40.6%

      \[\leadsto \sqrt{0.5 + \color{blue}{\left(\left(\sqrt{\frac{1}{{\sin ky}^{2} + {\sin kx}^{2}}} \cdot \frac{Om}{\ell}\right) \cdot -0.5\right)} \cdot 0.5} \]
      Step-by-step derivation

      [Start]40.6%

      \[ \sqrt{0.5 + \left(-0.5 \cdot \left(\sqrt{\frac{1}{{\sin ky}^{2} + {\sin kx}^{2}}} \cdot \frac{Om}{\ell}\right)\right) \cdot 0.5} \]

      *-commutative [=>]40.6%

      \[ \sqrt{0.5 + \color{blue}{\left(\left(\sqrt{\frac{1}{{\sin ky}^{2} + {\sin kx}^{2}}} \cdot \frac{Om}{\ell}\right) \cdot -0.5\right)} \cdot 0.5} \]
    5. Taylor expanded in kx around 0 41.3%

      \[\leadsto \sqrt{0.5 + \left(\color{blue}{\left(-0.5 \cdot \frac{Om \cdot {kx}^{2}}{\ell \cdot {\sin ky}^{3}} + \frac{Om}{\ell \cdot \sin ky}\right)} \cdot -0.5\right) \cdot 0.5} \]
    6. Simplified41.3%

      \[\leadsto \sqrt{0.5 + \left(\color{blue}{\mathsf{fma}\left(-0.5, \frac{Om \cdot \left(kx \cdot kx\right)}{\ell \cdot {\sin ky}^{3}}, \frac{\frac{Om}{\ell}}{\sin ky}\right)} \cdot -0.5\right) \cdot 0.5} \]
      Step-by-step derivation

      [Start]41.3%

      \[ \sqrt{0.5 + \left(\left(-0.5 \cdot \frac{Om \cdot {kx}^{2}}{\ell \cdot {\sin ky}^{3}} + \frac{Om}{\ell \cdot \sin ky}\right) \cdot -0.5\right) \cdot 0.5} \]

      fma-def [=>]41.3%

      \[ \sqrt{0.5 + \left(\color{blue}{\mathsf{fma}\left(-0.5, \frac{Om \cdot {kx}^{2}}{\ell \cdot {\sin ky}^{3}}, \frac{Om}{\ell \cdot \sin ky}\right)} \cdot -0.5\right) \cdot 0.5} \]

      unpow2 [=>]41.3%

      \[ \sqrt{0.5 + \left(\mathsf{fma}\left(-0.5, \frac{Om \cdot \color{blue}{\left(kx \cdot kx\right)}}{\ell \cdot {\sin ky}^{3}}, \frac{Om}{\ell \cdot \sin ky}\right) \cdot -0.5\right) \cdot 0.5} \]

      associate-/r* [=>]41.3%

      \[ \sqrt{0.5 + \left(\mathsf{fma}\left(-0.5, \frac{Om \cdot \left(kx \cdot kx\right)}{\ell \cdot {\sin ky}^{3}}, \color{blue}{\frac{\frac{Om}{\ell}}{\sin ky}}\right) \cdot -0.5\right) \cdot 0.5} \]
    7. Applied egg-rr41.3%

      \[\leadsto \color{blue}{{\left(0.5 + \mathsf{fma}\left(-0.5, \frac{\left(Om \cdot kx\right) \cdot kx}{\ell \cdot {\sin ky}^{3}}, \frac{\frac{Om}{\ell}}{\sin ky}\right) \cdot -0.25\right)}^{0.5}} \]
      Step-by-step derivation

      [Start]41.3%

      \[ \sqrt{0.5 + \left(\mathsf{fma}\left(-0.5, \frac{Om \cdot \left(kx \cdot kx\right)}{\ell \cdot {\sin ky}^{3}}, \frac{\frac{Om}{\ell}}{\sin ky}\right) \cdot -0.5\right) \cdot 0.5} \]

      pow1/2 [=>]41.3%

      \[ \color{blue}{{\left(0.5 + \left(\mathsf{fma}\left(-0.5, \frac{Om \cdot \left(kx \cdot kx\right)}{\ell \cdot {\sin ky}^{3}}, \frac{\frac{Om}{\ell}}{\sin ky}\right) \cdot -0.5\right) \cdot 0.5\right)}^{0.5}} \]

      associate-*l* [=>]41.3%

      \[ {\left(0.5 + \color{blue}{\mathsf{fma}\left(-0.5, \frac{Om \cdot \left(kx \cdot kx\right)}{\ell \cdot {\sin ky}^{3}}, \frac{\frac{Om}{\ell}}{\sin ky}\right) \cdot \left(-0.5 \cdot 0.5\right)}\right)}^{0.5} \]

      associate-*r* [=>]41.3%

      \[ {\left(0.5 + \mathsf{fma}\left(-0.5, \frac{\color{blue}{\left(Om \cdot kx\right) \cdot kx}}{\ell \cdot {\sin ky}^{3}}, \frac{\frac{Om}{\ell}}{\sin ky}\right) \cdot \left(-0.5 \cdot 0.5\right)\right)}^{0.5} \]

      metadata-eval [=>]41.3%

      \[ {\left(0.5 + \mathsf{fma}\left(-0.5, \frac{\left(Om \cdot kx\right) \cdot kx}{\ell \cdot {\sin ky}^{3}}, \frac{\frac{Om}{\ell}}{\sin ky}\right) \cdot \color{blue}{-0.25}\right)}^{0.5} \]
    8. Taylor expanded in ky around 0 100.0%

      \[\leadsto {\left(0.5 + \mathsf{fma}\left(-0.5, \frac{\left(Om \cdot kx\right) \cdot kx}{\ell \cdot {\sin ky}^{3}}, \color{blue}{-1 \cdot \left(\left(-0.027777777777777776 \cdot \frac{Om}{\ell} + 0.008333333333333333 \cdot \frac{Om}{\ell}\right) \cdot {ky}^{3}\right) + \left(0.16666666666666666 \cdot \frac{Om \cdot ky}{\ell} + \frac{Om}{\ell \cdot ky}\right)}\right) \cdot -0.25\right)}^{0.5} \]

    if 6.5000000000000005e-225 < kx

    1. Initial program 34.6%

      \[\sqrt{\frac{1}{2} \cdot \left(1 + \frac{1}{\sqrt{1 + {\left(\frac{2 \cdot \ell}{Om}\right)}^{2} \cdot \left({\sin kx}^{2} + {\sin ky}^{2}\right)}}\right)} \]
    2. Simplified34.6%

      \[\leadsto \color{blue}{\sqrt{0.5 + \frac{1}{\sqrt{1 + {\left(\frac{2}{\frac{Om}{\ell}}\right)}^{2} \cdot \left({\sin kx}^{2} + {\sin ky}^{2}\right)}} \cdot 0.5}} \]
      Step-by-step derivation

      [Start]34.6%

      \[ \sqrt{\frac{1}{2} \cdot \left(1 + \frac{1}{\sqrt{1 + {\left(\frac{2 \cdot \ell}{Om}\right)}^{2} \cdot \left({\sin kx}^{2} + {\sin ky}^{2}\right)}}\right)} \]

      distribute-rgt-in [=>]34.6%

      \[ \sqrt{\color{blue}{1 \cdot \frac{1}{2} + \frac{1}{\sqrt{1 + {\left(\frac{2 \cdot \ell}{Om}\right)}^{2} \cdot \left({\sin kx}^{2} + {\sin ky}^{2}\right)}} \cdot \frac{1}{2}}} \]

      metadata-eval [=>]34.6%

      \[ \sqrt{1 \cdot \color{blue}{0.5} + \frac{1}{\sqrt{1 + {\left(\frac{2 \cdot \ell}{Om}\right)}^{2} \cdot \left({\sin kx}^{2} + {\sin ky}^{2}\right)}} \cdot \frac{1}{2}} \]

      metadata-eval [=>]34.6%

      \[ \sqrt{\color{blue}{0.5} + \frac{1}{\sqrt{1 + {\left(\frac{2 \cdot \ell}{Om}\right)}^{2} \cdot \left({\sin kx}^{2} + {\sin ky}^{2}\right)}} \cdot \frac{1}{2}} \]

      associate-/l* [=>]34.6%

      \[ \sqrt{0.5 + \frac{1}{\sqrt{1 + {\color{blue}{\left(\frac{2}{\frac{Om}{\ell}}\right)}}^{2} \cdot \left({\sin kx}^{2} + {\sin ky}^{2}\right)}} \cdot \frac{1}{2}} \]

      metadata-eval [=>]34.6%

      \[ \sqrt{0.5 + \frac{1}{\sqrt{1 + {\left(\frac{2}{\frac{Om}{\ell}}\right)}^{2} \cdot \left({\sin kx}^{2} + {\sin ky}^{2}\right)}} \cdot \color{blue}{0.5}} \]
    3. Taylor expanded in l around -inf 20.8%

      \[\leadsto \sqrt{0.5 + \color{blue}{\left(-0.5 \cdot \left(\sqrt{\frac{1}{{\sin ky}^{2} + {\sin kx}^{2}}} \cdot \frac{Om}{\ell}\right)\right)} \cdot 0.5} \]
    4. Simplified20.8%

      \[\leadsto \sqrt{0.5 + \color{blue}{\left(\left(\sqrt{\frac{1}{{\sin ky}^{2} + {\sin kx}^{2}}} \cdot \frac{Om}{\ell}\right) \cdot -0.5\right)} \cdot 0.5} \]
      Step-by-step derivation

      [Start]20.8%

      \[ \sqrt{0.5 + \left(-0.5 \cdot \left(\sqrt{\frac{1}{{\sin ky}^{2} + {\sin kx}^{2}}} \cdot \frac{Om}{\ell}\right)\right) \cdot 0.5} \]

      *-commutative [=>]20.8%

      \[ \sqrt{0.5 + \color{blue}{\left(\left(\sqrt{\frac{1}{{\sin ky}^{2} + {\sin kx}^{2}}} \cdot \frac{Om}{\ell}\right) \cdot -0.5\right)} \cdot 0.5} \]
    5. Taylor expanded in kx around 0 27.5%

      \[\leadsto \sqrt{0.5 + \left(\color{blue}{\left(-0.5 \cdot \frac{Om \cdot {kx}^{2}}{\ell \cdot {\sin ky}^{3}} + \frac{Om}{\ell \cdot \sin ky}\right)} \cdot -0.5\right) \cdot 0.5} \]
    6. Simplified27.6%

      \[\leadsto \sqrt{0.5 + \left(\color{blue}{\mathsf{fma}\left(-0.5, \frac{Om \cdot \left(kx \cdot kx\right)}{\ell \cdot {\sin ky}^{3}}, \frac{\frac{Om}{\ell}}{\sin ky}\right)} \cdot -0.5\right) \cdot 0.5} \]
      Step-by-step derivation

      [Start]27.5%

      \[ \sqrt{0.5 + \left(\left(-0.5 \cdot \frac{Om \cdot {kx}^{2}}{\ell \cdot {\sin ky}^{3}} + \frac{Om}{\ell \cdot \sin ky}\right) \cdot -0.5\right) \cdot 0.5} \]

      fma-def [=>]27.5%

      \[ \sqrt{0.5 + \left(\color{blue}{\mathsf{fma}\left(-0.5, \frac{Om \cdot {kx}^{2}}{\ell \cdot {\sin ky}^{3}}, \frac{Om}{\ell \cdot \sin ky}\right)} \cdot -0.5\right) \cdot 0.5} \]

      unpow2 [=>]27.5%

      \[ \sqrt{0.5 + \left(\mathsf{fma}\left(-0.5, \frac{Om \cdot \color{blue}{\left(kx \cdot kx\right)}}{\ell \cdot {\sin ky}^{3}}, \frac{Om}{\ell \cdot \sin ky}\right) \cdot -0.5\right) \cdot 0.5} \]

      associate-/r* [=>]27.6%

      \[ \sqrt{0.5 + \left(\mathsf{fma}\left(-0.5, \frac{Om \cdot \left(kx \cdot kx\right)}{\ell \cdot {\sin ky}^{3}}, \color{blue}{\frac{\frac{Om}{\ell}}{\sin ky}}\right) \cdot -0.5\right) \cdot 0.5} \]
    7. Applied egg-rr40.0%

      \[\leadsto \color{blue}{{\left(0.5 + \mathsf{fma}\left(-0.5, \frac{\left(Om \cdot kx\right) \cdot kx}{\ell \cdot {\sin ky}^{3}}, \frac{\frac{Om}{\ell}}{\sin ky}\right) \cdot -0.25\right)}^{0.5}} \]
      Step-by-step derivation

      [Start]27.6%

      \[ \sqrt{0.5 + \left(\mathsf{fma}\left(-0.5, \frac{Om \cdot \left(kx \cdot kx\right)}{\ell \cdot {\sin ky}^{3}}, \frac{\frac{Om}{\ell}}{\sin ky}\right) \cdot -0.5\right) \cdot 0.5} \]

      pow1/2 [=>]43.2%

      \[ \color{blue}{{\left(0.5 + \left(\mathsf{fma}\left(-0.5, \frac{Om \cdot \left(kx \cdot kx\right)}{\ell \cdot {\sin ky}^{3}}, \frac{\frac{Om}{\ell}}{\sin ky}\right) \cdot -0.5\right) \cdot 0.5\right)}^{0.5}} \]

      associate-*l* [=>]43.2%

      \[ {\left(0.5 + \color{blue}{\mathsf{fma}\left(-0.5, \frac{Om \cdot \left(kx \cdot kx\right)}{\ell \cdot {\sin ky}^{3}}, \frac{\frac{Om}{\ell}}{\sin ky}\right) \cdot \left(-0.5 \cdot 0.5\right)}\right)}^{0.5} \]

      associate-*r* [=>]40.0%

      \[ {\left(0.5 + \mathsf{fma}\left(-0.5, \frac{\color{blue}{\left(Om \cdot kx\right) \cdot kx}}{\ell \cdot {\sin ky}^{3}}, \frac{\frac{Om}{\ell}}{\sin ky}\right) \cdot \left(-0.5 \cdot 0.5\right)\right)}^{0.5} \]

      metadata-eval [=>]40.0%

      \[ {\left(0.5 + \mathsf{fma}\left(-0.5, \frac{\left(Om \cdot kx\right) \cdot kx}{\ell \cdot {\sin ky}^{3}}, \frac{\frac{Om}{\ell}}{\sin ky}\right) \cdot \color{blue}{-0.25}\right)}^{0.5} \]
    8. Taylor expanded in ky around 0 51.8%

      \[\leadsto {\left(0.5 + \mathsf{fma}\left(-0.5, \frac{\left(Om \cdot kx\right) \cdot kx}{\ell \cdot {\sin ky}^{3}}, \color{blue}{-1 \cdot \left(\left(-0.027777777777777776 \cdot \frac{Om}{\ell} + 0.008333333333333333 \cdot \frac{Om}{\ell}\right) \cdot {ky}^{3}\right) + \left(-1 \cdot \left({ky}^{5} \cdot \left(0.001388888888888889 \cdot \frac{Om}{\ell} + \left(-0.0001984126984126984 \cdot \frac{Om}{\ell} + 0.16666666666666666 \cdot \left(-0.027777777777777776 \cdot \frac{Om}{\ell} + 0.008333333333333333 \cdot \frac{Om}{\ell}\right)\right)\right)\right) + \left(0.16666666666666666 \cdot \frac{Om \cdot ky}{\ell} + \frac{Om}{\ell \cdot ky}\right)\right)}\right) \cdot -0.25\right)}^{0.5} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification65.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;kx \leq -1.02 \cdot 10^{+79}:\\ \;\;\;\;{\left(0.5 + \left(-0.5 \cdot \frac{Om}{{\sin ky}^{3} \cdot \frac{\ell}{kx \cdot kx}}\right) \cdot -0.25\right)}^{0.5}\\ \mathbf{elif}\;kx \leq -2.1 \cdot 10^{-202}:\\ \;\;\;\;\sqrt{0.5 + 0.5 \cdot \frac{1}{\mathsf{hypot}\left(1, \left(2 \cdot \frac{\ell}{Om}\right) \cdot \mathsf{hypot}\left(\sin kx, \sin ky\right)\right)}}\\ \mathbf{elif}\;kx \leq -4.8 \cdot 10^{-238}:\\ \;\;\;\;{\left(0.5 + -0.25 \cdot \mathsf{fma}\left(-0.5, \frac{kx \cdot \left(kx \cdot Om\right)}{{\sin ky}^{3} \cdot \ell}, \left(0.16666666666666666 \cdot \frac{Om \cdot ky}{\ell} + \frac{Om}{ky \cdot \ell}\right) - \left(-0.027777777777777776 \cdot \frac{Om}{\ell} + \frac{Om}{\ell} \cdot 0.008333333333333333\right) \cdot {ky}^{3}\right)\right)}^{0.5}\\ \mathbf{elif}\;kx \leq 6.5 \cdot 10^{-225}:\\ \;\;\;\;\sqrt{0.5 + 0.5 \cdot \frac{1}{\mathsf{hypot}\left(1, \left(2 \cdot \frac{\ell}{Om}\right) \cdot \mathsf{hypot}\left(\sin kx, \sin ky\right)\right)}}\\ \mathbf{else}:\\ \;\;\;\;{\left(0.5 + -0.25 \cdot \mathsf{fma}\left(-0.5, \frac{kx \cdot \left(kx \cdot Om\right)}{{\sin ky}^{3} \cdot \ell}, \left(\left(0.16666666666666666 \cdot \frac{Om \cdot ky}{\ell} + \frac{Om}{ky \cdot \ell}\right) - {ky}^{5} \cdot \left(\frac{Om}{\ell} \cdot 0.001388888888888889 + \left(\frac{Om}{\ell} \cdot -0.0001984126984126984 + \left(-0.027777777777777776 \cdot \frac{Om}{\ell} + \frac{Om}{\ell} \cdot 0.008333333333333333\right) \cdot 0.16666666666666666\right)\right)\right) - \left(-0.027777777777777776 \cdot \frac{Om}{\ell} + \frac{Om}{\ell} \cdot 0.008333333333333333\right) \cdot {ky}^{3}\right)\right)}^{0.5}\\ \end{array} \]

Alternatives

Alternative 1
Accuracy73.5%
Cost43600
\[\begin{array}{l} t_0 := {\sin ky}^{3}\\ t_1 := 0.16666666666666666 \cdot \frac{Om \cdot ky}{\ell} + \frac{Om}{ky \cdot \ell}\\ t_2 := \frac{kx \cdot \left(kx \cdot Om\right)}{t_0 \cdot \ell}\\ t_3 := \sqrt{0.5 + 0.5 \cdot \frac{1}{\mathsf{hypot}\left(1, \left(2 \cdot \frac{\ell}{Om}\right) \cdot \mathsf{hypot}\left(\sin kx, \sin ky\right)\right)}}\\ t_4 := -0.027777777777777776 \cdot \frac{Om}{\ell} + \frac{Om}{\ell} \cdot 0.008333333333333333\\ t_5 := t_4 \cdot {ky}^{3}\\ \mathbf{if}\;kx \leq -1.02 \cdot 10^{+79}:\\ \;\;\;\;{\left(0.5 + \left(-0.5 \cdot \frac{Om}{t_0 \cdot \frac{\ell}{kx \cdot kx}}\right) \cdot -0.25\right)}^{0.5}\\ \mathbf{elif}\;kx \leq -2.1 \cdot 10^{-202}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;kx \leq -4.8 \cdot 10^{-238}:\\ \;\;\;\;{\left(0.5 + -0.25 \cdot \mathsf{fma}\left(-0.5, t_2, t_1 - t_5\right)\right)}^{0.5}\\ \mathbf{elif}\;kx \leq 6.5 \cdot 10^{-225}:\\ \;\;\;\;t_3\\ \mathbf{else}:\\ \;\;\;\;{\left(0.5 + -0.25 \cdot \mathsf{fma}\left(-0.5, t_2, \left(t_1 - {ky}^{5} \cdot \left(\frac{Om}{\ell} \cdot 0.001388888888888889 + \left(\frac{Om}{\ell} \cdot -0.0001984126984126984 + t_4 \cdot 0.16666666666666666\right)\right)\right) - t_5\right)\right)}^{0.5}\\ \end{array} \]
Alternative 2
Accuracy73.3%
Cost35345
\[\begin{array}{l} t_0 := {\sin ky}^{3}\\ \mathbf{if}\;kx \leq -1.02 \cdot 10^{+79}:\\ \;\;\;\;{\left(0.5 + \left(-0.5 \cdot \frac{Om}{t_0 \cdot \frac{\ell}{kx \cdot kx}}\right) \cdot -0.25\right)}^{0.5}\\ \mathbf{elif}\;kx \leq -5.5 \cdot 10^{-203} \lor \neg \left(kx \leq -4.8 \cdot 10^{-238}\right) \land kx \leq 6.5 \cdot 10^{-225}:\\ \;\;\;\;\sqrt{0.5 + 0.5 \cdot \frac{1}{\mathsf{hypot}\left(1, \left(2 \cdot \frac{\ell}{Om}\right) \cdot \mathsf{hypot}\left(\sin kx, \sin ky\right)\right)}}\\ \mathbf{else}:\\ \;\;\;\;{\left(0.5 + -0.25 \cdot \mathsf{fma}\left(-0.5, \frac{kx \cdot \left(kx \cdot Om\right)}{t_0 \cdot \ell}, \left(0.16666666666666666 \cdot \frac{Om \cdot ky}{\ell} + \frac{Om}{ky \cdot \ell}\right) - \left(-0.027777777777777776 \cdot \frac{Om}{\ell} + \frac{Om}{\ell} \cdot 0.008333333333333333\right) \cdot {ky}^{3}\right)\right)}^{0.5}\\ \end{array} \]
Alternative 3
Accuracy33.7%
Cost33616
\[\begin{array}{l} t_0 := \sqrt{0.5 + 0.5 \cdot \left(\frac{0.5}{\ell} \cdot \left(\left(kx \cdot Om\right) \cdot 0.16666666666666666 + \frac{Om}{kx}\right)\right)}\\ \mathbf{if}\;\sin kx \leq -5 \cdot 10^{-64}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;\sin kx \leq -4 \cdot 10^{-200}:\\ \;\;\;\;1\\ \mathbf{elif}\;\sin kx \leq -2 \cdot 10^{-223}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;\sin kx \leq 0.1:\\ \;\;\;\;1\\ \mathbf{else}:\\ \;\;\;\;\sqrt{0.5 + \left(0.041666666666666664 \cdot \frac{kx \cdot Om}{\ell} + 0.25 \cdot \frac{Om}{kx \cdot \ell}\right)}\\ \end{array} \]
Alternative 4
Accuracy71.1%
Cost33489
\[\begin{array}{l} t_0 := {\sin ky}^{3}\\ \mathbf{if}\;kx \leq -1.02 \cdot 10^{+79}:\\ \;\;\;\;{\left(0.5 + \left(-0.5 \cdot \frac{Om}{t_0 \cdot \frac{\ell}{kx \cdot kx}}\right) \cdot -0.25\right)}^{0.5}\\ \mathbf{elif}\;kx \leq -2.6 \cdot 10^{-198} \lor \neg \left(kx \leq -3.8 \cdot 10^{-231}\right) \land kx \leq 6.5 \cdot 10^{-38}:\\ \;\;\;\;\sqrt{0.5 + 0.5 \cdot \frac{1}{\mathsf{hypot}\left(1, \left(2 \cdot \frac{\ell}{Om}\right) \cdot \mathsf{hypot}\left(\sin kx, \sin ky\right)\right)}}\\ \mathbf{else}:\\ \;\;\;\;{\left(0.5 + -0.25 \cdot \mathsf{fma}\left(-0.5, \frac{kx \cdot \left(kx \cdot Om\right)}{t_0 \cdot \ell}, 0.16666666666666666 \cdot \frac{Om \cdot ky}{\ell} + \frac{Om}{ky \cdot \ell}\right)\right)}^{0.5}\\ \end{array} \]
Alternative 5
Accuracy68.8%
Cost27985
\[\begin{array}{l} t_0 := {\sin ky}^{3}\\ \mathbf{if}\;kx \leq -1.02 \cdot 10^{+79}:\\ \;\;\;\;{\left(0.5 + \left(-0.5 \cdot \frac{Om}{t_0 \cdot \frac{\ell}{kx \cdot kx}}\right) \cdot -0.25\right)}^{0.5}\\ \mathbf{elif}\;kx \leq -2.6 \cdot 10^{-198}:\\ \;\;\;\;\sqrt{0.5 + \frac{0.5}{\mathsf{hypot}\left(1, \left(2 \cdot \frac{\ell}{Om}\right) \cdot \sin kx\right)}}\\ \mathbf{elif}\;kx \leq -1.2 \cdot 10^{-234} \lor \neg \left(kx \leq 1.4 \cdot 10^{-35}\right):\\ \;\;\;\;{\left(0.5 + -0.25 \cdot \mathsf{fma}\left(-0.5, \frac{kx \cdot \left(kx \cdot Om\right)}{t_0 \cdot \ell}, 0.16666666666666666 \cdot \frac{Om \cdot ky}{\ell} + \frac{Om}{ky \cdot \ell}\right)\right)}^{0.5}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{0.5 + 0.5 \cdot \frac{1}{\mathsf{hypot}\left(1, 2 \cdot \frac{kx \cdot \ell}{Om}\right)}}\\ \end{array} \]
Alternative 6
Accuracy69.5%
Cost26700
\[\begin{array}{l} t_0 := Om \cdot -0.027777777777777776 + Om \cdot 0.008333333333333333\\ \mathbf{if}\;kx \leq -1.02 \cdot 10^{+79}:\\ \;\;\;\;{\left(0.5 + \left(-0.5 \cdot \frac{Om}{{\sin ky}^{3} \cdot \frac{\ell}{kx \cdot kx}}\right) \cdot -0.25\right)}^{0.5}\\ \mathbf{elif}\;kx \leq -2.45 \cdot 10^{-208}:\\ \;\;\;\;\sqrt{0.5 + \frac{0.5}{\mathsf{hypot}\left(1, \left(2 \cdot \frac{\ell}{Om}\right) \cdot \sin kx\right)}}\\ \mathbf{elif}\;kx \leq -2.4 \cdot 10^{-223}:\\ \;\;\;\;\sqrt{0.5 + 0.5 \cdot \left(\frac{0.5}{\ell} \cdot \mathsf{log1p}\left(\mathsf{expm1}\left(\frac{Om}{\sin kx}\right)\right)\right)}\\ \mathbf{elif}\;kx \leq 1.35 \cdot 10^{+76}:\\ \;\;\;\;\sqrt{0.5 + 0.5 \cdot \frac{1}{\mathsf{hypot}\left(1, 2 \cdot \frac{kx \cdot \ell}{Om}\right)}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{0.5 + 0.5 \cdot \left(\frac{0.5}{\ell} \cdot \left(\left(\left(kx \cdot Om\right) \cdot 0.16666666666666666 + \left(\frac{Om}{kx} - t_0 \cdot {kx}^{3}\right)\right) - {kx}^{5} \cdot \left(Om \cdot -0.0001984126984126984 + \left(0.16666666666666666 \cdot t_0 + Om \cdot 0.001388888888888889\right)\right)\right)\right)}\\ \end{array} \]
Alternative 7
Accuracy70.1%
Cost22600
\[\begin{array}{l} t_0 := Om \cdot -0.027777777777777776 + Om \cdot 0.008333333333333333\\ \mathbf{if}\;kx \leq -1.02 \cdot 10^{+79}:\\ \;\;\;\;{\left(0.5 + \left(-0.5 \cdot \frac{Om}{{\sin ky}^{3} \cdot \frac{\ell}{kx \cdot kx}}\right) \cdot -0.25\right)}^{0.5}\\ \mathbf{elif}\;kx \leq 1.25 \cdot 10^{+76}:\\ \;\;\;\;\sqrt{0.5 + \frac{0.5}{\mathsf{hypot}\left(1, \left(2 \cdot \frac{\ell}{Om}\right) \cdot \sin kx\right)}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{0.5 + 0.5 \cdot \left(\frac{0.5}{\ell} \cdot \left(\left(\left(kx \cdot Om\right) \cdot 0.16666666666666666 + \left(\frac{Om}{kx} - t_0 \cdot {kx}^{3}\right)\right) - {kx}^{5} \cdot \left(Om \cdot -0.0001984126984126984 + \left(0.16666666666666666 \cdot t_0 + Om \cdot 0.001388888888888889\right)\right)\right)\right)}\\ \end{array} \]
Alternative 8
Accuracy70.9%
Cost20553
\[\begin{array}{l} \mathbf{if}\;kx \leq -1.02 \cdot 10^{+79} \lor \neg \left(kx \leq 1.35 \cdot 10^{+76}\right):\\ \;\;\;\;{\left(0.5 + \left(-0.5 \cdot \frac{Om}{{\sin ky}^{3} \cdot \frac{\ell}{kx \cdot kx}}\right) \cdot -0.25\right)}^{0.5}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{0.5 + \frac{0.5}{\mathsf{hypot}\left(1, \left(2 \cdot \frac{\ell}{Om}\right) \cdot \sin kx\right)}}\\ \end{array} \]
Alternative 9
Accuracy59.2%
Cost20496
\[\begin{array}{l} t_0 := {\left(0.5 + -0.25 \cdot \left(-0.5 \cdot \left(\frac{Om}{\ell} \cdot \frac{kx \cdot kx}{{ky}^{3}}\right)\right)\right)}^{0.5}\\ t_1 := \sqrt{0.5 + 0.5 \cdot \left(\frac{0.5}{\ell} \cdot \left(\left(kx \cdot Om\right) \cdot 0.16666666666666666 + \left(\frac{Om}{kx} - \left(Om \cdot -0.027777777777777776 + Om \cdot 0.008333333333333333\right) \cdot {kx}^{3}\right)\right)\right)}\\ \mathbf{if}\;kx \leq -2 \cdot 10^{+241}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;kx \leq -4.5 \cdot 10^{+213}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;kx \leq -1.02 \cdot 10^{+79}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;kx \leq 1.35 \cdot 10^{+76}:\\ \;\;\;\;\sqrt{0.5 + \frac{0.5}{\mathsf{hypot}\left(1, \left(2 \cdot \frac{\ell}{Om}\right) \cdot \sin kx\right)}}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 10
Accuracy58.6%
Cost15120
\[\begin{array}{l} t_0 := {\left(0.5 + -0.25 \cdot \left(-0.5 \cdot \left(\frac{Om}{\ell} \cdot \frac{kx \cdot kx}{{ky}^{3}}\right)\right)\right)}^{0.5}\\ t_1 := \sqrt{0.5 + 0.5 \cdot \left(\frac{0.5}{\ell} \cdot \left(\left(kx \cdot Om\right) \cdot 0.16666666666666666 + \left(\frac{Om}{kx} - \left(Om \cdot -0.027777777777777776 + Om \cdot 0.008333333333333333\right) \cdot {kx}^{3}\right)\right)\right)}\\ \mathbf{if}\;kx \leq -2 \cdot 10^{+241}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;kx \leq -5.8 \cdot 10^{+213}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;kx \leq -1.02 \cdot 10^{+79}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;kx \leq 3.3 \cdot 10^{+73}:\\ \;\;\;\;\sqrt{0.5 + 0.5 \cdot \frac{1}{\mathsf{hypot}\left(1, 2 \cdot \frac{kx \cdot \ell}{Om}\right)}}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 11
Accuracy57.6%
Cost14020
\[\begin{array}{l} \mathbf{if}\;kx \leq -1.02 \cdot 10^{+79}:\\ \;\;\;\;{\left(0.5 + -0.25 \cdot \left(-0.5 \cdot \left(\frac{Om}{\ell} \cdot \frac{kx \cdot kx}{{ky}^{3}}\right)\right)\right)}^{0.5}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{0.5 + 0.5 \cdot \frac{1}{\mathsf{hypot}\left(1, 2 \cdot \frac{kx \cdot \ell}{Om}\right)}}\\ \end{array} \]
Alternative 12
Accuracy46.7%
Cost13960
\[\begin{array}{l} \mathbf{if}\;kx \leq -1.4 \cdot 10^{+211}:\\ \;\;\;\;\sqrt{0.5 + 0.5 \cdot \left(\frac{0.5}{\ell} \cdot \left(\left(kx \cdot Om\right) \cdot 0.16666666666666666 + \frac{Om}{kx}\right)\right)}\\ \mathbf{elif}\;kx \leq -1.15 \cdot 10^{+85}:\\ \;\;\;\;{\left(0.5 + -0.25 \cdot \frac{Om}{\sin ky \cdot \ell}\right)}^{0.5}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{0.5 + 0.5 \cdot \frac{1}{\mathsf{hypot}\left(1, 2 \cdot \frac{kx \cdot \ell}{Om}\right)}}\\ \end{array} \]
Alternative 13
Accuracy35.9%
Cost13704
\[\begin{array}{l} \mathbf{if}\;kx \leq -2.7 \cdot 10^{+210}:\\ \;\;\;\;\sqrt{0.5 + 0.5 \cdot \left(\frac{0.5}{\ell} \cdot \left(\left(kx \cdot Om\right) \cdot 0.16666666666666666 + \frac{Om}{kx}\right)\right)}\\ \mathbf{elif}\;kx \leq -1.15 \cdot 10^{+85}:\\ \;\;\;\;{\left(0.5 + -0.25 \cdot \frac{Om}{\sin ky \cdot \ell}\right)}^{0.5}\\ \mathbf{elif}\;kx \leq -3.45 \cdot 10^{-105}:\\ \;\;\;\;\sqrt{0.5}\\ \mathbf{else}:\\ \;\;\;\;1\\ \end{array} \]
Alternative 14
Accuracy33.7%
Cost7636
\[\begin{array}{l} \mathbf{if}\;kx \leq -5.5 \cdot 10^{+60}:\\ \;\;\;\;\sqrt{0.5 + 0.5 \cdot \left(\frac{0.5}{\ell} \cdot \left(\left(kx \cdot Om\right) \cdot 0.16666666666666666 + \frac{Om}{kx}\right)\right)}\\ \mathbf{elif}\;kx \leq -2.5 \cdot 10^{+35}:\\ \;\;\;\;1\\ \mathbf{elif}\;kx \leq -3.2 \cdot 10^{-105}:\\ \;\;\;\;\sqrt{0.5}\\ \mathbf{elif}\;kx \leq -1.42 \cdot 10^{-201}:\\ \;\;\;\;1\\ \mathbf{elif}\;kx \leq -2.4 \cdot 10^{-223}:\\ \;\;\;\;\sqrt{0.5 + \frac{Om}{kx} \cdot \frac{0.25}{\ell}}\\ \mathbf{else}:\\ \;\;\;\;1\\ \end{array} \]
Alternative 15
Accuracy32.2%
Cost6728
\[\begin{array}{l} \mathbf{if}\;\ell \leq -8.5 \cdot 10^{+41}:\\ \;\;\;\;\sqrt{0.5}\\ \mathbf{elif}\;\ell \leq 1.8 \cdot 10^{-54}:\\ \;\;\;\;1\\ \mathbf{else}:\\ \;\;\;\;\sqrt{0.5}\\ \end{array} \]
Alternative 16
Accuracy22.6%
Cost6464
\[\sqrt{0.5} \]

Reproduce?

herbie shell --seed 2023255 
(FPCore (l Om kx ky)
  :name "Toniolo and Linder, Equation (3a)"
  :precision binary64
  (sqrt (* (/ 1.0 2.0) (+ 1.0 (/ 1.0 (sqrt (+ 1.0 (* (pow (/ (* 2.0 l) Om) 2.0) (+ (pow (sin kx) 2.0) (pow (sin ky) 2.0))))))))))