Average Error: 0.0 → 0.0
Time: 13.7s
Precision: 64
$\sqrt{1 \cdot f - \cos x \cdot \cos x}$
$\sqrt{1 \cdot f - \cos x \cdot \cos x}$
\sqrt{1 \cdot f - \cos x \cdot \cos x}
\sqrt{1 \cdot f - \cos x \cdot \cos x}
double f(double f, double x) {
double r3403531 = 1.0;
double r3403532 = f;
double r3403533 = r3403531 * r3403532;
double r3403534 = x;
double r3403535 = cos(r3403534);
double r3403536 = r3403535 * r3403535;
double r3403537 = r3403533 - r3403536;
double r3403538 = sqrt(r3403537);
return r3403538;
}


double f(double f, double x) {
double r3403539 = 1.0;
double r3403540 = f;
double r3403541 = r3403539 * r3403540;
double r3403542 = x;
double r3403543 = cos(r3403542);
double r3403544 = r3403543 * r3403543;
double r3403545 = r3403541 - r3403544;
double r3403546 = sqrt(r3403545);
return r3403546;
}



# Try it out

Results

 In Out
Enter valid numbers for all inputs

# Derivation

1. Initial program 0.0

$\sqrt{1 \cdot f - \cos x \cdot \cos x}$
2. Final simplification0.0

$\leadsto \sqrt{1 \cdot f - \cos x \cdot \cos x}$

# Reproduce

herbie shell --seed 1
(FPCore (f x)
:name "sqrt(1.0f - cos(x) * cos(x))"
:precision binary64
(sqrt (- (* 1 f) (* (cos x) (cos x)))))