Average Error: 29.2 → 19.2
Time: 27.1s
Precision: 64
Internal Precision: 1344
\[\left(\left(e^{x} - 1\right) + \sqrt{y + 1}\right) - \sqrt{y}\]
\[\begin{array}{l} \mathbf{if}\;y \le 6698305061578466.0:\\ \;\;\;\;\frac{\left(\left(e^{x} - 1\right) + \sqrt{y + 1}\right) \cdot \left(\left(e^{x} - 1\right) + \sqrt{y + 1}\right) - \sqrt{y} \cdot \sqrt{y}}{\left(\left(e^{x} - 1\right) + \sqrt{y + 1}\right) + \sqrt{y}}\\ \mathbf{else}:\\ \;\;\;\;\left(e^{x} - 1\right) + \left(\sqrt{y + 1} - \sqrt{y}\right)\\ \end{array}\]

Error

Bits error versus x

Bits error versus y

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Split input into 2 regimes
  2. if y < 6698305061578466.0

    1. Initial program 1.4

      \[\left(\left(e^{x} - 1\right) + \sqrt{y + 1}\right) - \sqrt{y}\]
    2. Using strategy rm
    3. Applied flip--1.1

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

    if 6698305061578466.0 < y

    1. Initial program 60.6

      \[\left(\left(e^{x} - 1\right) + \sqrt{y + 1}\right) - \sqrt{y}\]
    2. Using strategy rm
    3. Applied associate--l+39.6

      \[\leadsto \color{blue}{\left(e^{x} - 1\right) + \left(\sqrt{y + 1} - \sqrt{y}\right)}\]
  3. Recombined 2 regimes into one program.
  4. Final simplification19.2

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \le 6698305061578466.0:\\ \;\;\;\;\frac{\left(\left(e^{x} - 1\right) + \sqrt{y + 1}\right) \cdot \left(\left(e^{x} - 1\right) + \sqrt{y + 1}\right) - \sqrt{y} \cdot \sqrt{y}}{\left(\left(e^{x} - 1\right) + \sqrt{y + 1}\right) + \sqrt{y}}\\ \mathbf{else}:\\ \;\;\;\;\left(e^{x} - 1\right) + \left(\sqrt{y + 1} - \sqrt{y}\right)\\ \end{array}\]

Runtime

Time bar (total: 27.1s)Debug log

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