Average Error: 16.4 → 6.8
Time: 1.4m
Precision: 64
Internal precision: 128
\[x + \left(y - z\right) \cdot \frac{t - x}{a - z}\]
\[\begin{array}{l} \mathbf{if}\;a \le -7.346288643304349 \cdot 10^{-35}:\\ \;\;\;\;x + {\left(\sqrt[3]{y - z} \cdot \frac{\sqrt[3]{t - x}}{\sqrt[3]{a - z}}\right)}^3\\ \mathbf{if}\;a \le 2.4800667194058456 \cdot 10^{-134}:\\ \;\;\;\;t - \frac{y}{z} \cdot \left(t - x\right)\\ \mathbf{if}\;a \le 9.581782060813449 \cdot 10^{-54}:\\ \;\;\;\;x + {\left(\sqrt[3]{y - z} \cdot \frac{\sqrt[3]{t - x}}{\sqrt[3]{a - z}}\right)}^3\\ \mathbf{if}\;a \le 2.9697010902129357 \cdot 10^{-33}:\\ \;\;\;\;t - \frac{y}{z} \cdot \left(t - x\right)\\ \mathbf{if}\;a \le 1.347053492520341 \cdot 10^{+250}:\\ \;\;\;\;x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\ \mathbf{else}:\\ \;\;\;\;x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\ \end{array}\]

Error

Bits error versus x

Bits error versus y

Bits error versus z

Bits error versus t

Bits error versus a

Target

Original16.4
Comparison16.4
Herbie6.8
\[ x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]

Derivation

  1. Split input into 4 regimes.
  2. if a < -7.346288643304349e-35 or 2.4800667194058456e-134 < a < 9.581782060813449e-54

    1. Initial program 10.9

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

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

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

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

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

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

    if -7.346288643304349e-35 < a < 2.4800667194058456e-134 or 9.581782060813449e-54 < a < 2.9697010902129357e-33

    1. Initial program 29.4

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

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

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

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

    if 2.9697010902129357e-33 < a < 1.347053492520341e+250

    1. Initial program 10.3

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z}\]

    if 1.347053492520341e+250 < a

    1. Initial program 3.6

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

Runtime

Time bar (total: 1.4m) Debug log

Please include this information when filing a bug report:

herbie --seed '#(1422125155 1800593038 3492843827 2194528598 3784060004 4100869845)'
(FPCore (x y z t a)
  :name "Numeric.Signal:interpolate   from hsignal-0.2.7.1"

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

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