Average Error: 14.7 → 0.0
Time: 25.1s
Precision: 64
Internal Precision: 576
\[2 \cdot \frac{v}{1 + {v}^{2}}\]
\[\begin{array}{l} \mathbf{if}\;v \le -222296116.3764682 \lor \neg \left(v \le 437.935549266971\right):\\ \;\;\;\;\frac{2}{{v}^{5}} - \left(\frac{\frac{2}{v}}{v \cdot v} - \frac{2}{v}\right)\\ \mathbf{else}:\\ \;\;\;\;\left(v \cdot v - 1\right) \cdot \frac{2 \cdot v}{\left(v \cdot v\right) \cdot \left(v \cdot v\right) - 1}\\ \end{array}\]

Error

Bits error versus v

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Split input into 2 regimes
  2. if v < -222296116.3764682 or 437.935549266971 < v

    1. Initial program 29.9

      \[2 \cdot \frac{v}{1 + {v}^{2}}\]
    2. Initial simplification29.9

      \[\leadsto \frac{2 \cdot v}{v \cdot v + 1}\]
    3. Using strategy rm
    4. Applied flip-+47.7

      \[\leadsto \frac{2 \cdot v}{\color{blue}{\frac{\left(v \cdot v\right) \cdot \left(v \cdot v\right) - 1 \cdot 1}{v \cdot v - 1}}}\]
    5. Applied associate-/r/47.8

      \[\leadsto \color{blue}{\frac{2 \cdot v}{\left(v \cdot v\right) \cdot \left(v \cdot v\right) - 1 \cdot 1} \cdot \left(v \cdot v - 1\right)}\]
    6. Taylor expanded around inf 0.0

      \[\leadsto \color{blue}{\left(2 \cdot \frac{1}{v} + 2 \cdot \frac{1}{{v}^{5}}\right) - 2 \cdot \frac{1}{{v}^{3}}}\]
    7. Simplified0.0

      \[\leadsto \color{blue}{\frac{2}{{v}^{5}} - \left(\frac{\frac{2}{v}}{v \cdot v} - \frac{2}{v}\right)}\]

    if -222296116.3764682 < v < 437.935549266971

    1. Initial program 0.0

      \[2 \cdot \frac{v}{1 + {v}^{2}}\]
    2. Initial simplification0.0

      \[\leadsto \frac{2 \cdot v}{v \cdot v + 1}\]
    3. Using strategy rm
    4. Applied flip-+0.0

      \[\leadsto \frac{2 \cdot v}{\color{blue}{\frac{\left(v \cdot v\right) \cdot \left(v \cdot v\right) - 1 \cdot 1}{v \cdot v - 1}}}\]
    5. Applied associate-/r/0.0

      \[\leadsto \color{blue}{\frac{2 \cdot v}{\left(v \cdot v\right) \cdot \left(v \cdot v\right) - 1 \cdot 1} \cdot \left(v \cdot v - 1\right)}\]
  3. Recombined 2 regimes into one program.
  4. Final simplification0.0

    \[\leadsto \begin{array}{l} \mathbf{if}\;v \le -222296116.3764682 \lor \neg \left(v \le 437.935549266971\right):\\ \;\;\;\;\frac{2}{{v}^{5}} - \left(\frac{\frac{2}{v}}{v \cdot v} - \frac{2}{v}\right)\\ \mathbf{else}:\\ \;\;\;\;\left(v \cdot v - 1\right) \cdot \frac{2 \cdot v}{\left(v \cdot v\right) \cdot \left(v \cdot v\right) - 1}\\ \end{array}\]

Runtime

Time bar (total: 25.1s)Debug log

herbie shell --seed '#(2775764126 3555076145 3898259844 1891440260 2599947619 1948460636)' 
(FPCore (v)
  :name "2v/(1+v^2)"
  (* 2 (/ v (+ 1 (pow v 2)))))