Average Error: 0.0 → 0.0
Time: 12.9s
Precision: 64
$\left(1 - \frac{o}{p}\right) \cdot \left(1 - s\right)$
$\left(1 - \frac{o}{p}\right) \cdot \left(1 - s\right)$
\left(1 - \frac{o}{p}\right) \cdot \left(1 - s\right)
\left(1 - \frac{o}{p}\right) \cdot \left(1 - s\right)
double f(double o, double p, double s) {
double r339656 = 1.0;
double r339657 = o;
double r339658 = p;
double r339659 = r339657 / r339658;
double r339660 = r339656 - r339659;
double r339661 = s;
double r339662 = r339656 - r339661;
double r339663 = r339660 * r339662;
return r339663;
}


double f(double o, double p, double s) {
double r339664 = 1.0;
double r339665 = o;
double r339666 = p;
double r339667 = r339665 / r339666;
double r339668 = r339664 - r339667;
double r339669 = s;
double r339670 = r339664 - r339669;
double r339671 = r339668 * r339670;
return r339671;
}



# Try it out

Results

 In Out
Enter valid numbers for all inputs

# Derivation

1. Initial program 0.0

$\left(1 - \frac{o}{p}\right) \cdot \left(1 - s\right)$
2. Final simplification0.0

$\leadsto \left(1 - \frac{o}{p}\right) \cdot \left(1 - s\right)$

# Reproduce

herbie shell --seed 1
(FPCore (o p s)
:name "(1- o/p) * (1 - s)"
:precision binary64
(* (- 1 (/ o p)) (- 1 s)))