Average Error: 9.4 → 5.4
Time: 5.4m
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}\;x + \frac{y - z}{\left(t + 1.0\right) - z} \cdot \left(a - x\right) \le -1.6875435329886256 \cdot 10^{-266}:\\ \;\;\;\;x + \left(\frac{y - z}{\left(t + 1.0\right) - z} \cdot \left(\sqrt[3]{a - x} \cdot \sqrt[3]{a - x}\right)\right) \cdot \sqrt[3]{a - x}\\ \mathbf{if}\;x + \frac{y - z}{\left(t + 1.0\right) - z} \cdot \left(a - x\right) \le 1.53948630784267 \cdot 10^{-299}:\\ \;\;\;\;a - \left(a - x\right) \cdot \frac{y}{z}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{x + \frac{y - z}{\left(t + 1.0\right) - z} \cdot \left(a - x\right)} \cdot \sqrt{x + \frac{y - z}{\left(t + 1.0\right) - 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 3 regimes
  2. if (+ x (* (/ (- y z) (- (+ t 1.0) z)) (- a x))) < -1.6875435329886256e-266

    1. Initial program 0.8

      \[x + \frac{y - z}{\left(t + 1.0\right) - z} \cdot \left(a - x\right)\]
    2. Using strategy rm
    3. Applied add-cube-cbrt1.6

      \[\leadsto x + \frac{y - z}{\left(t + 1.0\right) - z} \cdot \color{blue}{\left(\left(\sqrt[3]{a - x} \cdot \sqrt[3]{a - x}\right) \cdot \sqrt[3]{a - x}\right)}\]
    4. Applied associate-*r*1.6

      \[\leadsto x + \color{blue}{\left(\frac{y - z}{\left(t + 1.0\right) - z} \cdot \left(\sqrt[3]{a - x} \cdot \sqrt[3]{a - x}\right)\right) \cdot \sqrt[3]{a - x}}\]

    if -1.6875435329886256e-266 < (+ x (* (/ (- y z) (- (+ t 1.0) z)) (- a x))) < 1.53948630784267e-299

    1. Initial program 61.5

      \[x + \frac{y - z}{\left(t + 1.0\right) - z} \cdot \left(a - x\right)\]
    2. Taylor expanded around inf 34.2

      \[\leadsto \color{blue}{\left(\frac{y \cdot x}{z} + a\right) - \frac{y \cdot a}{z}}\]
    3. Applied simplify29.2

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

    if 1.53948630784267e-299 < (+ x (* (/ (- y z) (- (+ t 1.0) z)) (- a x)))

    1. Initial program 1.0

      \[x + \frac{y - z}{\left(t + 1.0\right) - z} \cdot \left(a - x\right)\]
    2. Using strategy rm
    3. Applied add-sqr-sqrt1.4

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

Runtime

Time bar (total: 5.4m)Debug logProfile

herbie shell --seed '#(1062930989 876886121 3990119081 3032829768 3060892583 1929069376)' 
(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))))