Average Error: 2.1 → 2.3
Time: 59.6s
Precision: 64
Internal Precision: 384
\[\frac{x - y}{z - y} \cdot t\]
\[\begin{array}{l} \mathbf{if}\;y \le -4.201205223397465 \cdot 10^{-96}:\\ \;\;\;\;\frac{x - y}{z - y} \cdot t\\ \mathbf{if}\;y \le 3.703336725015114 \cdot 10^{-139}:\\ \;\;\;\;\frac{\frac{x - y}{\frac{1}{t}}}{z - y}\\ \mathbf{else}:\\ \;\;\;\;\frac{x - y}{z - y} \cdot t\\ \end{array}\]

Error

Bits error versus x

Bits error versus y

Bits error versus z

Bits error versus t

Target

Original2.1
Target2.1
Herbie2.3
\[\frac{t}{\frac{z - y}{x - y}}\]

Derivation

  1. Split input into 2 regimes
  2. if y < -4.201205223397465e-96 or 3.703336725015114e-139 < y

    1. Initial program 0.8

      \[\frac{x - y}{z - y} \cdot t\]

    if -4.201205223397465e-96 < y < 3.703336725015114e-139

    1. Initial program 5.3

      \[\frac{x - y}{z - y} \cdot t\]
    2. Using strategy rm
    3. Applied *-un-lft-identity5.3

      \[\leadsto \frac{x - y}{\color{blue}{1 \cdot \left(z - y\right)}} \cdot t\]
    4. Applied add-cube-cbrt6.1

      \[\leadsto \frac{\color{blue}{\left(\sqrt[3]{x - y} \cdot \sqrt[3]{x - y}\right) \cdot \sqrt[3]{x - y}}}{1 \cdot \left(z - y\right)} \cdot t\]
    5. Applied times-frac6.1

      \[\leadsto \color{blue}{\left(\frac{\sqrt[3]{x - y} \cdot \sqrt[3]{x - y}}{1} \cdot \frac{\sqrt[3]{x - y}}{z - y}\right)} \cdot t\]
    6. Applied associate-*l*4.9

      \[\leadsto \color{blue}{\frac{\sqrt[3]{x - y} \cdot \sqrt[3]{x - y}}{1} \cdot \left(\frac{\sqrt[3]{x - y}}{z - y} \cdot t\right)}\]
    7. Using strategy rm
    8. Applied associate-*l/5.4

      \[\leadsto \frac{\sqrt[3]{x - y} \cdot \sqrt[3]{x - y}}{1} \cdot \color{blue}{\frac{\sqrt[3]{x - y} \cdot t}{z - y}}\]
    9. Applied associate-*r/6.7

      \[\leadsto \color{blue}{\frac{\frac{\sqrt[3]{x - y} \cdot \sqrt[3]{x - y}}{1} \cdot \left(\sqrt[3]{x - y} \cdot t\right)}{z - y}}\]
    10. Applied simplify6.0

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

Runtime

Time bar (total: 59.6s)Debug log

herbie shell --seed '#(1567391828 2030694642 2833800258 828025724 3004380912 3532991858)' +o setup:early-exit +o reduce:binary-search
(FPCore (x y z t)
  :name "Numeric.Signal.Multichannel:$cput from hsignal-0.2.7.1"

  :herbie-target
  (/ t (/ (- z y) (- x y)))

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