Average Error: 33.6 → 21.7
Time: 20.5s
Precision: 64
Internal Precision: 1344
$\sin \left(\sqrt{x \cdot x + y \cdot y}\right)$
$\begin{array}{l} \mathbf{if}\;x \le -2.0167639031292305 \cdot 10^{+81}:\\ \;\;\;\;\sin \left(-x\right)\\ \mathbf{if}\;x \le 9.121103776106908 \cdot 10^{+58}:\\ \;\;\;\;\sin \left(\sqrt{x \cdot x + y \cdot y}\right)\\ \mathbf{else}:\\ \;\;\;\;\sin x\\ \end{array}$

# Try it out

Results

 In Out
Enter valid numbers for all inputs

# Derivation

1. Split input into 3 regimes
2. ## if x < -2.0167639031292305e+81

1. Initial program 50.9

$\sin \left(\sqrt{x \cdot x + y \cdot y}\right)$
2. Taylor expanded around -inf 18.7

$\leadsto \sin \color{blue}{\left(-1 \cdot x\right)}$
3. Applied simplify18.7

$\leadsto \color{blue}{\sin \left(-x\right)}$

## if -2.0167639031292305e+81 < x < 9.121103776106908e+58

1. Initial program 23.2

$\sin \left(\sqrt{x \cdot x + y \cdot y}\right)$

## if 9.121103776106908e+58 < x

1. Initial program 48.5

$\sin \left(\sqrt{x \cdot x + y \cdot y}\right)$
2. Taylor expanded around inf 19.8

$\leadsto \sin \color{blue}{x}$
3. Recombined 3 regimes into one program.

# Runtime

Time bar (total: 20.5s)Debug log

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