Average Error: 0.2 → 0.2
Time: 26.9s
Precision: binary32
Cost: 39552
\[\left(\left(\left(2.328306437 \cdot 10^{-10} \leq u0 \land u0 \leq 1\right) \land \left(2.328306437 \cdot 10^{-10} \leq u1 \land u1 \leq 0.5\right)\right) \land \left(0.0001 \leq alphax \land alphax \leq 1\right)\right) \land \left(0.0001 \leq alphay \land alphay \leq 1\right)\]
\[\frac{1}{\sqrt{1 + \frac{\frac{1}{\frac{\cos \tan^{-1} \left(\frac{alphay}{alphax} \cdot \tan \left(\left(2 \cdot \pi\right) \cdot u1 + 0.5 \cdot \pi\right)\right) \cdot \cos \tan^{-1} \left(\frac{alphay}{alphax} \cdot \tan \left(\left(2 \cdot \pi\right) \cdot u1 + 0.5 \cdot \pi\right)\right)}{alphax \cdot alphax} + \frac{\sin \tan^{-1} \left(\frac{alphay}{alphax} \cdot \tan \left(\left(2 \cdot \pi\right) \cdot u1 + 0.5 \cdot \pi\right)\right) \cdot \sin \tan^{-1} \left(\frac{alphay}{alphax} \cdot \tan \left(\left(2 \cdot \pi\right) \cdot u1 + 0.5 \cdot \pi\right)\right)}{alphay \cdot alphay}} \cdot u0}{1 - u0}}} \]
\[\begin{array}{l} t_0 := \frac{alphay}{alphax} \cdot \tan \left(\pi \cdot \mathsf{fma}\left(2, u1, 0.5\right)\right)\\ \frac{1}{\sqrt{1 + \frac{u0}{\left({\left(\frac{\sin \tan^{-1} t_0}{alphay}\right)}^{2} + {\left(\frac{\frac{1}{\mathsf{hypot}\left(1, t_0\right)}}{alphax}\right)}^{2}\right) \cdot \left(1 - u0\right)}}} \end{array} \]
(FPCore (u0 u1 alphax alphay)
 :precision binary32
 (/
  1.0
  (sqrt
   (+
    1.0
    (/
     (*
      (/
       1.0
       (+
        (/
         (*
          (cos
           (atan (* (/ alphay alphax) (tan (+ (* (* 2.0 PI) u1) (* 0.5 PI))))))
          (cos
           (atan
            (* (/ alphay alphax) (tan (+ (* (* 2.0 PI) u1) (* 0.5 PI)))))))
         (* alphax alphax))
        (/
         (*
          (sin
           (atan (* (/ alphay alphax) (tan (+ (* (* 2.0 PI) u1) (* 0.5 PI))))))
          (sin
           (atan
            (* (/ alphay alphax) (tan (+ (* (* 2.0 PI) u1) (* 0.5 PI)))))))
         (* alphay alphay))))
      u0)
     (- 1.0 u0))))))
(FPCore (u0 u1 alphax alphay)
 :precision binary32
 (let* ((t_0 (* (/ alphay alphax) (tan (* PI (fma 2.0 u1 0.5))))))
   (/
    1.0
    (sqrt
     (+
      1.0
      (/
       u0
       (*
        (+
         (pow (/ (sin (atan t_0)) alphay) 2.0)
         (pow (/ (/ 1.0 (hypot 1.0 t_0)) alphax) 2.0))
        (- 1.0 u0))))))))
float code(float u0, float u1, float alphax, float alphay) {
	return 1.0f / sqrtf((1.0f + (((1.0f / (((cosf(atanf(((alphay / alphax) * tanf((((2.0f * ((float) M_PI)) * u1) + (0.5f * ((float) M_PI))))))) * cosf(atanf(((alphay / alphax) * tanf((((2.0f * ((float) M_PI)) * u1) + (0.5f * ((float) M_PI)))))))) / (alphax * alphax)) + ((sinf(atanf(((alphay / alphax) * tanf((((2.0f * ((float) M_PI)) * u1) + (0.5f * ((float) M_PI))))))) * sinf(atanf(((alphay / alphax) * tanf((((2.0f * ((float) M_PI)) * u1) + (0.5f * ((float) M_PI)))))))) / (alphay * alphay)))) * u0) / (1.0f - u0))));
}
float code(float u0, float u1, float alphax, float alphay) {
	float t_0 = (alphay / alphax) * tanf((((float) M_PI) * fmaf(2.0f, u1, 0.5f)));
	return 1.0f / sqrtf((1.0f + (u0 / ((powf((sinf(atanf(t_0)) / alphay), 2.0f) + powf(((1.0f / hypotf(1.0f, t_0)) / alphax), 2.0f)) * (1.0f - u0)))));
}
function code(u0, u1, alphax, alphay)
	return Float32(Float32(1.0) / sqrt(Float32(Float32(1.0) + Float32(Float32(Float32(Float32(1.0) / Float32(Float32(Float32(cos(atan(Float32(Float32(alphay / alphax) * tan(Float32(Float32(Float32(Float32(2.0) * Float32(pi)) * u1) + Float32(Float32(0.5) * Float32(pi))))))) * cos(atan(Float32(Float32(alphay / alphax) * tan(Float32(Float32(Float32(Float32(2.0) * Float32(pi)) * u1) + Float32(Float32(0.5) * Float32(pi)))))))) / Float32(alphax * alphax)) + Float32(Float32(sin(atan(Float32(Float32(alphay / alphax) * tan(Float32(Float32(Float32(Float32(2.0) * Float32(pi)) * u1) + Float32(Float32(0.5) * Float32(pi))))))) * sin(atan(Float32(Float32(alphay / alphax) * tan(Float32(Float32(Float32(Float32(2.0) * Float32(pi)) * u1) + Float32(Float32(0.5) * Float32(pi)))))))) / Float32(alphay * alphay)))) * u0) / Float32(Float32(1.0) - u0)))))
