Average Error: 3.8 → 3.8
Time: 19.6s
Precision: binary64
\[\frac{\sin ky}{\sqrt{{\left(\sin kx\right)}^{2} + {\left(\sin ky\right)}^{2}}} \cdot \sin th\]
\[\sin ky \cdot \frac{\sin th}{\sqrt{{\left(\sin kx\right)}^{2} + {\left(\sin ky\right)}^{2}}}\]
\frac{\sin ky}{\sqrt{{\left(\sin kx\right)}^{2} + {\left(\sin ky\right)}^{2}}} \cdot \sin th
\sin ky \cdot \frac{\sin th}{\sqrt{{\left(\sin kx\right)}^{2} + {\left(\sin ky\right)}^{2}}}
double code(double kx, double ky, double th) {
	return ((double) ((((double) sin(ky)) / ((double) sqrt(((double) (((double) pow(((double) sin(kx)), 2.0)) + ((double) pow(((double) sin(ky)), 2.0))))))) * ((double) sin(th))));
}
double code(double kx, double ky, double th) {
	return ((double) (((double) sin(ky)) * (((double) sin(th)) / ((double) sqrt(((double) (((double) pow(((double) sin(kx)), 2.0)) + ((double) pow(((double) sin(ky)), 2.0)))))))));
}

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 3.8

    \[\frac{\sin ky}{\sqrt{{\left(\sin kx\right)}^{2} + {\left(\sin ky\right)}^{2}}} \cdot \sin th\]
  2. Using strategy rm
  3. Applied div-inv3.9

    \[\leadsto \color{blue}{\left(\sin ky \cdot \frac{1}{\sqrt{{\left(\sin kx\right)}^{2} + {\left(\sin ky\right)}^{2}}}\right)} \cdot \sin th\]
  4. Applied associate-*l*3.9

    \[\leadsto \color{blue}{\sin ky \cdot \left(\frac{1}{\sqrt{{\left(\sin kx\right)}^{2} + {\left(\sin ky\right)}^{2}}} \cdot \sin th\right)}\]
  5. Simplified3.8

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

    \[\leadsto \sin ky \cdot \frac{\sin th}{\sqrt{{\left(\sin kx\right)}^{2} + {\left(\sin ky\right)}^{2}}}\]

Reproduce

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