Toniolo and Linder, Equation (3b), real

?

Percentage Accurate: 94.0% → 99.7%
Time: 26.5s
Precision: binary64
Cost: 32384

?

\[\frac{\sin ky}{\sqrt{{\sin kx}^{2} + {\sin ky}^{2}}} \cdot \sin th \]
\[\frac{\sin th}{\frac{\mathsf{hypot}\left(\sin ky, \sin kx\right)}{\sin ky}} \]
(FPCore (kx ky th)
 :precision binary64
 (* (/ (sin ky) (sqrt (+ (pow (sin kx) 2.0) (pow (sin ky) 2.0)))) (sin th)))
(FPCore (kx ky th)
 :precision binary64
 (/ (sin th) (/ (hypot (sin ky) (sin kx)) (sin ky))))
double code(double kx, double ky, double th) {
	return (sin(ky) / sqrt((pow(sin(kx), 2.0) + pow(sin(ky), 2.0)))) * sin(th);
}
double code(double kx, double ky, double th) {
	return sin(th) / (hypot(sin(ky), sin(kx)) / sin(ky));
}
public static double code(double kx, double ky, double th) {
	return (Math.sin(ky) / Math.sqrt((Math.pow(Math.sin(kx), 2.0) + Math.pow(Math.sin(ky), 2.0)))) * Math.sin(th);
}
public static double code(double kx, double ky, double th) {
	return Math.sin(th) / (Math.hypot(Math.sin(ky), Math.sin(kx)) / Math.sin(ky));
}
def code(kx, ky, th):
	return (math.sin(ky) / math.sqrt((math.pow(math.sin(kx), 2.0) + math.pow(math.sin(ky), 2.0)))) * math.sin(th)
def code(kx, ky, th):
	return math.sin(th) / (math.hypot(math.sin(ky), math.sin(kx)) / math.sin(ky))
function code(kx, ky, th)
	return Float64(Float64(sin(ky) / sqrt(Float64((sin(kx) ^ 2.0) + (sin(ky) ^ 2.0)))) * sin(th))
end
function code(kx, ky, th)
	return Float64(sin(th) / Float64(hypot(sin(ky), sin(kx)) / sin(ky)))
end
function tmp = code(kx, ky, th)
	tmp = (sin(ky) / sqrt(((sin(kx) ^ 2.0) + (sin(ky) ^ 2.0)))) * sin(th);
end
function tmp = code(kx, ky, th)
	tmp = sin(th) / (hypot(sin(ky), sin(kx)) / sin(ky));