end
function code(u0, u1, alphax, alphay)
	t_0 = Float32(Float32(alphay / alphax) * tan(Float32(Float32(pi) * fma(Float32(2.0), u1, Float32(0.5)))))
	return Float32(Float32(1.0) / sqrt(Float32(Float32(1.0) + Float32(u0 / Float32(Float32((Float32(sin(atan(t_0)) / alphay) ^ Float32(2.0)) + (Float32(Float32(Float32(1.0) / hypot(Float32(1.0), t_0)) / alphax) ^ Float32(2.0))) * Float32(Float32(1.0) - u0))))))
end
\frac{1}{\sqrt{1 + \frac{\frac{1}{\frac{\cos \tan^{-1} \left(\frac{alphay}{alphax} \cdot \tan \left(\left(2 \cdot \pi\right) \cdot u1 + 0.5 \cdot \pi\right)\right) \cdot \cos \tan^{-1} \left(\frac{alphay}{alphax} \cdot \tan \left(\left(2 \cdot \pi\right) \cdot u1 + 0.5 \cdot \pi\right)\right)}{alphax \cdot alphax} + \frac{\sin \tan^{-1} \left(\frac{alphay}{alphax} \cdot \tan \left(\left(2 \cdot \pi\right) \cdot u1 + 0.5 \cdot \pi\right)\right) \cdot \sin \tan^{-1} \left(\frac{alphay}{alphax} \cdot \tan \left(\left(2 \cdot \pi\right) \cdot u1 + 0.5 \cdot \pi\right)\right)}{alphay \cdot alphay}} \cdot u0}{1 - u0}}}
\begin{array}{l}
t_0 := \frac{alphay}{alphax} \cdot \tan \left(\pi \cdot \mathsf{fma}\left(2, u1, 0.5\right)\right)\\
\frac{1}{\sqrt{1 + \frac{u0}{\left({\left(\frac{\sin \tan^{-1} t_0}{alphay}\right)}^{2} + {\left(\frac{\frac{1}{\mathsf{hypot}\left(1, t_0\right)}}{alphax}\right)}^{2}\right) \cdot \left(1 - u0\right)}}}
\end{array}

Error

