Average Error: 12.8 → 4.4
Time: 52.7s
Precision: 64
Internal Precision: 576
$x \cdot \sqrt{\cos t \cdot \cos t + \left(\left(h \cdot h\right) \cdot \sin t\right) \cdot \sin t}$
$\begin{array}{l} \mathbf{if}\;\sqrt[3]{\sqrt{\left(\sin t \cdot h\right) \cdot \left(\sin t \cdot h\right) + \cos t \cdot \cos t}} \cdot \sqrt[3]{\left(\sin t \cdot h\right) \cdot \left(\sin t \cdot h\right) + \cos t \cdot \cos t} \le 9.918820324233946 \cdot 10^{+132}:\\ \;\;\;\;x \cdot \left(\sqrt[3]{\sqrt{\left(\sin t \cdot h\right) \cdot \left(\sin t \cdot h\right) + \cos t \cdot \cos t}} \cdot \sqrt[3]{\left(\sin t \cdot h\right) \cdot \left(\sin t \cdot h\right) + \cos t \cdot \cos t}\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(h \cdot \sin t + \frac{1}{2} \cdot \frac{{\left(\cos t\right)}^{2}}{h \cdot \sin t}\right)\\ \end{array}$

# Try it out

Results

 In Out
Enter valid numbers for all inputs

# Derivation

1. Split input into 2 regimes
2. ## if (* (cbrt (sqrt (+ (* (* (sin t) h) (* (sin t) h)) (* (cos t) (cos t))))) (cbrt (+ (* (* (sin t) h) (* (sin t) h)) (* (cos t) (cos t))))) < 9.918820324233946e+132

1. Initial program 6.5

$x \cdot \sqrt{\cos t \cdot \cos t + \left(\left(h \cdot h\right) \cdot \sin t\right) \cdot \sin t}$
2. Using strategy rm

$\leadsto x \cdot \color{blue}{\sqrt[3]{\left(\sqrt{\cos t \cdot \cos t + \left(\left(h \cdot h\right) \cdot \sin t\right) \cdot \sin t} \cdot \sqrt{\cos t \cdot \cos t + \left(\left(h \cdot h\right) \cdot \sin t\right) \cdot \sin t}\right) \cdot \sqrt{\cos t \cdot \cos t + \left(\left(h \cdot h\right) \cdot \sin t\right) \cdot \sin t}}}$
4. Applied simplify2.8

$\leadsto x \cdot \sqrt[3]{\color{blue}{\sqrt{\left(\sin t \cdot h\right) \cdot \left(\sin t \cdot h\right) + \cos t \cdot \cos t} \cdot \left(\left(\sin t \cdot h\right) \cdot \left(\sin t \cdot h\right) + \cos t \cdot \cos t\right)}}$
5. Using strategy rm
6. Applied cbrt-prod0.4

$\leadsto x \cdot \color{blue}{\left(\sqrt[3]{\sqrt{\left(\sin t \cdot h\right) \cdot \left(\sin t \cdot h\right) + \cos t \cdot \cos t}} \cdot \sqrt[3]{\left(\sin t \cdot h\right) \cdot \left(\sin t \cdot h\right) + \cos t \cdot \cos t}\right)}$

## if 9.918820324233946e+132 < (* (cbrt (sqrt (+ (* (* (sin t) h) (* (sin t) h)) (* (cos t) (cos t))))) (cbrt (+ (* (* (sin t) h) (* (sin t) h)) (* (cos t) (cos t)))))

1. Initial program 54.9

$x \cdot \sqrt{\cos t \cdot \cos t + \left(\left(h \cdot h\right) \cdot \sin t\right) \cdot \sin t}$
2. Taylor expanded around inf 30.6

$\leadsto x \cdot \color{blue}{\left(h \cdot \sin t + \frac{1}{2} \cdot \frac{{\left(\cos t\right)}^{2}}{h \cdot \sin t}\right)}$
3. Recombined 2 regimes into one program.

# Runtime

Time bar (total: 52.7s)Debug log

herbie shell --seed '#(2775764126 3555076145 3898259844 1891440260 2599947619 1948460636)'
(FPCore (x t h)
:name "x*sqrt(cos(t)*cos(t)+h*h*sin(t)*sin(t))"
(* x (sqrt (+ (* (cos t) (cos t)) (* (* (* h h) (sin t)) (sin t))))))