Average Error: 58.0 → 0.5
Time: 2.4m
Precision: 64
Internal Precision: 1344
\[\frac{e^{x} - e^{-x}}{2}\]
\[\frac{\left(\sqrt{e^{x}} + \sqrt{e^{-x}}\right) \cdot \left(\frac{1}{24} \cdot {x}^{3} + \left(\frac{1}{1920} \cdot {x}^{5} + x\right)\right)}{2}\]

Error

Bits error versus x

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 58.0

    \[\frac{e^{x} - e^{-x}}{2}\]
  2. Using strategy rm
  3. Applied add-sqr-sqrt58.0

    \[\leadsto \frac{e^{x} - \color{blue}{\sqrt{e^{-x}} \cdot \sqrt{e^{-x}}}}{2}\]
  4. Applied add-sqr-sqrt58.1

    \[\leadsto \frac{\color{blue}{\sqrt{e^{x}} \cdot \sqrt{e^{x}}} - \sqrt{e^{-x}} \cdot \sqrt{e^{-x}}}{2}\]
  5. Applied difference-of-squares58.0

    \[\leadsto \frac{\color{blue}{\left(\sqrt{e^{x}} + \sqrt{e^{-x}}\right) \cdot \left(\sqrt{e^{x}} - \sqrt{e^{-x}}\right)}}{2}\]
  6. Taylor expanded around 0 0.5

    \[\leadsto \frac{\left(\sqrt{e^{x}} + \sqrt{e^{-x}}\right) \cdot \color{blue}{\left(\frac{1}{24} \cdot {x}^{3} + \left(\frac{1}{1920} \cdot {x}^{5} + x\right)\right)}}{2}\]

Runtime

Time bar (total: 2.4m)Debug logProfile

herbie shell --seed 2018206 +o rules:numerics
(FPCore (x)
  :name "Hyperbolic sine"
  (/ (- (exp x) (exp (- x))) 2))