Average Error: 12.1 → 8.9
Time: 28.7s
Precision: 64
\[\frac{\sin ky}{\sqrt{{\left(\sin kx\right)}^{2} + {\left(\sin ky\right)}^{2}}} \cdot \sin th\]
\[\frac{1}{\left(\sqrt[3]{\frac{\mathsf{hypot}\left(\sin ky, \sin kx\right)}{\sin ky}} \cdot \sqrt[3]{\frac{\mathsf{hypot}\left(\sin ky, \sin kx\right)}{\sin ky}}\right) \cdot \sqrt[3]{\frac{\mathsf{hypot}\left(\sin ky, \sin kx\right)}{\sin ky}}} \cdot \sin th\]
\frac{\sin ky}{\sqrt{{\left(\sin kx\right)}^{2} + {\left(\sin ky\right)}^{2}}} \cdot \sin th
\frac{1}{\left(\sqrt[3]{\frac{\mathsf{hypot}\left(\sin ky, \sin kx\right)}{\sin ky}} \cdot \sqrt[3]{\frac{\mathsf{hypot}\left(\sin ky, \sin kx\right)}{\sin ky}}\right) \cdot \sqrt[3]{\frac{\mathsf{hypot}\left(\sin ky, \sin kx\right)}{\sin ky}}} \cdot \sin th
double f(double kx, double ky, double th) {
        double r38914 = ky;
        double r38915 = sin(r38914);
        double r38916 = kx;
        double r38917 = sin(r38916);
        double r38918 = 2.0;
        double r38919 = pow(r38917, r38918);
        double r38920 = pow(r38915, r38918);
        double r38921 = r38919 + r38920;
        double r38922 = sqrt(r38921);
        double r38923 = r38915 / r38922;
        double r38924 = th;
        double r38925 = sin(r38924);
        double r38926 = r38923 * r38925;
        return r38926;
}

double f(double kx, double ky, double th) {
        double r38927 = 1.0;
        double r38928 = ky;
        double r38929 = sin(r38928);
        double r38930 = kx;
        double r38931 = sin(r38930);
        double r38932 = hypot(r38929, r38931);
        double r38933 = r38932 / r38929;
        double r38934 = cbrt(r38933);
        double r38935 = r38934 * r38934;
        double r38936 = r38935 * r38934;
        double r38937 = r38927 / r38936;
        double r38938 = th;
        double r38939 = sin(r38938);
        double r38940 = r38937 * r38939;
        return r38940;
}

Error

Bits error versus kx

Bits error versus ky

Bits error versus th

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 12.1

    \[\frac{\sin ky}{\sqrt{{\left(\sin kx\right)}^{2} + {\left(\sin ky\right)}^{2}}} \cdot \sin th\]
  2. Taylor expanded around inf 12.1

    \[\leadsto \frac{\sin ky}{\color{blue}{\sqrt{{\left(\sin kx\right)}^{2} + {\left(\sin ky\right)}^{2}}}} \cdot \sin th\]
  3. Simplified8.6

    \[\leadsto \frac{\sin ky}{\color{blue}{\mathsf{hypot}\left(\sin ky, \sin kx\right)}} \cdot \sin th\]
  4. Using strategy rm
  5. Applied clear-num8.6

    \[\leadsto \color{blue}{\frac{1}{\frac{\mathsf{hypot}\left(\sin ky, \sin kx\right)}{\sin ky}}} \cdot \sin th\]
  6. Using strategy rm
  7. Applied add-cube-cbrt8.9

    \[\leadsto \frac{1}{\color{blue}{\left(\sqrt[3]{\frac{\mathsf{hypot}\left(\sin ky, \sin kx\right)}{\sin ky}} \cdot \sqrt[3]{\frac{\mathsf{hypot}\left(\sin ky, \sin kx\right)}{\sin ky}}\right) \cdot \sqrt[3]{\frac{\mathsf{hypot}\left(\sin ky, \sin kx\right)}{\sin ky}}}} \cdot \sin th\]
  8. Final simplification8.9

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

Reproduce

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