Average Error: 2.7 → 2.6
Time: 30.8s
Precision: 64
• ## could not determine a ground truth for program body (more)

1. x = 1.3100436170095023e+65
$\frac{-1}{\tan \left(\frac{x \cdot \pi}{360}\right)}$
$\frac{-\cos \left(\left(\frac{1}{360} \cdot x\right) \cdot \pi\right)}{\sin \left(\left(x \cdot \pi\right) \cdot \frac{1}{360}\right)}$
\frac{-1}{\tan \left(\frac{x \cdot \pi}{360}\right)}
\frac{-\cos \left(\left(\frac{1}{360} \cdot x\right) \cdot \pi\right)}{\sin \left(\left(x \cdot \pi\right) \cdot \frac{1}{360}\right)}
double f(double x) {
double r15623821 = 1.0;
double r15623822 = -r15623821;
double r15623823 = x;
double r15623824 = atan2(1.0, 0.0);
double r15623825 = r15623823 * r15623824;
double r15623826 = 360.0;
double r15623827 = r15623825 / r15623826;
double r15623828 = tan(r15623827);
double r15623829 = r15623822 / r15623828;
return r15623829;
}


double f(double x) {
double r15623830 = 0.002777777777777778;
double r15623831 = x;
double r15623832 = r15623830 * r15623831;
double r15623833 = atan2(1.0, 0.0);
double r15623834 = r15623832 * r15623833;
double r15623835 = cos(r15623834);
double r15623836 = -r15623835;
double r15623837 = r15623831 * r15623833;
double r15623838 = r15623837 * r15623830;
double r15623839 = sin(r15623838);
double r15623840 = r15623836 / r15623839;
return r15623840;
}



# Try it out

Results

 In Out
Enter valid numbers for all inputs

# Derivation

1. Initial program 2.7

$\frac{-1}{\tan \left(\frac{x \cdot \pi}{360}\right)}$
2. Simplified2.7

$\leadsto \color{blue}{\frac{-1}{\tan \left(\pi \cdot \frac{x}{360}\right)}}$
3. Taylor expanded around inf 2.6

$\leadsto \color{blue}{-1 \cdot \frac{\cos \left(\frac{1}{360} \cdot \left(x \cdot \pi\right)\right)}{\sin \left(\frac{1}{360} \cdot \left(x \cdot \pi\right)\right)}}$
4. Simplified2.6

$\leadsto \color{blue}{\frac{-\cos \left(\pi \cdot \left(x \cdot \frac{1}{360}\right)\right)}{\sin \left(\pi \cdot \left(x \cdot \frac{1}{360}\right)\right)}}$
5. Taylor expanded around -inf 2.6

$\leadsto \frac{-\cos \left(\pi \cdot \left(x \cdot \frac{1}{360}\right)\right)}{\color{blue}{\sin \left(\frac{1}{360} \cdot \left(x \cdot \pi\right)\right)}}$
6. Final simplification2.6

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

# Reproduce

herbie shell --seed 1
(FPCore (x)
:name "-1/tan(x * PI / 360)"
(/ (- 1) (tan (/ (* x PI) 360))))