?

Average Error: 1.54% → 1.83%
Time: 15.3s
Precision: binary64
Cost: 33161

?

\[ \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} \mathbf{if}\;\sin kx \leq -2.8 \cdot 10^{-96} \lor \neg \left(\sin kx \leq 1.15 \cdot 10^{-163}\right):\\ \;\;\;\;\sqrt{0.5 + \frac{0.5}{\mathsf{hypot}\left(1, 2 \cdot \frac{\ell \cdot \sin kx}{Om}\right)}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{0.5 + 0.5 \cdot \frac{1}{\mathsf{hypot}\left(1, 2 \cdot \frac{\ell \cdot \sin ky}{Om}\right)}}\\ \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
 (if (or (<= (sin kx) -2.8e-96) (not (<= (sin kx) 1.15e-163)))
   (sqrt (+ 0.5 (/ 0.5 (hypot 1.0 (* 2.0 (/ (* l (sin kx)) Om))))))
   (sqrt (+ 0.5 (* 0.5 (/ 1.0 (hypot 1.0 (* 2.0 (/ (* l (sin ky)) Om)))))))))
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 tmp;
	if ((sin(kx) <= -2.8e-96) || !(sin(kx) <= 1.15e-163)) {
		tmp = sqrt((0.5 + (0.5 / hypot(1.0, (2.0 * ((l * sin(kx)) / Om))))));
	} else {
		tmp = sqrt((0.5 + (0.5 * (1.0 / hypot(1.0, (2.0 * ((l * sin(ky)) / Om)))))));
	}
	return tmp;
}
public static double code(double l, double Om, double kx, double ky) {
	return Math.sqrt(((1.0 / 2.0) * (1.0 + (1.0 / Math.sqrt((1.0 + (Math.pow(((2.0 * l) / Om), 2.0) * (Math.pow(Math.sin(kx), 2.0) + Math.pow(Math.sin(ky), 2.0)))))))));
}
public static double code(double l, double Om, double kx, double ky) {
	double tmp;
	if ((Math.sin(kx) <= -2.8e-96) || !(Math.sin(kx) <= 1.15e-163)) {
		tmp = Math.sqrt((0.5 + (0.5 / Math.hypot(1.0, (2.0 * ((l * Math.sin(kx)) / Om))))));
	} else {
		tmp = Math.sqrt((0.5 + (0.5 * (1.0 / Math.hypot(1.0, (2.0 * ((l * Math.sin(ky)) / Om)))))));
	}
	return tmp;
}
def code(l, Om, kx, ky):
	return math.sqrt(((1.0 / 2.0) * (1.0 + (1.0 / math.sqrt((1.0 + (math.pow(((2.0 * l) / Om), 2.0) * (math.pow(math.sin(kx), 2.0) + math.pow(math.sin(ky), 2.0)))))))))
def code(l, Om, kx, ky):
	tmp = 0
	if (math.sin(kx) <= -2.8e-96) or not (math.sin(kx) <= 1.15e-163):
		tmp = math.sqrt((0.5 + (0.5 / math.hypot(1.0, (2.0 * ((l * math.sin(kx)) / Om))))))
	else:
		tmp = math.sqrt((0.5 + (0.5 * (1.0 / math.hypot(1.0, (2.0 * ((l * math.sin(ky)) / Om)))))))
	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)
	tmp = 0.0
	if ((sin(kx) <= -2.8e-96) || !(sin(kx) <= 1.15e-163))
		tmp = sqrt(Float64(0.5 + Float64(0.5 / hypot(1.0, Float64(2.0 * Float64(Float64(l * sin(kx)) / Om))))));
	else
		tmp = sqrt(Float64(0.5 + Float64(0.5 * Float64(1.0 / hypot(1.0, Float64(2.0 * Float64(Float64(l * sin(ky)) / Om)))))));
	end
	return tmp
end
function tmp = code(l, Om, kx, ky)
	tmp = sqrt(((1.0 / 2.0) * (1.0 + (1.0 / sqrt((1.0 + ((((2.0 * l) / Om) ^ 2.0) * ((sin(kx) ^ 2.0) + (sin(ky) ^ 2.0)))))))));
