Average Error: 31.2 → 0.1
Time: 39.7s
Precision: 64
Internal precision: 128
\[\frac{x - \sin x}{x - \tan x}\]
⬇
\[\begin{array}{l}
\mathbf{if}\;x \le -5.458497096453193 \cdot 10^{-06}:\\
\;\;\;\;\sqrt[3]{{\left(\frac{x - \sin x}{x - \tan x}\right)}^3}\\
\mathbf{if}\;x \le 85.36504497937187:\\
\;\;\;\;\frac{9}{40} \cdot {x}^2 - \left(\frac{1}{2} + \frac{27}{2800} \cdot {x}^{4}\right)\\
\mathbf{else}:\\
\;\;\;\;\sqrt[3]{{\left(\frac{x - \sin x}{x - \tan x}\right)}^3}\\
\end{array}\]
Derivation
- Split input into 2 regimes.
-
if x < -5.458497096453193e-06 or 85.36504497937187 < x
Initial program 0.2
\[\frac{x - \sin x}{x - \tan x}\]
- Using strategy
rm
Applied add-cbrt-cube 41.6
\[\leadsto \frac{x - \sin x}{\color{blue}{\sqrt[3]{{\left(x - \tan x\right)}^3}}}\]
Applied add-cbrt-cube 41.5
\[\leadsto \frac{\color{blue}{\sqrt[3]{{\left(x - \sin x\right)}^3}}}{\sqrt[3]{{\left(x - \tan x\right)}^3}}\]
Applied cbrt-undiv 41.4
\[\leadsto \color{blue}{\sqrt[3]{\frac{{\left(x - \sin x\right)}^3}{{\left(x - \tan x\right)}^3}}}\]
Applied simplify 0.2
\[\leadsto \sqrt[3]{\color{blue}{{\left(\frac{x - \sin x}{x - \tan x}\right)}^3}}\]
if -5.458497096453193e-06 < x < 85.36504497937187
Initial program 62.9
\[\frac{x - \sin x}{x - \tan x}\]
Applied taylor 0.0
\[\leadsto \frac{9}{40} \cdot {x}^2 - \left(\frac{1}{2} + \frac{27}{2800} \cdot {x}^{4}\right)\]
Taylor expanded around 0 0.0
\[\leadsto \color{blue}{\frac{9}{40} \cdot {x}^2 - \left(\frac{1}{2} + \frac{27}{2800} \cdot {x}^{4}\right)}\]
- Recombined 2 regimes into one program.
- Removed slow pow expressions
Runtime
Please include this information when filing a bug report:
herbie --seed '#(1221977421 1476470008 2397091756 2667547678 102625347 3788899007)'
(FPCore (x)
:name "sintan (problem 3.4.5)"
(/ (- x (sin x)) (- x (tan x))))