Average Error: 0.0 → 0.0
Time: 12.3s
Precision: 64
$\tan^{-1} \left(\frac{\sqrt{1 - a}}{\sqrt{a}}\right)$
$\tan^{-1} \left(\frac{1}{\frac{\sqrt{a}}{\sqrt{1 - a}}}\right)$
\tan^{-1} \left(\frac{\sqrt{1 - a}}{\sqrt{a}}\right)
\tan^{-1} \left(\frac{1}{\frac{\sqrt{a}}{\sqrt{1 - a}}}\right)
double f(double a) {
double r8263327 = 1.0;
double r8263328 = a;
double r8263329 = r8263327 - r8263328;
double r8263330 = sqrt(r8263329);
double r8263331 = sqrt(r8263328);
double r8263332 = r8263330 / r8263331;
double r8263333 = atan(r8263332);
return r8263333;
}


double f(double a) {
double r8263334 = 1.0;
double r8263335 = a;
double r8263336 = sqrt(r8263335);
double r8263337 = 1.0;
double r8263338 = r8263337 - r8263335;
double r8263339 = sqrt(r8263338);
double r8263340 = r8263336 / r8263339;
double r8263341 = r8263334 / r8263340;
double r8263342 = atan(r8263341);
return r8263342;
}



# Try it out

Results

 In Out
Enter valid numbers for all inputs

# Derivation

1. Initial program 0.0

$\tan^{-1} \left(\frac{\sqrt{1 - a}}{\sqrt{a}}\right)$
2. Using strategy rm
3. Applied clear-num0.0

$\leadsto \tan^{-1} \color{blue}{\left(\frac{1}{\frac{\sqrt{a}}{\sqrt{1 - a}}}\right)}$
4. Final simplification0.0

$\leadsto \tan^{-1} \left(\frac{1}{\frac{\sqrt{a}}{\sqrt{1 - a}}}\right)$

# Reproduce

herbie shell --seed 1
(FPCore (a)
:name "atan(sqrt(1.0 - a) / sqrt(a))"
(atan (/ (sqrt (- 1.0 a)) (sqrt a))))