Derivation

  1. Initial program 0.2

    \[\frac{1}{\sqrt{1 + \frac{\frac{1}{\frac{\cos \tan^{-1} \left(\frac{alphay}{alphax} \cdot \tan \left(\left(2 \cdot \pi\right) \cdot u1 + 0.5 \cdot \pi\right)\right) \cdot \cos \tan^{-1} \left(\frac{alphay}{alphax} \cdot \tan \left(\left(2 \cdot \pi\right) \cdot u1 + 0.5 \cdot \pi\right)\right)}{alphax \cdot alphax} + \frac{\sin \tan^{-1} \left(\frac{alphay}{alphax} \cdot \tan \left(\left(2 \cdot \pi\right) \cdot u1 + 0.5 \cdot \pi\right)\right) \cdot \sin \tan^{-1} \left(\frac{alphay}{alphax} \cdot \tan \left(\left(2 \cdot \pi\right) \cdot u1 + 0.5 \cdot \pi\right)\right)}{alphay \cdot alphay}} \cdot u0}{1 - u0}}} \]
  2. Simplified0.2

    \[\leadsto \color{blue}{\frac{1}{\sqrt{1 + \frac{u0}{\mathsf{fma}\left(\frac{\sin \tan^{-1} \left(\frac{alphay}{alphax} \cdot \tan \left(\pi \cdot \left(2 \cdot u1 + 0.5\right)\right)\right)}{alphay}, \frac{\sin \tan^{-1} \left(\frac{alphay}{alphax} \cdot \tan \left(\pi \cdot \left(2 \cdot u1 + 0.5\right)\right)\right)}{alphay}, \frac{\cos \tan^{-1} \left(\frac{alphay}{alphax} \cdot \tan \left(\pi \cdot \left(2 \cdot u1 + 0.5\right)\right)\right) \cdot \cos \tan^{-1} \left(\frac{alphay}{alphax} \cdot \tan \left(\pi \cdot \left(2 \cdot u1 + 0.5\right)\right)\right)}{alphax \cdot alphax}\right) \cdot \left(1 - u0\right)}}}} \]
    Proof
    (/.f32 1 (sqrt.f32 (+.f32 1 (/.f32 u0 (*.f32 (fma.f32 (/.f32 (sin.f32 (atan.f32 (*.f32 (/.f32 alphay alphax) (tan.f32 (*.f32 (PI.f32) (+.f32 (*.f32 2 u1) 1/2)))))) alphay) (/.f32 (sin.f32 (atan.f32 (*.f32 (/.f32 alphay alphax) (tan.f32 (*.f32 (PI.f32) (+.f32 (*.f32 2 u1) 1/2)))))) alphay) (/.f32 (*.f32 (cos.f32 (atan.f32 (*.f32 (/.f32 alphay alphax) (tan.f32 (*.f32 (PI.f32) (+.f32 (*.f32 2 u1) 1/2)))))) (cos.f32 (atan.f32 (*.f32 (/.f32 alphay alphax) (tan.f32 (*.f32 (PI.f32) (+.f32 (*.f32 2 u1) 1/2))))))) (*.f32 alphax alphax))) (-.f32 1 u0)))))): 0 points increase in error, 0 points decrease in error
    (/.f32 1 (sqrt.f32 (+.f32 1 (/.f32 u0 (*.f32 (fma.f32 (/.f32 (sin.f32 (atan.f32 (*.f32 (/.f32 alphay alphax) (tan.f32 (Rewrite<= distribute-lft-out_binary32 (+.f32 (*.f32 (PI.f32) (*.f32 2 u1)) (*.f32 (PI.f32) 1/2))))))) alphay) (/.f32 (sin.f32 (atan.f32 (*.f32 (/.f32 alphay alphax) (tan.f32 (*.f32 (PI.f32) (+.f32 (*.f32 2 u1) 1/2)))))) alphay) (/.f32 (*.f32 (cos.f32 (atan.f32 (*.f32 (/.f32 alphay alphax) (tan.f32 (*.f32 (PI.f32) (+.f32 (*.f32 2 u1) 1/2)))))) (cos.f32 (atan.f32 (*.f32 (/.f32 alphay alphax) (tan.f32 (*.f32 (PI.f32) (+.f32 (*.f32 2 u1) 1/2))))))) (*.f32 alphax alphax))) (-.f32 1 u0)))))): 0 points increase in error, 0 points decrease in error
    (/.f32 1 (sqrt.f32 (+.f32 1 (/.f32 u0 (*.f32 (fma.f32 (/.f32 (sin.f32 (atan.f32 (*.f32 (/.f32 alphay alphax) (tan.f32 (+.f32 (Rewrite<= associate-*l*_binary32 (*.f32 (*.f32 (PI.f32) 2) u1)) (*.f32 (PI.f32) 1/2)))))) alphay) (/.f32 (sin.f32 (atan.f32 (*.f32 (/.f32 alphay alphax) (tan.f32 (*.f32 (PI.f32) (+.f32 (*.f32 2 u1) 1/2)))))) alphay) (/.f32 (*.f32 (cos.f32 (atan.f32 (*.f32 (/.f32 alphay alphax) (tan.f32 (*.f32 (PI.f32) (+.f32 (*.f32 2 u1) 1/2)))))) (cos.f32 (atan.f32 (*.f32 (/.f32 alphay alphax) (tan.f32 (*.f32 (PI.f32) (+.f32 (*.f32 2 u1) 1/2))))))) (*.f32 alphax alphax))) (-.f32 1 u0)))))): 0 points increase in error, 0 points decrease in error
    (/.f32 1 (sqrt.f32 (+.f32 1 (/.f32 u0 (*.f32 (fma.f32 (/.f32 (sin.f32 (atan.f32 (*.f32 (/.f32 alphay alphax) (tan.f32 (+.f32 (*.f32 (Rewrite<= *-commutative_binary32 (*.f32 2 (PI.f32))) u1) (*.f32 (PI.f32) 1/2)))))) alphay) (/.f32 (sin.f32 (atan.f32 (*.f32 (/.f32 alphay alphax) (tan.f32 (*.f32 (PI.f32) (+.f32 (*.f32 2 u1) 1/2)))))) alphay) (/.f32 (*.f32 (cos.f32 (atan.f32 (*.f32 (/.f32 alphay alphax) (tan.f32 (*.f32 (PI.f32) (+.f32 (*.f32 2 u1) 1/2)))))) (cos.f32 (atan.f32 (*.f32 (/.f32 alphay alphax) (tan.f32 (*.f32 (PI.f32) (+.f32 (*.f32 2 u1) 1/2))))))) (*.f32 alphax alphax))) (-.f32 1 u0)))))): 0 points increase in error, 0 points decrease in error
    (/.f32 1 (sqrt.f32 (+.f32 1 (/.f32 u0 (*.f32 (fma.f32 (/.f32 (sin.f32 (atan.f32 (*.f32 (/.f32 alphay alphax) (tan.f32 (+.f32 (*.f32 (*.f32 2 (PI.f32)) u1) (Rewrite<= *-commutative_binary32 (*.f32 1/2 (PI.f32)))))))) alphay) (/.f32 (sin.f32 (atan.f32 (*.f32 (/.f32 alphay alphax) (tan.f32 (*.f32 (PI.f32) (+.f32 (*.f32 2 u1) 1/2)))))) alphay) (/.f32 (*.f32 (cos.f32 (atan.f32 (*.f32 (/.f32 alphay alphax) (tan.f32 (*.f32 (PI.f32) (+.f32 (*.f32 2 u1) 1/2)))))) (cos.f32 (atan.f32 (*.f32 (/.f32 alphay alphax) (tan.f32 (*.f32 (PI.f32) (+.f32 (*.f32 2 u1) 1/2))))))) (*.f32 alphax alphax))) (-.f32 1 u0)))))): 0 points increase in error, 0 points decrease in error
    (/.f32 1 (sqrt.f32 (+.f32 1 (/.f32 u0 (*.f32 (fma.f32 (/.f32 (sin.f32 (atan.f32 (*.f32 (/.f32 alphay alphax) (tan.f32 (+.f32 (*.f32 (*.f32 2 (PI.f32)) u1) (*.f32 1/2 (PI.f32))))))) alphay) (/.f32 (sin.f32 (atan.f32 (*.f32 (/.f32 alphay alphax) (tan.f32 (Rewrite<= distribute-lft-out_binary32 (+.f32 (*.f32 (PI.f32) (*.f32 2 u1)) (*.f32 (PI.f32) 1/2))))))) alphay) (/.f32 (*.f32 (cos.f32 (atan.f32 (*.f32 (/.f32 alphay alphax) (tan.f32 (*.f32 (PI.f32) (+.f32 (*.f32 2 u1) 1/2)))))) (cos.f32 (atan.f32 (*.f32 (/.f32 alphay alphax) (tan.f32 (*.f32 (PI.f32) (+.f32 (*.f32 2 u1) 1/2))))))) (*.f32 alphax alphax))) (-.f32 1 u0)))))): 0 points increase in error, 0 points decrease in error
    (/.f32 1 (sqrt.f32 (+.f32 1 (/.f32 u0 (*.f32 (fma.f32 (/.f32 (sin.f32 (atan.f32 (*.f32 (/.f32 alphay alphax) (tan.f32 (+.f32 (*.f32 (*.f32 2 (PI.f32)) u1) (*.f32 1/2 (PI.f32))))))) alphay) (/.f32 (sin.f32 (atan.f32 (*.f32 (/.f32 alphay alphax) (tan.f32 (+.f32 (Rewrite<= associate-*l*_binary32 (*.f32 (*.f32 (PI.f32) 2) u1)) (*.f32 (PI.f32) 1/2)))))) alphay) (/.f32 (*.f32 (cos.f32 (atan.f32 (*.f32 (/.f32 alphay alphax) (tan.f32 (*.f32 (PI.f32) (+.f32 (*.f32 2 u1) 1/2)))))) (cos.f32 (atan.f32 (*.f32 (/.f32 alphay alphax) (tan.f32 (*.f32 (PI.f32) (+.f32 (*.f32 2 u1) 1/2))))))) (*.f32 alphax alphax))) (-.f32 1 u0)))))): 0 points increase in error, 0 points decrease in error
    (/.f32 1 (sqrt.f32 (+.f32 1 (/.f32 u0 (*.f32 (fma.f32 (/.f32 (sin.f32 (atan.f32 (*.f32 (/.f32 alphay alphax) (tan.f32 (+.f32 (*.f32 (*.f32 2 (PI.f32)) u1) (*.f32 1/2 (PI.f32))))))) alphay) (/.f32 (sin.f32 (atan.f32 (*.f32 (/.f32 alphay alphax) (tan.f32 (+.f32 (*.f32 (Rewrite<= *-commutative_binary32 (*.f32 2 (PI.f32))) u1) (*.f32 (PI.f32) 1/2)))))) alphay) (/.f32 (*.f32 (cos.f32 (atan.f32 (*.f32 (/.f32 alphay alphax) (tan.f32 (*.f32 (PI.f32) (+.f32 (*.f32 2 u1) 1/2)))))) (cos.f32 (atan.f32 (*.f32 (/.f32 alphay alphax) (tan.f32 (*.f32 (PI.f32) (+.f32 (*.f32 2 u1) 1/2))))))) (*.f32 alphax alphax))) (-.f32 1 u0)))))): 0 points increase in error, 0 points decrease in error
    (/.f32 1 (sqrt.f32 (+.f32 1 (/.f32 u0 (*.f32 (fma.f32 (/.f32 (sin.f32 (atan.f32 (*.f32 (/.f32 alphay alphax) (tan.f32 (+.f32 (*.f32 (*.f32 2 (PI.f32)) u1) (*.f32 1/2 (PI.f32))))))) alphay) (/.f32 (sin.f32 (atan.f32 (*.f32 (/.f32 alphay alphax) (tan.f32 (+.f32 (*.f32 (*.f32 2 (PI.f32)) u1) (Rewrite<= *-commutative_binary32 (*.f32 1/2 (PI.f32)))))))) alphay) (/.f32 (*.f32 (cos.f32 (atan.f32 (*.f32 (/.f32 alphay alphax) (tan.f32 (*.f32 (PI.f32) (+.f32 (*.f32 2 u1) 1/2)))))) (cos.f32 (atan.f32 (*.f32 (/.f32 alphay alphax) (tan.f32 (*.f32 (PI.f32) (+.f32 (*.f32 2 u1) 1/2))))))) (*.f32 alphax alphax))) (-.f32 1 u0)))))): 0 points increase in error, 0 points decrease in error
    (/.f32 1 (sqrt.f32 (+.f32 1 (/.f32 u0 (*.f32 (fma.f32 (/.f32 (sin.f32 (atan.f32 (*.f32 (/.f32 alphay alphax) (tan.f32 (+.f32 (*.f32 (*.f32 2 (PI.f32)) u1) (*.f32 1/2 (PI.f32))))))) alphay) (/.f32 (sin.f32 (atan.f32 (*.f32 (/.f32 alphay alphax) (tan.f32 (+.f32 (*.f32 (*.f32 2 (PI.f32)) u1) (*.f32 1/2 (PI.f32))))))) alphay) (/.f32 (*.f32 (cos.f32 (atan.f32 (*.f32 (/.f32 alphay alphax) (tan.f32 (Rewrite<= distribute-lft-out_binary32 (+.f32 (*.f32 (PI.f32) (*.f32 2 u1)) (*.f32 (PI.f32) 1/2))))))) (cos.f32 (atan.f32 (*.f32 (/.f32 alphay alphax) (tan.f32 (*.f32 (PI.f32) (+.f32 (*.f32 2 u1) 1/2))))))) (*.f32 alphax alphax))) (-.f32 1 u0)))))): 0 points increase in error, 0 points decrease in error
    (/.f32 1 (sqrt.f32 (+.f32 1 (/.f32 u0 (*.f32 (fma.f32 (/.f32 (sin.f32 (atan.f32 (*.f32 (/.f32 alphay alphax) (tan.f32 (+.f32 (*.f32 (*.f32 2 (PI.f32)) u1) (*.f32 1/2 (PI.f32))))))) alphay) (/.f32 (sin.f32 (atan.f32 (*.f32 (/.f32 alphay alphax) (tan.f32 (+.f32 (*.f32 (*.f32 2 (PI.f32)) u1) (*.f32 1/2 (PI.f32))))))) alphay) (/.f32 (*.f32 (cos.f32 (atan.f32 (*.f32 (/.f32 alphay alphax) (tan.f32 (+.f32 (Rewrite<= associate-*l*_binary32 (*.f32 (*.f32 (PI.f32) 2) u1)) (*.f32 (PI.f32) 1/2)))))) (cos.f32 (atan.f32 (*.f32 (/.f32 alphay alphax) (tan.f32 (*.f32 (PI.f32) (+.f32 (*.f32 2 u1) 1/2))))))) (*.f32 alphax alphax))) (-.f32 1 u0)))))): 0 points increase in error, 0 points decrease in error
    (/.f32 1 (sqrt.f32 (+.f32 1 (/.f32 u0 (*.f32 (fma.f32 (/.f32 (sin.f32 (atan.f32 (*.f32 (/.f32 alphay alphax) (tan.f32 (+.f32 (*.f32 (*.f32 2 (PI.f32)) u1) (*.f32 1/2 (PI.f32))))))) alphay) (/.f32 (sin.f32 (atan.f32 (*.f32 (/.f32 alphay alphax) (tan.f32 (+.f32 (*.f32 (*.f32 2 (PI.f32)) u1) (*.f32 1/2 (PI.f32))))))) alphay) (/.f32 (*.f32 (cos.f32 (atan.f32 (*.f32 (/.f32 alphay alphax) (tan.f32 (+.f32 (*.f32 (Rewrite<= *-commutative_binary32 (*.f32 2 (PI.f32))) u1) (*.f32 (PI.f32) 1/2)))))) (cos.f32 (atan.f32 (*.f32 (/.f32 alphay alphax) (tan.f32 (*.f32 (PI.f32) (+.f32 (*.f32 2 u1) 1/2))))))) (*.f32 alphax alphax))) (-.f32 1 u0)))))): 0 points increase in error, 0 points decrease in error
    (/.f32 1 (sqrt.f32 (+.f32 1 (/.f32 u0 (*.f32 (fma.f32 (/.f32 (sin.f32 (atan.f32 (*.f32 (/.f32 alphay alphax) (tan.f32 (+.f32 (*.f32 (*.f32 2 (PI.f32)) u1) (*.f32 1/2 (PI.f32))))))) alphay) (/.f32 (sin.f32 (atan.f32 (*.f32 (/.f32 alphay alphax) (tan.f32 (+.f32 (*.f32 (*.f32 2 (PI.f32)) u1) (*.f32 1/2 (PI.f32))))))) alphay) (/.f32 (*.f32 (cos.f32 (atan.f32 (*.f32 (/.f32 alphay alphax) (tan.f32 (+.f32 (*.f32 (*.f32 2 (PI.f32)) u1) (Rewrite<= *-commutative_binary32 (*.f32 1/2 (PI.f32)))))))) (cos.f32 (atan.f32 (*.f32 (/.f32 alphay alphax) (tan.f32 (*.f32 (PI.f32) (+.f32 (*.f32 2 u1) 1/2))))))) (*.f32 alphax alphax))) (-.f32 1 u0)))))): 0 points increase in error, 0 points decrease in error
    (/.f32 1 (sqrt.f32 (+.f32 1 (/.f32 u0 (*.f32 (fma.f32 (/.f32 (sin.f32 (atan.f32 (*.f32 (/.f32 alphay alphax) (tan.f32 (+.f32 (*.f32 (*.f32 2 (PI.f32)) u1) (*.f32 1/2 (PI.f32))))))) alphay) (/.f32 (sin.f32 (atan.f32 (*.f32 (/.f32 alphay alphax) (tan.f32 (+.f32 (*.f32 (*.f32 2 (PI.f32)) u1) (*.f32 1/2 (PI.f32))))))) alphay) (/.f32 (*.f32 (cos.f32 (atan.f32 (*.f32 (/.f32 alphay alphax) (tan.f32 (+.f32 (*.f32 (*.f32 2 (PI.f32)) u1) (*.f32 1/2 (PI.f32))))))) (cos.f32 (atan.f32 (*.f32 (/.f32 alphay alphax) (tan.f32 (Rewrite<= distribute-lft-out_binary32 (+.f32 (*.f32 (PI.f32) (*.f32 2 u1)) (*.f32 (PI.f32) 1/2)))))))) (*.f32 alphax alphax))) (-.f32 1 u0)))))): 0 points increase in error, 0 points decrease in error
    (/.f32 1 (sqrt.f32 (+.f32 1 (/.f32 u0 (*.f32 (fma.f32 (/.f32 (sin.f32 (atan.f32 (*.f32 (/.f32 alphay alphax) (tan.f32 (+.f32 (*.f32 (*.f32 2 (PI.f32)) u1) (*.f32 1/2 (PI.f32))))))) alphay) (/.f32 (sin.f32 (atan.f32 (*.f32 (/.f32 alphay alphax) (tan.f32 (+.f32 (*.f32 (*.f32 2 (PI.f32)) u1) (*.f32 1/2 (PI.f32))))))) alphay) (/.f32 (*.f32 (cos.f32 (atan.f32 (*.f32 (/.f32 alphay alphax) (tan.f32 (+.f32 (*.f32 (*.f32 2 (PI.f32)) u1) (*.f32 1/2 (PI.f32))))))) (cos.f32 (atan.f32 (*.f32 (/.f32 alphay alphax) (tan.f32 (+.f32 (Rewrite<= associate-*l*_binary32 (*.f32 (*.f32 (PI.f32) 2) u1)) (*.f32 (PI.f32) 1/2))))))) (*.f32 alphax alphax))) (-.f32 1 u0)))))): 0 points increase in error, 0 points decrease in error
    (/.f32 1 (sqrt.f32 (+.f32 1 (/.f32 u0 (*.f32 (fma.f32 (/.f32 (sin.f32 (atan.f32 (*.f32 (/.f32 alphay alphax) (tan.f32 (+.f32 (*.f32 (*.f32 2 (PI.f32)) u1) (*.f32 1/2 (PI.f32))))))) alphay) (/.f32 (sin.f32 (atan.f32 (*.f32 (/.f32 alphay alphax) (tan.f32 (+.f32 (*.f32 (*.f32 2 (PI.f32)) u1) (*.f32 1/2 (PI.f32))))))) alphay) (/.f32 (*.f32 (cos.f32 (atan.f32 (*.f32 (/.f32 alphay alphax) (tan.f32 (+.f32 (*.f32 (*.f32 2 (PI.f32)) u1) (*.f32 1/2 (PI.f32))))))) (cos.f32 (atan.f32 (*.f32 (/.f32 alphay alphax) (tan.f32 (+.f32 (*.f32 (Rewrite<= *-commutative_binary32 (*.f32 2 (PI.f32))) u1) (*.f32 (PI.f32) 1/2))))))) (*.f32 alphax alphax))) (-.f32 1 u0)))))): 0 points increase in error, 0 points decrease in error
    (/.f32 1 (sqrt.f32 (+.f32 1 (/.f32 u0 (*.f32 (fma.f32 (/.f32 (sin.f32 (atan.f32 (*.f32 (/.f32 alphay alphax) (tan.f32 (+.f32 (*.f32 (*.f32 2 (PI.f32)) u1) (*.f32 1/2 (PI.f32))))))) alphay) (/.f32 (sin.f32 (atan.f32 (*.f32 (/.f32 alphay alphax) (tan.f32 (+.f32 (*.f32 (*.f32 2 (PI.f32)) u1) (*.f32 1/2 (PI.f32))))))) alphay) (/.f32 (*.f32 (cos.f32 (atan.f32 (*.f32 (/.f32 alphay alphax) (tan.f32 (+.f32 (*.f32 (*.f32 2 (PI.f32)) u1) (*.f32 1/2 (PI.f32))))))) (cos.f32 (atan.f32 (*.f32 (/.f32 alphay alphax) (tan.f32 (+.f32 (*.f32 (*.f32 2 (PI.f32)) u1) (Rewrite<= *-commutative_binary32 (*.f32 1/2 (PI.f32))))))))) (*.f32 alphax alphax))) (-.f32 1 u0)))))): 0 points increase in error, 0 points decrease in error
    (/.f32 1 (sqrt.f32 (+.f32 1 (/.f32 u0 (*.f32 (Rewrite<= fma-def_binary32 (+.f32 (*.f32 (/.f32 (sin.f32 (atan.f32 (*.f32 (/.f32 alphay alphax) (tan.f32 (+.f32 (*.f32 (*.f32 2 (PI.f32)) u1) (*.f32 1/2 (PI.f32))))))) alphay) (/.f32 (sin.f32 (atan.f32 (*.f32 (/.f32 alphay alphax) (tan.f32 (+.f32 (*.f32 (*.f32 2 (PI.f32)) u1) (*.f32 1/2 (PI.f32))))))) alphay)) (/.f32 (*.f32 (cos.f32 (atan.f32 (*.f32 (/.f32 alphay alphax) (tan.f32 (+.f32 (*.f32 (*.f32 2 (PI.f32)) u1) (*.f32 1/2 (PI.f32))))))) (cos.f32 (atan.f32 (*.f32 (/.f32 alphay alphax) (tan.f32 (+.f32 (*.f32 (*.f32 2 (PI.f32)) u1) (*.f32 1/2 (PI.f32)))))))) (*.f32 alphax alphax)))) (-.f32 1 u0)))))): 0 points increase in error, 0 points decrease in error
    (/.f32 1 (sqrt.f32 (+.f32 1 (/.f32 u0 (*.f32 (+.f32 (Rewrite<= times-frac_binary32 (/.f32 (*.f32 (sin.f32 (atan.f32 (*.f32 (/.f32 alphay alphax) (tan.f32 (+.f32 (*.f32 (*.f32 2 (PI.f32)) u1) (*.f32 1/2 (PI.f32))))))) (sin.f32 (atan.f32 (*.f32 (/.f32 alphay alphax) (tan.f32 (+.f32 (*.f32 (*.f32 2 (PI.f32)) u1) (*.f32 1/2 (PI.f32)))))))) (*.f32 alphay alphay))) (/.f32 (*.f32 (cos.f32 (atan.f32 (*.f32 (/.f32 alphay alphax) (tan.f32 (+.f32 (*.f32 (*.f32 2 (PI.f32)) u1) (*.f32 1/2 (PI.f32))))))) (cos.f32 (atan.f32 (*.f32 (/.f32 alphay alphax) (tan.f32 (+.f32 (*.f32 (*.f32 2 (PI.f32)) u1) (*.f32 1/2 (PI.f32)))))))) (*.f32 alphax alphax))) (-.f32 1 u0)))))): 0 points increase in error, 0 points decrease in error
    (/.f32 1 (sqrt.f32 (+.f32 1 (/.f32 u0 (*.f32 (Rewrite<= +-commutative_binary32 (+.f32 (/.f32 (*.f32 (cos.f32 (atan.f32 (*.f32 (/.f32 alphay alphax) (tan.f32 (+.f32 (*.f32 (*.f32 2 (PI.f32)) u1) (*.f32 1/2 (PI.f32))))))) (cos.f32 (atan.f32 (*.f32 (/.f32 alphay alphax) (tan.f32 (+.f32 (*.f32 (*.f32 2 (PI.f32)) u1) (*.f32 1/2 (PI.f32)))))))) (*.f32 alphax alphax)) (/.f32 (*.f32 (sin.f32 (atan.f32 (*.f32 (/.f32 alphay alphax) (tan.f32 (+.f32 (*.f32 (*.f32 2 (PI.f32)) u1) (*.f32 1/2 (PI.f32))))))) (sin.f32 (atan.f32 (*.f32 (/.f32 alphay alphax) (tan.f32 (+.f32 (*.f32 (*.f32 2 (PI.f32)) u1) (*.f32 1/2 (PI.f32)))))))) (*.f32 alphay alphay)))) (-.f32 1 u0)))))): 0 points increase in error, 0 points decrease in error
    (/.f32 1 (sqrt.f32 (+.f32 1 (/.f32 u0 (Rewrite<= *-commutative_binary32 (*.f32 (-.f32 1 u0) (+.f32 (/.f32 (*.f32 (cos.f32 (atan.f32 (*.f32 (/.f32 alphay alphax) (tan.f32 (+.f32 (*.f32 (*.f32 2 (PI.f32)) u1) (*.f32 1/2 (PI.f32))))))) (cos.f32 (atan.f32 (*.f32 (/.f32 alphay alphax) (tan.f32 (+.f32 (*.f32 (*.f32 2 (PI.f32)) u1) (*.f32 1/2 (PI.f32)))))))) (*.f32 alphax alphax)) (/.f32 (*.f32 (sin.f32 (atan.f32 (*.f32 (/.f32 alphay alphax) (tan.f32 (+.f32 (*.f32 (*.f32 2 (PI.f32)) u1) (*.f32 1/2 (PI.f32))))))) (sin.f32 (atan.f32 (*.f32 (/.f32 alphay alphax) (tan.f32 (+.f32 (*.f32 (*.f32 2 (PI.f32)) u1) (*.f32 1/2 (PI.f32)))))))) (*.f32 alphay alphay))))))))): 0 points increase in error, 0 points decrease in error
    (/.f32 1 (sqrt.f32 (+.f32 1 (/.f32 u0 (*.f32 (Rewrite<= /-rgt-identity_binary32 (/.f32 (-.f32 1 u0) 1)) (+.f32 (/.f32 (*.f32 (cos.f32 (atan.f32 (*.f32 (/.f32 alphay alphax) (tan.f32 (+.f32 (*.f32 (*.f32 2 (PI.f32)) u1) (*.f32 1/2 (PI.f32))))))) (cos.f32 (atan.f32 (*.f32 (/.f32 alphay alphax) (tan.f32 (+.f32 (*.f32 (*.f32 2 (PI.f32)) u1) (*.f32 1/2 (PI.f32)))))))) (*.f32 alphax alphax)) (/.f32 (*.f32 (sin.f32 (atan.f32 (*.f32 (/.f32 alphay alphax) (tan.f32 (+.f32 (*.f32 (*.f32 2 (PI.f32)) u1) (*.f32 1/2 (PI.f32))))))) (sin.f32 (atan.f32 (*.f32 (/.f32 alphay alphax) (tan.f32 (+.f32 (*.f32 (*.f32 2 (PI.f32)) u1) (*.f32 1/2 (PI.f32)))))))) (*.f32 alphay alphay)))))))): 0 points increase in error, 0 points decrease in error
    (/.f32 1 (sqrt.f32 (+.f32 1 (/.f32 u0 (Rewrite<= associate-/r/_binary32 (/.f32 (-.f32 1 u0) (/.f32 1 (+.f32 (/.f32 (*.f32 (cos.f32 (atan.f32 (*.f32 (/.f32 alphay alphax) (tan.f32 (+.f32 (*.f32 (*.f32 2 (PI.f32)) u1) (*.f32 1/2 (PI.f32))))))) (cos.f32 (atan.f32 (*.f32 (/.f32 alphay alphax) (tan.f32 (+.f32 (*.f32 (*.f32 2 (PI.f32)) u1) (*.f32 1/2 (PI.f32)))))))) (*.f32 alphax alphax)) (/.f32 (*.f32 (sin.f32 (atan.f32 (*.f32 (/.f32 alphay alphax) (tan.f32 (+.f32 (*.f32 (*.f32 2 (PI.f32)) u1) (*.f32 1/2 (PI.f32))))))) (sin.f32 (atan.f32 (*.f32 (/.f32 alphay alphax) (tan.f32 (+.f32 (*.f32 (*.f32 2 (PI.f32)) u1) (*.f32 1/2 (PI.f32)))))))) (*.f32 alphay alphay)))))))))): 0 points increase in error, 0 points decrease in error
    (/.f32 1 (sqrt.f32 (+.f32 1 (Rewrite<= associate-/l*_binary32 (/.f32 (*.f32 u0 (/.f32 1 (+.f32 (/.f32 (*.f32 (cos.f32 (atan.f32 (*.f32 (/.f32 alphay alphax) (tan.f32 (+.f32 (*.f32 (*.f32 2 (PI.f32)) u1) (*.f32 1/2 (PI.f32))))))) (cos.f32 (atan.f32 (*.f32 (/.f32 alphay alphax) (tan.f32 (+.f32 (*.f32 (*.f32 2 (PI.f32)) u1) (*.f32 1/2 (PI.f32)))))))) (*.f32 alphax alphax)) (/.f32 (*.f32 (sin.f32 (atan.f32 (*.f32 (/.f32 alphay alphax) (tan.f32 (+.f32 (*.f32 (*.f32 2 (PI.f32)) u1) (*.f32 1/2 (PI.f32))))))) (sin.f32 (atan.f32 (*.f32 (/.f32 alphay alphax) (tan.f32 (+.f32 (*.f32 (*.f32 2 (PI.f32)) u1) (*.f32 1/2 (PI.f32)))))))) (*.f32 alphay alphay))))) (-.f32 1 u0)))))): 0 points increase in error, 0 points decrease in error
    (/.f32 1 (sqrt.f32 (+.f32 1 (/.f32 (Rewrite<= *-commutative_binary32 (*.f32 (/.f32 1 (+.f32 (/.f32 (*.f32 (cos.f32 (atan.f32 (*.f32 (/.f32 alphay alphax) (tan.f32 (+.f32 (*.f32 (*.f32 2 (PI.f32)) u1) (*.f32 1/2 (PI.f32))))))) (cos.f32 (atan.f32 (*.f32 (/.f32 alphay alphax) (tan.f32 (+.f32 (*.f32 (*.f32 2 (PI.f32)) u1) (*.f32 1/2 (PI.f32)))))))) (*.f32 alphax alphax)) (/.f32 (*.f32 (sin.f32 (atan.f32 (*.f32 (/.f32 alphay alphax) (tan.f32 (+.f32 (*.f32 (*.f32 2 (PI.f32)) u1) (*.f32 1/2 (PI.f32))))))) (sin.f32 (atan.f32 (*.f32 (/.f32 alphay alphax) (tan.f32 (+.f32 (*.f32 (*.f32 2 (PI.f32)) u1) (*.f32 1/2 (PI.f32)))))))) (*.f32 alphay alphay)))) u0)) (-.f32 1 u0))))): 0 points increase in error, 0 points decrease in error
  3. Applied egg-rr0.2

    \[\leadsto \frac{1}{\sqrt{1 + \frac{u0}{\color{blue}{\left({\left(\frac{\sin \tan^{-1} \left(\frac{alphay}{alphax} \cdot \tan \left(\pi \cdot \mathsf{fma}\left(2, u1, 0.5\right)\right)\right)}{alphay}\right)}^{2} + {\left(\frac{\cos \tan^{-1} \left(\frac{alphay}{alphax} \cdot \tan \left(\pi \cdot \mathsf{fma}\left(2, u1, 0.5\right)\right)\right)}{alphax}\right)}^{2}\right)} \cdot \left(1 - u0\right)}}} \]
  4. Applied egg-rr0.2

    \[\leadsto \frac{1}{\sqrt{1 + \frac{u0}{\left({\left(\frac{\sin \tan^{-1} \left(\frac{alphay}{alphax} \cdot \tan \left(\pi \cdot \mathsf{fma}\left(2, u1, 0.5\right)\right)\right)}{alphay}\right)}^{2} + {\left(\frac{\color{blue}{\frac{1}{\mathsf{hypot}\left(1, \frac{alphay}{alphax} \cdot \tan \left(\pi \cdot \mathsf{fma}\left(2, u1, 0.5\right)\right)\right)}}}{alphax}\right)}^{2}\right) \cdot \left(1 - u0\right)}}} \]
  5. Simplified0.2

    \[\leadsto \frac{1}{\sqrt{1 + \frac{u0}{\left({\left(\frac{\sin \tan^{-1} \left(\frac{alphay}{alphax} \cdot \tan \left(\pi \cdot \mathsf{fma}\left(2, u1, 0.5\right)\right)\right)}{alphay}\right)}^{2} + {\left(\frac{\color{blue}{\frac{1}{\mathsf{hypot}\left(1, \frac{alphay}{alphax} \cdot \tan \left(\mathsf{fma}\left(2, u1, 0.5\right) \cdot \pi\right)\right)}}}{alphax}\right)}^{2}\right) \cdot \left(1 - u0\right)}}} \]
    Proof
    (/.f32 1 (hypot.f32 1 (*.f32 (/.f32 alphay alphax) (tan.f32 (*.f32 (fma.f32 2 u1 1/2) (PI.f32)))))): 0 points increase in error, 0 points decrease in error
    (/.f32 1 (hypot.f32 1 (*.f32 (/.f32 alphay alphax) (tan.f32 (Rewrite<= *-commutative_binary32 (*.f32 (PI.f32) (fma.f32 2 u1 1/2))))))): 0 points increase in error, 0 points decrease in error
  6. Final simplification0.2

    \[\leadsto \frac{1}{\sqrt{1 + \frac{u0}{\left({\left(\frac{\sin \tan^{-1} \left(\frac{alphay}{alphax} \cdot \tan \left(\pi \cdot \mathsf{fma}\left(2, u1, 0.5\right)\right)\right)}{alphay}\right)}^{2} + {\left(\frac{\frac{1}{\mathsf{hypot}\left(1, \frac{alphay}{alphax} \cdot \tan \left(\pi \cdot \mathsf{fma}\left(2, u1, 0.5\right)\right)\right)}}{alphax}\right)}^{2}\right) \cdot \left(1 - u0\right)}}} \]

