Average Error: 10.3 → 5.8
Time: 49.0s
Precision: 64
Internal precision: 128
\[x + \frac{y - z}{\left(t + 1.0\right) - z} \cdot \left(a - x\right)\]
\[\begin{array}{l} \mathbf{if}\;z \le -3.526581914863459 \cdot 10^{+226}:\\ \;\;\;\;a - \frac{y}{z} \cdot \left(a - x\right)\\ \mathbf{if}\;z \le 2.8945875003433984 \cdot 10^{+181}:\\ \;\;\;\;x + \left(y - z\right) \cdot \frac{a - x}{\left(1.0 + t\right) - z}\\ \mathbf{else}:\\ \;\;\;\;a - \frac{y}{z} \cdot \left(a - x\right)\\ \end{array}\]

Error

Bits error versus x

Bits error versus y

Bits error versus z

Bits error versus t

Bits error versus a

Derivation

  1. Split input into 2 regimes.
  2. if z < -3.526581914863459e+226 or 2.8945875003433984e+181 < z

    1. Initial program 29.7

      \[x + \frac{y - z}{\left(t + 1.0\right) - z} \cdot \left(a - x\right)\]
    2. Applied taylor 12.7

      \[\leadsto \left(\frac{y \cdot x}{z} + a\right) - \frac{y \cdot a}{z}\]
    3. Taylor expanded around inf 12.7

      \[\leadsto \color{blue}{\left(\frac{y \cdot x}{z} + a\right) - \frac{y \cdot a}{z}}\]
    4. Applied simplify 1.3

      \[\leadsto \color{blue}{a - \frac{y}{z} \cdot \left(a - x\right)}\]

    if -3.526581914863459e+226 < z < 2.8945875003433984e+181

    1. Initial program 6.0

      \[x + \frac{y - z}{\left(t + 1.0\right) - z} \cdot \left(a - x\right)\]
    2. Using strategy rm
    3. Applied div-inv 6.1

      \[\leadsto x + \color{blue}{\left(\left(y - z\right) \cdot \frac{1}{\left(t + 1.0\right) - z}\right)} \cdot \left(a - x\right)\]
    4. Applied associate-*l* 6.9

      \[\leadsto x + \color{blue}{\left(y - z\right) \cdot \left(\frac{1}{\left(t + 1.0\right) - z} \cdot \left(a - x\right)\right)}\]
    5. Applied simplify 6.8

      \[\leadsto x + \left(y - z\right) \cdot \color{blue}{\frac{a - x}{\left(1.0 + t\right) - z}}\]
  3. Recombined 2 regimes into one program.
  4. Removed slow pow expressions

Runtime

Time bar (total: 49.0s) Debug log

Please include this information when filing a bug report:

herbie --seed '#(3416113638 274828741 3643848846 65601646 2612331895 2426467157)'
(FPCore (x y z t a)
  :name "Hakyll.Web.Tags:renderTagCloud from hakyll-4.7.2.3"
  (+ x (* (/ (- y z) (- (+ t 1.0) z)) (- a x))))