Average Error: 0.3 → 0.3
Time: 10.7s
Precision: 64
$x \ge 0.0 \land x \le 1$
$\frac{1}{\tan \left(0.0 - \pi \cdot x\right)}$
$\frac{1}{\frac{\sin \left(0.0 - \pi \cdot x\right)}{\cos \left(0.0 - \pi \cdot x\right)}}$
\frac{1}{\tan \left(0.0 - \pi \cdot x\right)}
\frac{1}{\frac{\sin \left(0.0 - \pi \cdot x\right)}{\cos \left(0.0 - \pi \cdot x\right)}}
double f(double x) {
double r2181657 = 1.0;
double r2181658 = 0.0;
double r2181659 = atan2(1.0, 0.0);
double r2181660 = x;
double r2181661 = r2181659 * r2181660;
double r2181662 = r2181658 - r2181661;
double r2181663 = tan(r2181662);
double r2181664 = r2181657 / r2181663;
return r2181664;
}


double f(double x) {
double r2181665 = 1.0;
double r2181666 = 0.0;
double r2181667 = atan2(1.0, 0.0);
double r2181668 = x;
double r2181669 = r2181667 * r2181668;
double r2181670 = r2181666 - r2181669;
double r2181671 = sin(r2181670);
double r2181672 = cos(r2181670);
double r2181673 = r2181671 / r2181672;
double r2181674 = r2181665 / r2181673;
return r2181674;
}



# Try it out

Results

 In Out
Enter valid numbers for all inputs

# Derivation

1. Initial program 0.3

$\frac{1}{\tan \left(0.0 - \pi \cdot x\right)}$
2. Using strategy rm
3. Applied tan-quot0.3

$\leadsto \frac{1}{\color{blue}{\frac{\sin \left(0.0 - \pi \cdot x\right)}{\cos \left(0.0 - \pi \cdot x\right)}}}$
4. Final simplification0.3

$\leadsto \frac{1}{\frac{\sin \left(0.0 - \pi \cdot x\right)}{\cos \left(0.0 - \pi \cdot x\right)}}$

# Reproduce

herbie shell --seed 1
(FPCore (x)
:name "1/tan(0-PI*x)"
:precision binary64
:pre (and (>= x 0.0) (<= x 1))
(/ 1 (tan (- 0.0 (* PI x)))))