
(FPCore (cosTheta_i u1 u2) :precision binary32 (* (sqrt (/ u1 (- 1.0 u1))) (sin (* 6.28318530718 u2))))
float code(float cosTheta_i, float u1, float u2) {
return sqrtf((u1 / (1.0f - u1))) * sinf((6.28318530718f * u2));
}
real(4) function code(costheta_i, u1, u2)
real(4), intent (in) :: costheta_i
real(4), intent (in) :: u1
real(4), intent (in) :: u2
code = sqrt((u1 / (1.0e0 - u1))) * sin((6.28318530718e0 * u2))
end function
function code(cosTheta_i, u1, u2) return Float32(sqrt(Float32(u1 / Float32(Float32(1.0) - u1))) * sin(Float32(Float32(6.28318530718) * u2))) end
function tmp = code(cosTheta_i, u1, u2) tmp = sqrt((u1 / (single(1.0) - u1))) * sin((single(6.28318530718) * u2)); end
\begin{array}{l}
\\
\sqrt{\frac{u1}{1 - u1}} \cdot \sin \left(6.28318530718 \cdot u2\right)
\end{array}
Sampling outcomes in binary32 precision:
Herbie found 13 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (cosTheta_i u1 u2) :precision binary32 (* (sqrt (/ u1 (- 1.0 u1))) (sin (* 6.28318530718 u2))))
float code(float cosTheta_i, float u1, float u2) {
return sqrtf((u1 / (1.0f - u1))) * sinf((6.28318530718f * u2));
}
real(4) function code(costheta_i, u1, u2)
real(4), intent (in) :: costheta_i
real(4), intent (in) :: u1
real(4), intent (in) :: u2
code = sqrt((u1 / (1.0e0 - u1))) * sin((6.28318530718e0 * u2))
end function
function code(cosTheta_i, u1, u2) return Float32(sqrt(Float32(u1 / Float32(Float32(1.0) - u1))) * sin(Float32(Float32(6.28318530718) * u2))) end
function tmp = code(cosTheta_i, u1, u2) tmp = sqrt((u1 / (single(1.0) - u1))) * sin((single(6.28318530718) * u2)); end
\begin{array}{l}
\\
\sqrt{\frac{u1}{1 - u1}} \cdot \sin \left(6.28318530718 \cdot u2\right)
\end{array}
(FPCore (cosTheta_i u1 u2) :precision binary32 (* (sqrt (/ u1 (- 1.0 u1))) (sin (sqrt (* 39.47841760436263 (* u2 u2))))))
float code(float cosTheta_i, float u1, float u2) {
return sqrtf((u1 / (1.0f - u1))) * sinf(sqrtf((39.47841760436263f * (u2 * u2))));
}
real(4) function code(costheta_i, u1, u2)
real(4), intent (in) :: costheta_i
real(4), intent (in) :: u1
real(4), intent (in) :: u2
code = sqrt((u1 / (1.0e0 - u1))) * sin(sqrt((39.47841760436263e0 * (u2 * u2))))
end function
function code(cosTheta_i, u1, u2) return Float32(sqrt(Float32(u1 / Float32(Float32(1.0) - u1))) * sin(sqrt(Float32(Float32(39.47841760436263) * Float32(u2 * u2))))) end
function tmp = code(cosTheta_i, u1, u2) tmp = sqrt((u1 / (single(1.0) - u1))) * sin(sqrt((single(39.47841760436263) * (u2 * u2)))); end
\begin{array}{l}
\\
\sqrt{\frac{u1}{1 - u1}} \cdot \sin \left(\sqrt{39.47841760436263 \cdot \left(u2 \cdot u2\right)}\right)
\end{array}
Initial program 98.2%
add-sqr-sqrt97.7%
pow1/297.7%
pow1/297.7%
pow-prod-down98.2%
swap-sqr98.0%
metadata-eval98.6%
Applied egg-rr98.6%
unpow1/298.6%
Simplified98.6%
Final simplification98.6%
(FPCore (cosTheta_i u1 u2) :precision binary32 (if (<= (* u2 6.28318530718) 0.003000000026077032) (sqrt (* (/ u1 (- 1.0 u1)) (* 39.47841760436263 (* u2 u2)))) (* (sin (* u2 6.28318530718)) (sqrt (+ u1 (* u1 u1))))))
float code(float cosTheta_i, float u1, float u2) {
float tmp;
if ((u2 * 6.28318530718f) <= 0.003000000026077032f) {
tmp = sqrtf(((u1 / (1.0f - u1)) * (39.47841760436263f * (u2 * u2))));
} else {
tmp = sinf((u2 * 6.28318530718f)) * sqrtf((u1 + (u1 * u1)));
}
return tmp;
}
real(4) function code(costheta_i, u1, u2)
real(4), intent (in) :: costheta_i
real(4), intent (in) :: u1
real(4), intent (in) :: u2
real(4) :: tmp
if ((u2 * 6.28318530718e0) <= 0.003000000026077032e0) then
tmp = sqrt(((u1 / (1.0e0 - u1)) * (39.47841760436263e0 * (u2 * u2))))
else
tmp = sin((u2 * 6.28318530718e0)) * sqrt((u1 + (u1 * u1)))
end if
code = tmp
end function
function code(cosTheta_i, u1, u2) tmp = Float32(0.0) if (Float32(u2 * Float32(6.28318530718)) <= Float32(0.003000000026077032)) tmp = sqrt(Float32(Float32(u1 / Float32(Float32(1.0) - u1)) * Float32(Float32(39.47841760436263) * Float32(u2 * u2)))); else tmp = Float32(sin(Float32(u2 * Float32(6.28318530718))) * sqrt(Float32(u1 + Float32(u1 * u1)))); end return tmp end
function tmp_2 = code(cosTheta_i, u1, u2) tmp = single(0.0); if ((u2 * single(6.28318530718)) <= single(0.003000000026077032)) tmp = sqrt(((u1 / (single(1.0) - u1)) * (single(39.47841760436263) * (u2 * u2)))); else tmp = sin((u2 * single(6.28318530718))) * sqrt((u1 + (u1 * u1))); end tmp_2 = tmp; end
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u2 \cdot 6.28318530718 \leq 0.003000000026077032:\\
\;\;\;\;\sqrt{\frac{u1}{1 - u1} \cdot \left(39.47841760436263 \cdot \left(u2 \cdot u2\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sin \left(u2 \cdot 6.28318530718\right) \cdot \sqrt{u1 + u1 \cdot u1}\\
\end{array}
\end{array}
if (*.f32 314159265359/50000000000 u2) < 0.00300000003Initial program 98.3%
Taylor expanded in u2 around 0 97.9%
add-sqr-sqrt97.6%
sqrt-unprod97.9%
swap-sqr97.6%
metadata-eval98.1%
*-commutative98.1%
*-commutative98.1%
swap-sqr98.3%
add-sqr-sqrt98.7%
Applied egg-rr98.7%
*-commutative98.7%
Simplified98.7%
Taylor expanded in u2 around 0 98.6%
associate-*l/98.7%
associate-*r*98.6%
*-commutative98.6%
associate-*l*98.7%
unpow298.7%
Simplified98.7%
if 0.00300000003 < (*.f32 314159265359/50000000000 u2) Initial program 98.1%
flip--98.1%
associate-/r/98.0%
metadata-eval98.0%
+-commutative98.0%
Applied egg-rr98.0%
+-commutative98.0%
distribute-lft-in98.1%
*-rgt-identity98.1%
Applied egg-rr98.1%
Taylor expanded in u1 around 0 86.0%
unpow286.0%
Simplified86.0%
Final simplification94.5%
(FPCore (cosTheta_i u1 u2) :precision binary32 (if (<= (* u2 6.28318530718) 0.03500000014901161) (sqrt (* (/ u1 (- 1.0 u1)) (* 39.47841760436263 (* u2 u2)))) (* (sin (* u2 6.28318530718)) (sqrt u1))))
float code(float cosTheta_i, float u1, float u2) {
float tmp;
if ((u2 * 6.28318530718f) <= 0.03500000014901161f) {
tmp = sqrtf(((u1 / (1.0f - u1)) * (39.47841760436263f * (u2 * u2))));
} else {
tmp = sinf((u2 * 6.28318530718f)) * sqrtf(u1);
}
return tmp;
}
real(4) function code(costheta_i, u1, u2)
real(4), intent (in) :: costheta_i
real(4), intent (in) :: u1
real(4), intent (in) :: u2
real(4) :: tmp
if ((u2 * 6.28318530718e0) <= 0.03500000014901161e0) then
tmp = sqrt(((u1 / (1.0e0 - u1)) * (39.47841760436263e0 * (u2 * u2))))
else
tmp = sin((u2 * 6.28318530718e0)) * sqrt(u1)
end if
code = tmp
end function
function code(cosTheta_i, u1, u2) tmp = Float32(0.0) if (Float32(u2 * Float32(6.28318530718)) <= Float32(0.03500000014901161)) tmp = sqrt(Float32(Float32(u1 / Float32(Float32(1.0) - u1)) * Float32(Float32(39.47841760436263) * Float32(u2 * u2)))); else tmp = Float32(sin(Float32(u2 * Float32(6.28318530718))) * sqrt(u1)); end return tmp end
function tmp_2 = code(cosTheta_i, u1, u2) tmp = single(0.0); if ((u2 * single(6.28318530718)) <= single(0.03500000014901161)) tmp = sqrt(((u1 / (single(1.0) - u1)) * (single(39.47841760436263) * (u2 * u2)))); else tmp = sin((u2 * single(6.28318530718))) * sqrt(u1); end tmp_2 = tmp; end
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u2 \cdot 6.28318530718 \leq 0.03500000014901161:\\
\;\;\;\;\sqrt{\frac{u1}{1 - u1} \cdot \left(39.47841760436263 \cdot \left(u2 \cdot u2\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sin \left(u2 \cdot 6.28318530718\right) \cdot \sqrt{u1}\\
\end{array}
\end{array}
if (*.f32 314159265359/50000000000 u2) < 0.0350000001Initial program 98.2%
Taylor expanded in u2 around 0 95.3%
add-sqr-sqrt95.0%
sqrt-unprod95.3%
swap-sqr95.1%
metadata-eval95.5%
*-commutative95.5%
*-commutative95.5%
swap-sqr95.7%
add-sqr-sqrt96.0%
Applied egg-rr96.0%
*-commutative96.0%
Simplified96.0%
Taylor expanded in u2 around 0 95.9%
associate-*l/96.0%
associate-*r*96.0%
*-commutative96.0%
associate-*l*96.0%
unpow296.0%
Simplified96.0%
if 0.0350000001 < (*.f32 314159265359/50000000000 u2) Initial program 98.1%
Taylor expanded in u1 around 0 78.2%
Final simplification91.8%
(FPCore (cosTheta_i u1 u2) :precision binary32 (* (sqrt (/ u1 (- 1.0 u1))) (sin (* u2 6.28318530718))))
float code(float cosTheta_i, float u1, float u2) {
return sqrtf((u1 / (1.0f - u1))) * sinf((u2 * 6.28318530718f));
}
real(4) function code(costheta_i, u1, u2)
real(4), intent (in) :: costheta_i
real(4), intent (in) :: u1
real(4), intent (in) :: u2
code = sqrt((u1 / (1.0e0 - u1))) * sin((u2 * 6.28318530718e0))
end function
function code(cosTheta_i, u1, u2) return Float32(sqrt(Float32(u1 / Float32(Float32(1.0) - u1))) * sin(Float32(u2 * Float32(6.28318530718)))) end
function tmp = code(cosTheta_i, u1, u2) tmp = sqrt((u1 / (single(1.0) - u1))) * sin((u2 * single(6.28318530718))); end
\begin{array}{l}
\\
\sqrt{\frac{u1}{1 - u1}} \cdot \sin \left(u2 \cdot 6.28318530718\right)
\end{array}
Initial program 98.2%
Final simplification98.2%
(FPCore (cosTheta_i u1 u2) :precision binary32 (/ (sin (* u2 6.28318530718)) (sqrt (+ (/ 1.0 u1) -1.0))))
float code(float cosTheta_i, float u1, float u2) {
return sinf((u2 * 6.28318530718f)) / sqrtf(((1.0f / u1) + -1.0f));
}
real(4) function code(costheta_i, u1, u2)
real(4), intent (in) :: costheta_i
real(4), intent (in) :: u1
real(4), intent (in) :: u2
code = sin((u2 * 6.28318530718e0)) / sqrt(((1.0e0 / u1) + (-1.0e0)))
end function
function code(cosTheta_i, u1, u2) return Float32(sin(Float32(u2 * Float32(6.28318530718))) / sqrt(Float32(Float32(Float32(1.0) / u1) + Float32(-1.0)))) end
function tmp = code(cosTheta_i, u1, u2) tmp = sin((u2 * single(6.28318530718))) / sqrt(((single(1.0) / u1) + single(-1.0))); end
\begin{array}{l}
\\
\frac{\sin \left(u2 \cdot 6.28318530718\right)}{\sqrt{\frac{1}{u1} + -1}}
\end{array}
Initial program 98.2%
*-commutative98.2%
sqrt-div98.0%
associate-*r/98.1%
Applied egg-rr98.1%
associate-/l*98.3%
Simplified98.3%
clear-num98.2%
inv-pow98.2%
sqrt-undiv98.2%
Applied egg-rr98.2%
unpow-198.2%
associate-/r/98.2%
associate-*l/98.3%
*-lft-identity98.3%
div-sub98.3%
sub-neg98.3%
*-inverses98.3%
metadata-eval98.3%
Simplified98.3%
Final simplification98.3%
(FPCore (cosTheta_i u1 u2) :precision binary32 (/ (sin (* u2 6.28318530718)) (sqrt (/ (- 1.0 u1) u1))))
float code(float cosTheta_i, float u1, float u2) {
return sinf((u2 * 6.28318530718f)) / sqrtf(((1.0f - u1) / u1));
}
real(4) function code(costheta_i, u1, u2)
real(4), intent (in) :: costheta_i
real(4), intent (in) :: u1
real(4), intent (in) :: u2
code = sin((u2 * 6.28318530718e0)) / sqrt(((1.0e0 - u1) / u1))
end function
function code(cosTheta_i, u1, u2) return Float32(sin(Float32(u2 * Float32(6.28318530718))) / sqrt(Float32(Float32(Float32(1.0) - u1) / u1))) end
function tmp = code(cosTheta_i, u1, u2) tmp = sin((u2 * single(6.28318530718))) / sqrt(((single(1.0) - u1) / u1)); end
\begin{array}{l}
\\
\frac{\sin \left(u2 \cdot 6.28318530718\right)}{\sqrt{\frac{1 - u1}{u1}}}
\end{array}
Initial program 98.2%
*-commutative98.2%
sqrt-div98.0%
associate-*r/98.1%
Applied egg-rr98.1%
associate-/l*98.3%
Simplified98.3%
expm1-log1p-u96.2%
expm1-udef96.0%
sqrt-undiv96.2%
Applied egg-rr96.2%
expm1-def96.3%
expm1-log1p98.3%
Simplified98.3%
Final simplification98.3%
(FPCore (cosTheta_i u1 u2) :precision binary32 (sqrt (* 39.47841760436263 (* u2 (/ (* u1 u2) (- 1.0 u1))))))
float code(float cosTheta_i, float u1, float u2) {
return sqrtf((39.47841760436263f * (u2 * ((u1 * u2) / (1.0f - u1)))));
}
real(4) function code(costheta_i, u1, u2)
real(4), intent (in) :: costheta_i
real(4), intent (in) :: u1
real(4), intent (in) :: u2
code = sqrt((39.47841760436263e0 * (u2 * ((u1 * u2) / (1.0e0 - u1)))))
end function
function code(cosTheta_i, u1, u2) return sqrt(Float32(Float32(39.47841760436263) * Float32(u2 * Float32(Float32(u1 * u2) / Float32(Float32(1.0) - u1))))) end
function tmp = code(cosTheta_i, u1, u2) tmp = sqrt((single(39.47841760436263) * (u2 * ((u1 * u2) / (single(1.0) - u1))))); end
\begin{array}{l}
\\
\sqrt{39.47841760436263 \cdot \left(u2 \cdot \frac{u1 \cdot u2}{1 - u1}\right)}
\end{array}
Initial program 98.2%
Taylor expanded in u2 around 0 82.4%
add-sqr-sqrt82.1%
sqrt-unprod82.4%
swap-sqr82.2%
metadata-eval82.5%
*-commutative82.5%
*-commutative82.5%
swap-sqr82.6%
add-sqr-sqrt82.9%
Applied egg-rr82.9%
associate-*l*82.9%
associate-*r/82.9%
Simplified82.9%
Final simplification82.9%
(FPCore (cosTheta_i u1 u2) :precision binary32 (sqrt (* (/ u1 (- 1.0 u1)) (* 39.47841760436263 (* u2 u2)))))
float code(float cosTheta_i, float u1, float u2) {
return sqrtf(((u1 / (1.0f - u1)) * (39.47841760436263f * (u2 * u2))));
}
real(4) function code(costheta_i, u1, u2)
real(4), intent (in) :: costheta_i
real(4), intent (in) :: u1
real(4), intent (in) :: u2
code = sqrt(((u1 / (1.0e0 - u1)) * (39.47841760436263e0 * (u2 * u2))))
end function
function code(cosTheta_i, u1, u2) return sqrt(Float32(Float32(u1 / Float32(Float32(1.0) - u1)) * Float32(Float32(39.47841760436263) * Float32(u2 * u2)))) end
function tmp = code(cosTheta_i, u1, u2) tmp = sqrt(((u1 / (single(1.0) - u1)) * (single(39.47841760436263) * (u2 * u2)))); end
\begin{array}{l}
\\
\sqrt{\frac{u1}{1 - u1} \cdot \left(39.47841760436263 \cdot \left(u2 \cdot u2\right)\right)}
\end{array}
Initial program 98.2%
Taylor expanded in u2 around 0 82.4%
add-sqr-sqrt82.1%
sqrt-unprod82.4%
swap-sqr82.2%
metadata-eval82.5%
*-commutative82.5%
*-commutative82.5%
swap-sqr82.6%
add-sqr-sqrt82.9%
Applied egg-rr82.9%
*-commutative82.9%
Simplified82.9%
Taylor expanded in u2 around 0 82.8%
associate-*l/82.9%
associate-*r*82.9%
*-commutative82.9%
associate-*l*82.9%
unpow282.9%
Simplified82.9%
Final simplification82.9%
(FPCore (cosTheta_i u1 u2) :precision binary32 (* 6.28318530718 (* (sqrt (/ u1 (- 1.0 u1))) u2)))
float code(float cosTheta_i, float u1, float u2) {
return 6.28318530718f * (sqrtf((u1 / (1.0f - u1))) * u2);
}
real(4) function code(costheta_i, u1, u2)
real(4), intent (in) :: costheta_i
real(4), intent (in) :: u1
real(4), intent (in) :: u2
code = 6.28318530718e0 * (sqrt((u1 / (1.0e0 - u1))) * u2)
end function
function code(cosTheta_i, u1, u2) return Float32(Float32(6.28318530718) * Float32(sqrt(Float32(u1 / Float32(Float32(1.0) - u1))) * u2)) end
function tmp = code(cosTheta_i, u1, u2) tmp = single(6.28318530718) * (sqrt((u1 / (single(1.0) - u1))) * u2); end
\begin{array}{l}
\\
6.28318530718 \cdot \left(\sqrt{\frac{u1}{1 - u1}} \cdot u2\right)
\end{array}
Initial program 98.2%
Taylor expanded in u2 around 0 82.4%
Final simplification82.4%
(FPCore (cosTheta_i u1 u2) :precision binary32 (* 6.28318530718 (/ u2 (sqrt (+ (/ 1.0 u1) -1.0)))))
float code(float cosTheta_i, float u1, float u2) {
return 6.28318530718f * (u2 / sqrtf(((1.0f / u1) + -1.0f)));
}
real(4) function code(costheta_i, u1, u2)
real(4), intent (in) :: costheta_i
real(4), intent (in) :: u1
real(4), intent (in) :: u2
code = 6.28318530718e0 * (u2 / sqrt(((1.0e0 / u1) + (-1.0e0))))
end function
function code(cosTheta_i, u1, u2) return Float32(Float32(6.28318530718) * Float32(u2 / sqrt(Float32(Float32(Float32(1.0) / u1) + Float32(-1.0))))) end
function tmp = code(cosTheta_i, u1, u2) tmp = single(6.28318530718) * (u2 / sqrt(((single(1.0) / u1) + single(-1.0)))); end
\begin{array}{l}
\\
6.28318530718 \cdot \frac{u2}{\sqrt{\frac{1}{u1} + -1}}
\end{array}
Initial program 98.2%
Taylor expanded in u2 around 0 82.4%
clear-num82.3%
sqrt-div82.3%
metadata-eval82.3%
div-sub82.2%
*-inverses82.2%
sub-neg82.2%
metadata-eval82.2%
Applied egg-rr82.2%
associate-*l/82.4%
*-un-lft-identity82.4%
Applied egg-rr82.4%
Final simplification82.4%
(FPCore (cosTheta_i u1 u2) :precision binary32 (* u2 (sqrt (/ (* u1 39.47841760436263) (- 1.0 u1)))))
float code(float cosTheta_i, float u1, float u2) {
return u2 * sqrtf(((u1 * 39.47841760436263f) / (1.0f - u1)));
}
real(4) function code(costheta_i, u1, u2)
real(4), intent (in) :: costheta_i
real(4), intent (in) :: u1
real(4), intent (in) :: u2
code = u2 * sqrt(((u1 * 39.47841760436263e0) / (1.0e0 - u1)))
end function
function code(cosTheta_i, u1, u2) return Float32(u2 * sqrt(Float32(Float32(u1 * Float32(39.47841760436263)) / Float32(Float32(1.0) - u1)))) end
function tmp = code(cosTheta_i, u1, u2) tmp = u2 * sqrt(((u1 * single(39.47841760436263)) / (single(1.0) - u1))); end
\begin{array}{l}
\\
u2 \cdot \sqrt{\frac{u1 \cdot 39.47841760436263}{1 - u1}}
\end{array}
Initial program 98.2%
Taylor expanded in u2 around 0 82.4%
add-sqr-sqrt82.1%
sqrt-unprod82.4%
swap-sqr82.2%
metadata-eval82.5%
*-commutative82.5%
*-commutative82.5%
swap-sqr82.6%
add-sqr-sqrt82.9%
Applied egg-rr82.9%
*-commutative82.9%
Simplified82.9%
associate-*r*82.9%
sqrt-prod82.8%
sqrt-prod82.2%
add-sqr-sqrt82.8%
Applied egg-rr82.8%
unpow1/282.8%
*-commutative82.8%
unpow1/282.8%
associate-*r/82.8%
Simplified82.8%
Final simplification82.8%
(FPCore (cosTheta_i u1 u2) :precision binary32 (* 6.28318530718 (* u2 (sqrt u1))))
float code(float cosTheta_i, float u1, float u2) {
return 6.28318530718f * (u2 * sqrtf(u1));
}
real(4) function code(costheta_i, u1, u2)
real(4), intent (in) :: costheta_i
real(4), intent (in) :: u1
real(4), intent (in) :: u2
code = 6.28318530718e0 * (u2 * sqrt(u1))
end function
function code(cosTheta_i, u1, u2) return Float32(Float32(6.28318530718) * Float32(u2 * sqrt(u1))) end
function tmp = code(cosTheta_i, u1, u2) tmp = single(6.28318530718) * (u2 * sqrt(u1)); end
\begin{array}{l}
\\
6.28318530718 \cdot \left(u2 \cdot \sqrt{u1}\right)
\end{array}
Initial program 98.2%
Taylor expanded in u2 around 0 82.4%
Taylor expanded in u1 around 0 64.3%
Final simplification64.3%
(FPCore (cosTheta_i u1 u2) :precision binary32 (* u2 (sqrt -39.47841760436263)))
float code(float cosTheta_i, float u1, float u2) {
return u2 * sqrtf(-39.47841760436263f);
}
real(4) function code(costheta_i, u1, u2)
real(4), intent (in) :: costheta_i
real(4), intent (in) :: u1
real(4), intent (in) :: u2
code = u2 * sqrt((-39.47841760436263e0))
end function
function code(cosTheta_i, u1, u2) return Float32(u2 * sqrt(Float32(-39.47841760436263))) end
function tmp = code(cosTheta_i, u1, u2) tmp = u2 * sqrt(single(-39.47841760436263)); end
\begin{array}{l}
\\
u2 \cdot \sqrt{-39.47841760436263}
\end{array}
Initial program 98.2%
Taylor expanded in u2 around 0 82.4%
add-sqr-sqrt82.1%
sqrt-unprod82.4%
swap-sqr82.2%
metadata-eval82.5%
*-commutative82.5%
*-commutative82.5%
swap-sqr82.6%
add-sqr-sqrt82.9%
Applied egg-rr82.9%
*-commutative82.9%
Simplified82.9%
Taylor expanded in u1 around -inf -0.0%
Final simplification-0.0%
herbie shell --seed 2023272
(FPCore (cosTheta_i u1 u2)
:name "Trowbridge-Reitz Sample, near normal, slope_y"
:precision binary32
:pre (and (and (and (> cosTheta_i 0.9999) (<= cosTheta_i 1.0)) (and (<= 2.328306437e-10 u1) (<= u1 1.0))) (and (<= 2.328306437e-10 u2) (<= u2 1.0)))
(* (sqrt (/ u1 (- 1.0 u1))) (sin (* 6.28318530718 u2))))