Average Error: 26.6 → 6.0
Time: 51.6s
Precision: 64
Internal precision: 128
\[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t}\]
\[\begin{array}{l} \mathbf{if}\;a \le -1.0857363802206783 \cdot 10^{-54}:\\ \;\;\;\;x + {\left(\frac{\sqrt[3]{y - x} \cdot \sqrt[3]{z - t}}{\sqrt[3]{a - t}}\right)}^3\\ \mathbf{if}\;a \le 3.0098787995381245 \cdot 10^{-89}:\\ \;\;\;\;y - \frac{z}{t} \cdot \left(y - x\right)\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y - x}{1} \cdot \frac{z - t}{a - t}\\ \end{array}\]

Error

Bits error versus x

Bits error versus y

Bits error versus z

Bits error versus t

Bits error versus a

Target

Original26.6
Comparison9.5
Herbie6.0
\[ \begin{array}{l} \mathbf{if}\;a \lt -1.6153062845442575 \cdot 10^{-142}:\\ \;\;\;\;x + \frac{y - x}{1} \cdot \frac{z - t}{a - t}\\ \mathbf{if}\;a \lt 3.774403170083174 \cdot 10^{-182}:\\ \;\;\;\;y - \frac{z}{t} \cdot \left(y - x\right)\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y - x}{1} \cdot \frac{z - t}{a - t}\\ \end{array} \]

Derivation

  1. Split input into 3 regimes.
  2. if a < -1.0857363802206783e-54

    1. Initial program 22.1

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

      \[\leadsto x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{\color{blue}{{\left(\sqrt[3]{a - t}\right)}^3}}\]
    4. Applied add-cube-cbrt 22.5

      \[\leadsto x + \frac{\left(y - x\right) \cdot \color{blue}{{\left(\sqrt[3]{z - t}\right)}^3}}{{\left(\sqrt[3]{a - t}\right)}^3}\]
    5. Applied add-cube-cbrt 22.6

      \[\leadsto x + \frac{\color{blue}{{\left(\sqrt[3]{y - x}\right)}^3} \cdot {\left(\sqrt[3]{z - t}\right)}^3}{{\left(\sqrt[3]{a - t}\right)}^3}\]
    6. Applied cube-unprod 22.6

      \[\leadsto x + \frac{\color{blue}{{\left(\sqrt[3]{y - x} \cdot \sqrt[3]{z - t}\right)}^3}}{{\left(\sqrt[3]{a - t}\right)}^3}\]
    7. Applied cube-undiv 7.8

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

    if -1.0857363802206783e-54 < a < 3.0098787995381245e-89

    1. Initial program 35.6

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

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

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

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

    if 3.0098787995381245e-89 < a

    1. Initial program 22.0

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t}\]
    2. Using strategy rm
    3. Applied *-un-lft-identity 22.0

      \[\leadsto x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{\color{blue}{1 \cdot \left(a - t\right)}}\]
    4. Applied times-frac 8.1

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

Runtime

Time bar (total: 51.6s) Debug log

Please include this information when filing a bug report:

herbie --seed '#(785850078 3242194136 497722281 2983700760 2327042056 1676814270)'
(FPCore (x y z t a)
  :name "Graphics.Rendering.Chart.Axis.Types:linMap from Chart-1.5.3"

  :target
  (if (< a -1.6153062845442575e-142) (+ x (* (/ (- y x) 1) (/ (- z t) (- a t)))) (if (< a 3.774403170083174e-182) (- y (* (/ z t) (- y x))) (+ x (* (/ (- y x) 1) (/ (- z t) (- a t))))))

  (+ x (/ (* (- y x) (- z t)) (- a t))))