Average Error: 30.2 → 0.1
Time: 32.2s
Precision: 64
Internal Precision: 1344
\[\frac{\sin x}{e^{x} - 1}\]
\[\begin{array}{l} \mathbf{if}\;x \le -0.00016070112888851894 \lor \neg \left(x \le 0.00018778163425122027\right):\\ \;\;\;\;\frac{\sin x}{\left(\sqrt{e^{x}} - 1\right) \cdot \left(\sqrt{e^{x}} + 1\right)}\\ \mathbf{else}:\\ \;\;\;\;1 - \left(x \cdot \frac{1}{2} + {x}^{2} \cdot \frac{1}{12}\right)\\ \end{array}\]

Error

Bits error versus x

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Split input into 2 regimes
  2. if x < -0.00016070112888851894 or 0.00018778163425122027 < x

    1. Initial program 0.1

      \[\frac{\sin x}{e^{x} - 1}\]
    2. Using strategy rm
    3. Applied add-sqr-sqrt0.1

      \[\leadsto \frac{\sin x}{\color{blue}{\sqrt{e^{x}} \cdot \sqrt{e^{x}}} - 1}\]
    4. Applied difference-of-sqr-10.1

      \[\leadsto \frac{\sin x}{\color{blue}{\left(\sqrt{e^{x}} + 1\right) \cdot \left(\sqrt{e^{x}} - 1\right)}}\]

    if -0.00016070112888851894 < x < 0.00018778163425122027

    1. Initial program 61.3

      \[\frac{\sin x}{e^{x} - 1}\]
    2. Taylor expanded around 0 0.0

      \[\leadsto \color{blue}{1 - \left(\frac{1}{2} \cdot x + \frac{1}{12} \cdot {x}^{2}\right)}\]
  3. Recombined 2 regimes into one program.
  4. Applied simplify0.1

    \[\leadsto \color{blue}{\begin{array}{l} \mathbf{if}\;x \le -0.00016070112888851894 \lor \neg \left(x \le 0.00018778163425122027\right):\\ \;\;\;\;\frac{\sin x}{\left(\sqrt{e^{x}} - 1\right) \cdot \left(\sqrt{e^{x}} + 1\right)}\\ \mathbf{else}:\\ \;\;\;\;1 - \left(x \cdot \frac{1}{2} + {x}^{2} \cdot \frac{1}{12}\right)\\ \end{array}}\]

Runtime

Time bar (total: 32.2s)Debug log

herbie shell --seed '#(2775764126 3555076145 3898259844 1891440260 2599947619 1948460636)' 
(FPCore (x)
  :name "sin(x)/(exp(x)-1)"
  (/ (sin x) (- (exp x) 1)))