Average Error: 1.1 → 1.1
Time: 7.4s
Precision: binary64
\[\sqrt{\frac{1}{2} \cdot \left(1 + \frac{1}{\sqrt{1 + {\left(\frac{2 \cdot \ell}{Om}\right)}^{2} \cdot \left({\left(\sin kx\right)}^{2} + {\left(\sin ky\right)}^{2}\right)}}\right)}\]
\[\sqrt{\frac{1}{2} \cdot \left(1 + \frac{1}{\sqrt{1 + {\left(\frac{2 \cdot \ell}{Om}\right)}^{2} \cdot \left({\left(\sin kx\right)}^{2} + {\left(\sin ky\right)}^{2}\right)}}\right)}\]
\sqrt{\frac{1}{2} \cdot \left(1 + \frac{1}{\sqrt{1 + {\left(\frac{2 \cdot \ell}{Om}\right)}^{2} \cdot \left({\left(\sin kx\right)}^{2} + {\left(\sin ky\right)}^{2}\right)}}\right)}
\sqrt{\frac{1}{2} \cdot \left(1 + \frac{1}{\sqrt{1 + {\left(\frac{2 \cdot \ell}{Om}\right)}^{2} \cdot \left({\left(\sin kx\right)}^{2} + {\left(\sin ky\right)}^{2}\right)}}\right)}
(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
 (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) {
	return ((double) sqrt(((double) ((1.0 / 2.0) * ((double) (1.0 + (1.0 / ((double) sqrt(((double) (1.0 + ((double) (((double) pow((((double) (2.0 * l)) / Om), 2.0)) * ((double) (((double) pow(((double) sin(kx)), 2.0)) + ((double) pow(((double) sin(ky)), 2.0)))))))))))))))));
}
double code(double l, double Om, double kx, double ky) {
	return ((double) sqrt(((double) ((1.0 / 2.0) * ((double) (1.0 + (1.0 / ((double) sqrt(((double) (1.0 + ((double) (((double) pow((((double) (2.0 * l)) / Om), 2.0)) * ((double) (((double) pow(((double) sin(kx)), 2.0)) + ((double) pow(((double) sin(ky)), 2.0)))))))))))))))));
}

Error

Bits error versus l

Bits error versus Om

Bits error versus kx

Bits error versus ky

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program Error: 1.1 bits

    \[\sqrt{\frac{1}{2} \cdot \left(1 + \frac{1}{\sqrt{1 + {\left(\frac{2 \cdot \ell}{Om}\right)}^{2} \cdot \left({\left(\sin kx\right)}^{2} + {\left(\sin ky\right)}^{2}\right)}}\right)}\]
  2. Final simplificationError: 1.1 bits

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

Reproduce

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