Average Error: 11.8 → 3.5
Time: 21.0s
Precision: 64
Internal precision: 1408
\[x + \frac{y - z}{\left(t + 1.0\right) - z} \cdot \left(a - x\right)\]
\[\begin{array}{l} \mathbf{if}\;z \le -1.63984933815402 \cdot 10^{+178}:\\ \;\;\;\;a - \left(a - x\right) \cdot \frac{y}{z}\\ \mathbf{if}\;z \le 4.4257333746511086 \cdot 10^{+123}:\\ \;\;\;\;x + \left(\left(y - z\right) \cdot \frac{1}{\left(t + 1.0\right) - z}\right) \cdot \left(a - x\right)\\ \mathbf{else}:\\ \;\;\;\;a - \left(a - x\right) \cdot \frac{y}{z}\\ \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 < -1.63984933815402e+178 or 4.4257333746511086e+123 < z

    1. Initial program 30.4

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

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

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

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

    if -1.63984933815402e+178 < z < 4.4257333746511086e+123

    1. Initial program 4.4

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

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

Runtime

Time bar (total: 21.0s) Debug logProfile

Please include this information when filing a bug report:

herbie shell --seed '#(1064524629 4159152179 2999149171 575749698 4006532819 692958815)'
(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))))