end
code[kx_, ky_, th_] := N[(N[(N[Sin[ky], $MachinePrecision] / N[Sqrt[N[(N[Power[N[Sin[kx], $MachinePrecision], 2.0], $MachinePrecision] + N[Power[N[Sin[ky], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[Sin[th], $MachinePrecision]), $MachinePrecision]
code[kx_, ky_, th_] := N[(N[Sin[th], $MachinePrecision] / N[(N[Sqrt[N[Sin[ky], $MachinePrecision] ^ 2 + N[Sin[kx], $MachinePrecision] ^ 2], $MachinePrecision] / N[Sin[ky], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\frac{\sin ky}{\sqrt{{\sin kx}^{2} + {\sin ky}^{2}}} \cdot \sin th
\frac{\sin th}{\frac{\mathsf{hypot}\left(\sin ky, \sin kx\right)}{\sin ky}}

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 28 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

Try it out?

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation?

  1. Initial program 94.3%

    \[\frac{\sin ky}{\sqrt{{\sin kx}^{2} + {\sin ky}^{2}}} \cdot \sin th \]
  2. Simplified99.7%

    \[\leadsto \color{blue}{\frac{\sin ky}{\mathsf{hypot}\left(\sin ky, \sin kx\right)} \cdot \sin th} \]
    Step-by-step derivation

    [Start]94.3%

    \[ \frac{\sin ky}{\sqrt{{\sin kx}^{2} + {\sin ky}^{2}}} \cdot \sin th \]

    +-commutative [=>]94.3%

    \[ \frac{\sin ky}{\sqrt{\color{blue}{{\sin ky}^{2} + {\sin kx}^{2}}}} \cdot \sin th \]

    unpow2 [=>]94.3%

    \[ \frac{\sin ky}{\sqrt{\color{blue}{\sin ky \cdot \sin ky} + {\sin kx}^{2}}} \cdot \sin th \]

    unpow2 [=>]94.3%

    \[ \frac{\sin ky}{\sqrt{\sin ky \cdot \sin ky + \color{blue}{\sin kx \cdot \sin kx}}} \cdot \sin th \]

    hypot-def [=>]99.7%

    \[ \frac{\sin ky}{\color{blue}{\mathsf{hypot}\left(\sin ky, \sin kx\right)}} \cdot \sin th \]
  3. Applied egg-rr44.9%

    \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\sin ky \cdot \frac{\sin th}{\mathsf{hypot}\left(\sin ky, \sin kx\right)}\right)} - 1} \]
    Step-by-step derivation

    [Start]99.7%

    \[ \frac{\sin ky}{\mathsf{hypot}\left(\sin ky, \sin kx\right)} \cdot \sin th \]

    associate-*l/ [=>]96.1%

    \[ \color{blue}{\frac{\sin ky \cdot \sin th}{\mathsf{hypot}\left(\sin ky, \sin kx\right)}} \]

    associate-*r/ [<=]99.7%

    \[ \color{blue}{\sin ky \cdot \frac{\sin th}{\mathsf{hypot}\left(\sin ky, \sin kx\right)}} \]

    expm1-log1p-u [=>]99.6%

    \[ \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\sin ky \cdot \frac{\sin th}{\mathsf{hypot}\left(\sin ky, \sin kx\right)}\right)\right)} \]

    expm1-udef [=>]44.9%

    \[ \color{blue}{e^{\mathsf{log1p}\left(\sin ky \cdot \frac{\sin th}{\mathsf{hypot}\left(\sin ky, \sin kx\right)}\right)} - 1} \]
  4. Simplified99.7%

    \[\leadsto \color{blue}{\frac{\sin th}{\frac{\mathsf{hypot}\left(\sin ky, \sin kx\right)}{\sin ky}}} \]
    Step-by-step derivation

    [Start]44.9%

    \[ e^{\mathsf{log1p}\left(\sin ky \cdot \frac{\sin th}{\mathsf{hypot}\left(\sin ky, \sin kx\right)}\right)} - 1 \]

    expm1-def [=>]99.6%

    \[ \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\sin ky \cdot \frac{\sin th}{\mathsf{hypot}\left(\sin ky, \sin kx\right)}\right)\right)} \]

    expm1-log1p [=>]99.7%

    \[ \color{blue}{\sin ky \cdot \frac{\sin th}{\mathsf{hypot}\left(\sin ky, \sin kx\right)}} \]

    *-commutative [=>]99.7%

    \[ \color{blue}{\frac{\sin th}{\mathsf{hypot}\left(\sin ky, \sin kx\right)} \cdot \sin ky} \]

    associate-/r/ [<=]99.7%

    \[ \color{blue}{\frac{\sin th}{\frac{\mathsf{hypot}\left(\sin ky, \sin kx\right)}{\sin ky}}} \]
  5. Final simplification99.7%

    \[\leadsto \frac{\sin th}{\frac{\mathsf{hypot}\left(\sin ky, \sin kx\right)}{\sin ky}} \]

Alternatives

Alternative 1
Accuracy99.7%
Cost32384
\[\frac{\sin th}{\frac{\mathsf{hypot}\left(\sin ky, \sin kx\right)}{\sin ky}} \]
Alternative 2
Accuracy46.0%
Cost52376
\[\begin{array}{l} t_1 := \frac{\sin th \cdot \left(-ky\right)}{\sin kx}\\ \mathbf{if}\;\sin ky \leq -0.05:\\ \;\;\;\;\left|\sin th\right|\\ \mathbf{elif}\;\sin ky \leq -1 \cdot 10^{-77}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;\sin ky \leq 10^{-301}:\\ \;\;\;\;\frac{ky}{\frac{\sin kx}{\sin th}}\\ \mathbf{elif}\;\sin ky \leq 5 \cdot 10^{-187}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;\sin ky \leq 10^{-128}:\\ \;\;\;\;\sin ky \cdot \frac{\sin th}{ky}\\ \mathbf{elif}\;\sin ky \leq 2 \cdot 10^{-60}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\sin th\\ \end{array} \]
Alternative 3
Accuracy45.8%
Cost52376
\[\begin{array}{l} t_1 := \frac{\sin th \cdot \left(-ky\right)}{\sin kx}\\ \mathbf{if}\;\sin ky \leq -0.05:\\ \;\;\;\;\left|\sin th\right|\\ \mathbf{elif}\;\sin ky \leq -1 \cdot 10^{-77}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;\sin ky \leq -4 \cdot 10^{-139}:\\ \;\;\;\;ky \cdot \frac{\sin th}{\sin kx}\\ \mathbf{elif}\;\sin ky \leq 5 \cdot 10^{-187}:\\ \;\;\;\;\sin th \cdot \frac{-ky}{\sin kx}\\ \mathbf{elif}\;\sin ky \leq 10^{-128}:\\ \;\;\;\;\sin ky \cdot \frac{\sin th}{ky}\\ \mathbf{elif}\;\sin ky \leq 2 \cdot 10^{-60}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\sin th\\ \end{array} \]
Alternative 4
Accuracy45.9%
Cost52376
\[\begin{array}{l} t_1 := \frac{-\sin th}{\frac{\sin kx}{ky}}\\ \mathbf{if}\;\sin ky \leq -0.05:\\ \;\;\;\;\left|\sin th\right|\\ \mathbf{elif}\;\sin ky \leq -1 \cdot 10^{-77}:\\ \;\;\;\;\frac{\sin th \cdot \left(-ky\right)}{\sin kx}\\ \mathbf{elif}\;\sin ky \leq -4 \cdot 10^{-139}:\\ \;\;\;\;ky \cdot \frac{\sin th}{\sin kx}\\ \mathbf{elif}\;\sin ky \leq 5 \cdot 10^{-187}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;\sin ky \leq 10^{-128}:\\ \;\;\;\;\sin ky \cdot \frac{\sin th}{ky}\\ \mathbf{elif}\;\sin ky \leq 2 \cdot 10^{-60}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\sin th\\ \end{array} \]
Alternative 5
Accuracy46.4%
Cost52376
\[\begin{array}{l} t_1 := \frac{\sin kx}{ky}\\ t_2 := \frac{-\sin th}{t_1}\\ \mathbf{if}\;\sin ky \leq -0.05:\\ \;\;\;\;\left|\sin th\right|\\ \mathbf{elif}\;\sin ky \leq -1 \cdot 10^{-77}:\\ \;\;\;\;\frac{\sin th \cdot \left(-ky\right)}{\sin kx}\\ \mathbf{elif}\;\sin ky \leq 10^{-301}:\\ \;\;\;\;\frac{\sin th}{t_1 + 0.5 \cdot \frac{ky}{kx}}\\ \mathbf{elif}\;\sin ky \leq 5 \cdot 10^{-187}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;\sin ky \leq 10^{-128}:\\ \;\;\;\;\sin ky \cdot \frac{\sin th}{ky}\\ \mathbf{elif}\;\sin ky \leq 2 \cdot 10^{-60}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;\sin th\\ \end{array} \]
Alternative 6
Accuracy48.8%
Cost45648
\[\begin{array}{l} \mathbf{if}\;\sin kx \leq -2 \cdot 10^{-74}:\\ \;\;\;\;\frac{-\sin th}{\frac{\sin kx}{ky}}\\ \mathbf{elif}\;\sin kx \leq 5 \cdot 10^{-283}:\\ \;\;\;\;\sin th\\ \mathbf{elif}\;\sin kx \leq 10^{-88}:\\ \;\;\;\;\left|\sin th\right|\\ \mathbf{elif}\;\sin kx \leq 4 \cdot 10^{-87}:\\ \;\;\;\;\sin th\\ \mathbf{else}:\\ \;\;\;\;\sin ky \cdot \frac{\sin th}{\sin kx}\\ \end{array} \]
Alternative 7
Accuracy58.4%
Cost45648
\[\begin{array}{l} t_1 := \frac{ky}{\frac{\left|\sin kx\right|}{\sin th}}\\ \mathbf{if}\;\sin ky \leq -0.065:\\ \;\;\;\;\left|\sin th\right|\\ \mathbf{elif}\;\sin ky \leq 2 \cdot 10^{-168}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;\sin ky \leq 10^{-129}:\\ \;\;\;\;\frac{\sin th}{1 + \frac{0.5 \cdot \left(kx \cdot kx\right)}{{\sin ky}^{2}}}\\ \mathbf{elif}\;\sin ky \leq 2 \cdot 10^{-60}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\sin th\\ \end{array} \]
Alternative 8
Accuracy58.6%
Cost45648
\[\begin{array}{l} t_1 := \left|\sin kx\right|\\ \mathbf{if}\;\sin ky \leq -0.065:\\ \;\;\;\;\left|\sin th\right|\\ \mathbf{elif}\;\sin ky \leq 2 \cdot 10^{-168}:\\ \;\;\;\;\sin ky \cdot \frac{\sin th}{t_1}\\ \mathbf{elif}\;\sin ky \leq 10^{-129}:\\ \;\;\;\;\frac{\sin th}{1 + \frac{0.5 \cdot \left(kx \cdot kx\right)}{{\sin ky}^{2}}}\\ \mathbf{elif}\;\sin ky \leq 2 \cdot 10^{-60}:\\ \;\;\;\;\frac{ky}{\frac{t_1}{\sin th}}\\ \mathbf{else}:\\ \;\;\;\;\sin th\\ \end{array} \]
Alternative 9
Accuracy76.9%
Cost45580
\[\begin{array}{l} \mathbf{if}\;\sin kx \leq -0.004:\\ \;\;\;\;\sin th \cdot \left(\sin ky \cdot \frac{-1}{\sin kx}\right)\\ \mathbf{elif}\;\sin kx \leq 0.07:\\ \;\;\;\;\sin ky \cdot \frac{\sin th}{\mathsf{hypot}\left(\sin ky, kx\right)}\\ \mathbf{elif}\;\sin kx \leq 0.91:\\ \;\;\;\;\sin ky \cdot \frac{th}{\mathsf{hypot}\left(\sin ky, \sin kx\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sin ky}{\frac{\sin kx}{\sin th}}\\ \end{array} \]
Alternative 10
Accuracy77.0%
Cost45580
\[\begin{array}{l} \mathbf{if}\;\sin kx \leq -0.004:\\ \;\;\;\;\sin th \cdot \left(\sin ky \cdot \frac{-1}{\sin kx}\right)\\ \mathbf{elif}\;\sin kx \leq 0.07:\\ \;\;\;\;\sin th \cdot \frac{\sin ky}{\mathsf{hypot}\left(\sin ky, kx\right)}\\ \mathbf{elif}\;\sin kx \leq 0.91:\\ \;\;\;\;\sin ky \cdot \frac{th}{\mathsf{hypot}\left(\sin ky, \sin kx\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sin ky}{\frac{\sin kx}{\sin th}}\\ \end{array} \]
Alternative 11
Accuracy46.3%
Cost39248
\[\begin{array}{l} t_1 := \sin th \cdot \frac{ky}{\sin kx}\\ \mathbf{if}\;\sin ky \leq -5 \cdot 10^{-64}:\\ \;\;\;\;\left|\sin th\right|\\ \mathbf{elif}\;\sin ky \leq 2 \cdot 10^{-168}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;\sin ky \leq 10^{-129}:\\ \;\;\;\;\sin ky \cdot \frac{\sin th}{ky}\\ \mathbf{elif}\;\sin ky \leq 2 \cdot 10^{-71}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\sin th\\ \end{array} \]
Alternative 12
Accuracy46.3%
Cost39248
\[\begin{array}{l} \mathbf{if}\;\sin ky \leq -5 \cdot 10^{-64}:\\ \;\;\;\;\left|\sin th\right|\\ \mathbf{elif}\;\sin ky \leq 2 \cdot 10^{-168}:\\ \;\;\;\;ky \cdot \frac{\sin th}{\sin kx}\\ \mathbf{elif}\;\sin ky \leq 10^{-129}:\\ \;\;\;\;\sin ky \cdot \frac{\sin th}{ky}\\ \mathbf{elif}\;\sin ky \leq 2 \cdot 10^{-71}:\\ \;\;\;\;\sin th \cdot \frac{ky}{\sin kx}\\ \mathbf{else}:\\ \;\;\;\;\sin th\\ \end{array} \]
Alternative 13
Accuracy78.6%
Cost39048
\[\begin{array}{l} \mathbf{if}\;\sin kx \leq -0.004:\\ \;\;\;\;\sin th \cdot \left(\sin ky \cdot \frac{-1}{\sin kx}\right)\\ \mathbf{elif}\;\sin kx \leq 0.05:\\ \;\;\;\;\sin ky \cdot \frac{\sin th}{\mathsf{hypot}\left(\sin ky, kx\right)}\\ \mathbf{else}:\\ \;\;\;\;\sin ky \cdot \frac{\sin th}{\left|\sin kx\right|}\\ \end{array} \]
Alternative 14
Accuracy32.0%
Cost32976
\[\begin{array}{l} \mathbf{if}\;\sin kx \leq -2 \cdot 10^{-74}:\\ \;\;\;\;\frac{ky}{\frac{-\sin kx}{th}}\\ \mathbf{elif}\;\sin kx \leq 5 \cdot 10^{-283}:\\ \;\;\;\;\sin th\\ \mathbf{elif}\;\sin kx \leq 10^{-88}:\\ \;\;\;\;\left|\sin th\right|\\ \mathbf{elif}\;\sin kx \leq 0.55:\\ \;\;\;\;\frac{\sin th}{\frac{kx}{ky}}\\ \mathbf{else}:\\ \;\;\;\;\frac{ky}{\sin kx \cdot \frac{1}{th}}\\ \end{array} \]
Alternative 15
Accuracy40.4%
Cost32848
\[\begin{array}{l} \mathbf{if}\;\sin ky \leq -2 \cdot 10^{-84}:\\ \;\;\;\;\left|\sin th\right|\\ \mathbf{elif}\;\sin ky \leq 2 \cdot 10^{-168}:\\ \;\;\;\;\sin ky \cdot \frac{\sin th}{kx}\\ \mathbf{elif}\;\sin ky \leq 10^{-129}:\\ \;\;\;\;\sin th\\ \mathbf{elif}\;\sin ky \leq 2 \cdot 10^{-71}:\\ \;\;\;\;\frac{th \cdot ky}{\sin kx}\\ \mathbf{else}:\\ \;\;\;\;\sin th\\ \end{array} \]
Alternative 16
Accuracy40.4%
Cost32848
\[\begin{array}{l} \mathbf{if}\;\sin ky \leq -2 \cdot 10^{-84}:\\ \;\;\;\;\left|\sin th\right|\\ \mathbf{elif}\;\sin ky \leq 2 \cdot 10^{-168}:\\ \;\;\;\;\sin ky \cdot \frac{\sin th}{kx}\\ \mathbf{elif}\;\sin ky \leq 10^{-129}:\\ \;\;\;\;\sin ky \cdot \frac{\sin th}{ky}\\ \mathbf{elif}\;\sin ky \leq 2 \cdot 10^{-71}:\\ \;\;\;\;\frac{th \cdot ky}{\sin kx}\\ \mathbf{else}:\\ \;\;\;\;\sin th\\ \end{array} \]
Alternative 17
Accuracy59.7%
Cost32584
\[\begin{array}{l} \mathbf{if}\;\sin ky \leq -0.065:\\ \;\;\;\;\left|\sin th\right|\\ \mathbf{elif}\;\sin ky \leq 2 \cdot 10^{-60}:\\ \;\;\;\;\frac{ky}{\frac{\left|\sin kx\right|}{\sin th}}\\ \mathbf{else}:\\ \;\;\;\;\sin th\\ \end{array} \]
Alternative 18
Accuracy99.6%
Cost32384
\[\sin ky \cdot \frac{\sin th}{\mathsf{hypot}\left(\sin ky, \sin kx\right)} \]
Alternative 19
Accuracy99.7%
Cost32384
\[\sin th \cdot \frac{\sin ky}{\mathsf{hypot}\left(\sin ky, \sin kx\right)} \]
Alternative 20
Accuracy32.8%
Cost19912
\[\begin{array}{l} \mathbf{if}\;\sin kx \leq -2 \cdot 10^{-74}:\\ \;\;\;\;\frac{ky}{\frac{-\sin kx}{th}}\\ \mathbf{elif}\;\sin kx \leq 4 \cdot 10^{-53}:\\ \;\;\;\;\sin th\\ \mathbf{else}:\\ \;\;\;\;ky \cdot \frac{1}{\frac{\sin kx}{th}}\\ \end{array} \]
Alternative 21
Accuracy32.8%
Cost19912
\[\begin{array}{l} \mathbf{if}\;\sin kx \leq -2 \cdot 10^{-74}:\\ \;\;\;\;\frac{ky}{\frac{-\sin kx}{th}}\\ \mathbf{elif}\;\sin kx \leq 4 \cdot 10^{-53}:\\ \;\;\;\;\sin th\\ \mathbf{else}:\\ \;\;\;\;\frac{ky}{\sin kx \cdot \frac{1}{th}}\\ \end{array} \]
Alternative 22
Accuracy29.6%
Cost19784
\[\begin{array}{l} \mathbf{if}\;\sin kx \leq -1 \cdot 10^{-66}:\\ \;\;\;\;ky \cdot \frac{th}{kx}\\ \mathbf{elif}\;\sin kx \leq 4 \cdot 10^{-53}:\\ \;\;\;\;\sin th\\ \mathbf{else}:\\ \;\;\;\;th \cdot \frac{ky}{\sin kx}\\ \end{array} \]
Alternative 23
Accuracy29.9%
Cost19784
\[\begin{array}{l} \mathbf{if}\;\sin kx \leq -5 \cdot 10^{-49}:\\ \;\;\;\;\frac{ky}{\frac{kx}{\sin th}}\\ \mathbf{elif}\;\sin kx \leq 4 \cdot 10^{-53}:\\ \;\;\;\;\sin th\\ \mathbf{else}:\\ \;\;\;\;th \cdot \frac{ky}{\sin kx}\\ \end{array} \]
Alternative 24
Accuracy29.9%
Cost19784
\[\begin{array}{l} \mathbf{if}\;\sin kx \leq -5 \cdot 10^{-49}:\\ \;\;\;\;\frac{ky}{\frac{kx}{\sin th}}\\ \mathbf{elif}\;\sin kx \leq 4 \cdot 10^{-53}:\\ \;\;\;\;\sin th\\ \mathbf{else}:\\ \;\;\;\;\frac{ky}{\frac{\sin kx}{th}}\\ \end{array} \]
Alternative 25
Accuracy32.8%
Cost19784
\[\begin{array}{l} \mathbf{if}\;\sin kx \leq -2 \cdot 10^{-74}:\\ \;\;\;\;\frac{ky}{\frac{-\sin kx}{th}}\\ \mathbf{elif}\;\sin kx \leq 4 \cdot 10^{-53}:\\ \;\;\;\;\sin th\\ \mathbf{else}:\\ \;\;\;\;\frac{ky}{\frac{\sin kx}{th}}\\ \end{array} \]
Alternative 26
Accuracy29.2%
Cost6993
\[\begin{array}{l} \mathbf{if}\;ky \leq -3.1:\\ \;\;\;\;\sin th\\ \mathbf{elif}\;ky \leq 1.8 \cdot 10^{-249} \lor \neg \left(ky \leq 5.8 \cdot 10^{-127}\right) \land ky \leq 3.8 \cdot 10^{-70}:\\ \;\;\;\;th \cdot \frac{ky}{kx}\\ \mathbf{else}:\\ \;\;\;\;\sin th\\ \end{array} \]
Alternative 27
Accuracy21.4%
Cost584
\[\begin{array}{l} \mathbf{if}\;ky \leq -2.45 \cdot 10^{+20}:\\ \;\;\;\;th\\ \mathbf{elif}\;ky \leq 10^{-68}:\\ \;\;\;\;th \cdot \frac{ky}{kx}\\ \mathbf{else}:\\ \;\;\;\;th\\ \end{array} \]
Alternative 28
Accuracy13.4%
Cost64
\[th \]

Reproduce?

herbie shell --seed 2023271 
(FPCore (kx ky th)
  :name "Toniolo and Linder, Equation (3b), real"
  :precision binary64
  (* (/ (sin ky) (sqrt (+ (pow (sin kx) 2.0) (pow (sin ky) 2.0)))) (sin th)))