end
function tmp_2 = code(l, Om, kx, ky)
	tmp = 0.0;
	if ((sin(kx) <= -2.8e-96) || ~((sin(kx) <= 1.15e-163)))
		tmp = sqrt((0.5 + (0.5 / hypot(1.0, (2.0 * ((l * sin(kx)) / Om))))));
	else
		tmp = sqrt((0.5 + (0.5 * (1.0 / hypot(1.0, (2.0 * ((l * sin(ky)) / Om)))))));
	end
	tmp_2 = 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_] := If[Or[LessEqual[N[Sin[kx], $MachinePrecision], -2.8e-96], N[Not[LessEqual[N[Sin[kx], $MachinePrecision], 1.15e-163]], $MachinePrecision]], N[Sqrt[N[(0.5 + N[(0.5 / N[Sqrt[1.0 ^ 2 + N[(2.0 * N[(N[(l * N[Sin[kx], $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(0.5 + N[(0.5 * N[(1.0 / N[Sqrt[1.0 ^ 2 + N[(2.0 * N[(N[(l * N[Sin[ky], $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $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}
\mathbf{if}\;\sin kx \leq -2.8 \cdot 10^{-96} \lor \neg \left(\sin kx \leq 1.15 \cdot 10^{-163}\right):\\
\;\;\;\;\sqrt{0.5 + \frac{0.5}{\mathsf{hypot}\left(1, 2 \cdot \frac{\ell \cdot \sin kx}{Om}\right)}}\\

\mathbf{else}:\\
\;\;\;\;\sqrt{0.5 + 0.5 \cdot \frac{1}{\mathsf{hypot}\left(1, 2 \cdot \frac{\ell \cdot \sin ky}{Om}\right)}}\\


\end{array}

Error?

Try it out?

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation?

  1. Split input into 2 regimes
  2. if (sin.f64 kx) < -2.80000000000000015e-96 or 1.15e-163 < (sin.f64 kx)

    1. Initial program 0.03

      \[\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. Simplified0.01

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

      [Start]0.03

      \[ \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-lft-in [=>]0.03

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

      metadata-eval [=>]0.03

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

      metadata-eval [=>]0.03

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

      metadata-eval [=>]0.03

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

      associate-/l* [=>]0.01

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

      \[\leadsto \sqrt{0.5 + 0.5 \cdot \frac{1}{\sqrt{1 + \color{blue}{4 \cdot \frac{{\sin kx}^{2} \cdot {\ell}^{2}}{{Om}^{2}}}}}} \]
    4. Simplified13.61

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

      [Start]13.61

      \[ \sqrt{0.5 + 0.5 \cdot \frac{1}{\sqrt{1 + 4 \cdot \frac{{\sin kx}^{2} \cdot {\ell}^{2}}{{Om}^{2}}}}} \]

      associate-*r/ [=>]13.61

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

      associate-/l* [=>]13.61

      \[ \sqrt{0.5 + 0.5 \cdot \frac{1}{\sqrt{1 + \color{blue}{\frac{4}{\frac{{Om}^{2}}{{\sin kx}^{2} \cdot {\ell}^{2}}}}}}} \]

      unpow2 [=>]13.61

      \[ \sqrt{0.5 + 0.5 \cdot \frac{1}{\sqrt{1 + \frac{4}{\frac{\color{blue}{Om \cdot Om}}{{\sin kx}^{2} \cdot {\ell}^{2}}}}}} \]

      unpow2 [=>]13.61

      \[ \sqrt{0.5 + 0.5 \cdot \frac{1}{\sqrt{1 + \frac{4}{\frac{Om \cdot Om}{{\sin kx}^{2} \cdot \color{blue}{\left(\ell \cdot \ell\right)}}}}}} \]
    5. Applied egg-rr2.13

      \[\leadsto \sqrt{0.5 + 0.5 \cdot \frac{1}{\color{blue}{\mathsf{hypot}\left(1, \frac{2}{Om} \cdot \left(\sin kx \cdot \ell\right)\right)}}} \]
    6. Applied egg-rr2.14

      \[\leadsto \sqrt{0.5 + \color{blue}{\left(e^{\mathsf{log1p}\left(\frac{0.5}{\mathsf{hypot}\left(1, 2 \cdot \frac{\sin kx}{\frac{Om}{\ell}}\right)}\right)} - 1\right)}} \]
    7. Simplified2.13

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

      [Start]2.14

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

      expm1-def [=>]2.13

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

      expm1-log1p [=>]2.13

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

      associate-/l* [<=]2.13

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

      *-commutative [<=]2.13

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

    if -2.80000000000000015e-96 < (sin.f64 kx) < 1.15e-163

    1. Initial program 4.95

      \[\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. Simplified4.95

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

      [Start]4.95

      \[ \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-lft-in [=>]4.95

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

      metadata-eval [=>]4.95

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

      metadata-eval [=>]4.95

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

      metadata-eval [=>]4.95

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

      associate-/l* [=>]4.95

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

      \[\leadsto \sqrt{0.5 + 0.5 \cdot \frac{1}{\sqrt{1 + \color{blue}{4 \cdot \frac{{\ell}^{2} \cdot {\sin ky}^{2}}{{Om}^{2}}}}}} \]
    4. Simplified7.21

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

      [Start]21.65

      \[ \sqrt{0.5 + 0.5 \cdot \frac{1}{\sqrt{1 + 4 \cdot \frac{{\ell}^{2} \cdot {\sin ky}^{2}}{{Om}^{2}}}}} \]

      associate-/l* [=>]21.56

      \[ \sqrt{0.5 + 0.5 \cdot \frac{1}{\sqrt{1 + 4 \cdot \color{blue}{\frac{{\ell}^{2}}{\frac{{Om}^{2}}{{\sin ky}^{2}}}}}}} \]

      associate-/r/ [=>]21.08

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

      unpow2 [=>]21.08

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

      unpow2 [=>]21.08

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

      times-frac [=>]7.21

      \[ \sqrt{0.5 + 0.5 \cdot \frac{1}{\sqrt{1 + 4 \cdot \left(\color{blue}{\left(\frac{\ell}{Om} \cdot \frac{\ell}{Om}\right)} \cdot {\sin ky}^{2}\right)}}} \]
    5. Applied egg-rr1.16

      \[\leadsto \sqrt{0.5 + 0.5 \cdot \frac{1}{\color{blue}{e^{\mathsf{log1p}\left(\mathsf{hypot}\left(1, 2 \cdot \left(\frac{\ell}{Om} \cdot \sin ky\right)\right)\right)} - 1}}} \]
    6. Simplified1.16

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

      [Start]1.16

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

      expm1-def [=>]1.16

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

      expm1-log1p [=>]1.16

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

      associate-*l/ [=>]1.16

      \[ \sqrt{0.5 + 0.5 \cdot \frac{1}{\mathsf{hypot}\left(1, 2 \cdot \color{blue}{\frac{\ell \cdot \sin ky}{Om}}\right)}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification1.83

    \[\leadsto \begin{array}{l} \mathbf{if}\;\sin kx \leq -2.8 \cdot 10^{-96} \lor \neg \left(\sin kx \leq 1.15 \cdot 10^{-163}\right):\\ \;\;\;\;\sqrt{0.5 + \frac{0.5}{\mathsf{hypot}\left(1, 2 \cdot \frac{\ell \cdot \sin kx}{Om}\right)}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{0.5 + 0.5 \cdot \frac{1}{\mathsf{hypot}\left(1, 2 \cdot \frac{\ell \cdot \sin ky}{Om}\right)}}\\ \end{array} \]

Alternatives

Alternative 1
Error1.53%
Cost46080
\[\sqrt{0.5 + 0.5 \cdot \frac{1}{\sqrt{1 + {\left(\frac{2}{\frac{Om}{\ell}}\right)}^{2} \cdot \left({\sin kx}^{2} + {\sin ky}^{2}\right)}}} \]
Alternative 2
Error4.58%
Cost33033
\[\begin{array}{l} \mathbf{if}\;\sin kx \leq -4.1 \cdot 10^{-226} \lor \neg \left(\sin kx \leq 1.5 \cdot 10^{-165}\right):\\ \;\;\;\;\sqrt{0.5 + \frac{0.5}{\mathsf{hypot}\left(1, 2 \cdot \frac{\ell \cdot \sin kx}{Om}\right)}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{0.5 + 0.5 \cdot \frac{1}{\mathsf{hypot}\left(1, 2 \cdot \frac{\ell \cdot ky}{Om}\right)}}\\ \end{array} \]
Alternative 3
Error14.95%
Cost13961
\[\begin{array}{l} \mathbf{if}\;\ell \leq -1.7 \cdot 10^{-165} \lor \neg \left(\ell \leq 1.1 \cdot 10^{-33}\right):\\ \;\;\;\;\sqrt{0.5 + 0.5 \cdot \frac{1}{\mathsf{hypot}\left(1, 2 \cdot \frac{\ell \cdot ky}{Om}\right)}}\\ \mathbf{else}:\\ \;\;\;\;1\\ \end{array} \]
Alternative 4
Error24.46%
Cost6992
\[\begin{array}{l} \mathbf{if}\;\ell \leq -2.6 \cdot 10^{+150}:\\ \;\;\;\;\sqrt{0.5}\\ \mathbf{elif}\;\ell \leq -230000000:\\ \;\;\;\;1\\ \mathbf{elif}\;\ell \leq -1.4 \cdot 10^{-18}:\\ \;\;\;\;\sqrt{0.5}\\ \mathbf{elif}\;\ell \leq 2.2 \cdot 10^{+148}:\\ \;\;\;\;1\\ \mathbf{else}:\\ \;\;\;\;\sqrt{0.5}\\ \end{array} \]
Alternative 5
Error44.12%
Cost6464
\[\sqrt{0.5} \]

Error

Reproduce?

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