Alternatives

Alternative 1
Error0.2
Cost39488
\[\begin{array}{l} t_0 := \frac{alphay}{alphax} \cdot \tan \left(\pi \cdot \mathsf{fma}\left(2, u1, 0.5\right)\right)\\ \frac{1}{\sqrt{1 + \frac{u0}{\left(1 - u0\right) \cdot {\left(\mathsf{hypot}\left(\frac{\sin \tan^{-1} t_0}{alphay}, \frac{\frac{1}{\mathsf{hypot}\left(1, t_0\right)}}{alphax}\right)\right)}^{2}}}} \end{array} \]
Alternative 2
Error0.5
Cost39328
\[\frac{1}{\sqrt{1 + \frac{u0}{\left(1 - u0\right) \cdot {\left(\mathsf{hypot}\left(\frac{\sin \tan^{-1} \left(\frac{alphay}{alphax} \cdot \tan \left(\pi \cdot 0.5\right)\right)}{alphay}, \frac{\cos \tan^{-1} \left(\frac{alphay}{alphax} \cdot \tan \left(\pi \cdot \mathsf{fma}\left(2, u1, 0.5\right)\right)\right)}{alphax}\right)\right)}^{2}}}} \]
Alternative 3
Error0.7
Cost23072
\[\frac{1}{\sqrt{1 + \frac{u0}{{\left(\frac{\sin \tan^{-1} \left(\frac{alphay}{alphax} \cdot \tan \left(\pi \cdot \mathsf{fma}\left(2, u1, 0.5\right)\right)\right)}{alphay}\right)}^{2} \cdot \left(1 - u0\right)}}} \]
Alternative 4
Error1.4
Cost19808
\[\frac{1}{\sqrt{1 + \frac{u0}{{\left(\frac{\sin \tan^{-1} \left(alphay \cdot \frac{\tan \left(\pi \cdot 0.5\right)}{alphax}\right)}{alphay}\right)}^{2}} \cdot \left(1 + u0\right)}} \]
Alternative 5
Error0.7
Cost19808
\[\frac{1}{\sqrt{1 + \frac{u0}{\left(1 - u0\right) \cdot {\left(\frac{\sin \tan^{-1} \left(\frac{alphay}{alphax} \cdot \tan \left(\pi \cdot 0.5\right)\right)}{alphay}\right)}^{2}}}} \]
Alternative 6
Error1.7
Cost19680
\[\frac{1}{\sqrt{1 + \frac{u0}{{\left(\frac{\sin \tan^{-1} \left(\frac{alphay}{alphax} \cdot \tan \left(\pi \cdot 0.5\right)\right)}{alphay}\right)}^{2}}}} \]
Alternative 7
Error2.7
Cost32
\[1 \]

Error

Reproduce

herbie shell --seed 2022329 
(FPCore (u0 u1 alphax alphay)
  :name "Trowbridge-Reitz Sample, sample surface normal, cosTheta"
  :precision binary32
  :pre (and (and (and (and (<= 2.328306437e-10 u0) (<= u0 1.0)) (and (<= 2.328306437e-10 u1) (<= u1 0.5))) (and (<= 0.0001 alphax) (<= alphax 1.0))) (and (<= 0.0001 alphay) (<= alphay 1.0)))
  (/ 1.0 (sqrt (+ 1.0 (/ (* (/ 1.0 (+ (/ (* (cos (atan (* (/ alphay alphax) (tan (+ (* (* 2.0 PI) u1) (* 0.5 PI)))))) (cos (atan (* (/ alphay alphax) (tan (+ (* (* 2.0 PI) u1) (* 0.5 PI))))))) (* alphax alphax)) (/ (* (sin (atan (* (/ alphay alphax) (tan (+ (* (* 2.0 PI) u1) (* 0.5 PI)))))) (sin (atan (* (/ alphay alphax) (tan (+ (* (* 2.0 PI) u1) (* 0.5 PI))))))) (* alphay alphay)))) u0) (- 1.0 u0))))))