Average Error: 13.9 → 1.2
Time: 56.3s
Precision: 64
Internal Precision: 384
\[x \cdot \frac{\frac{y}{z} \cdot t}{t}\]
\[\begin{array}{l} \mathbf{if}\;\frac{\frac{y}{z} \cdot t}{t} \le -1.5501875875146737 \cdot 10^{+307}:\\ \;\;\;\;\frac{x}{z} \cdot y\\ \mathbf{if}\;\frac{\frac{y}{z} \cdot t}{t} \le -2.2829355167637312 \cdot 10^{-127}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{if}\;\frac{\frac{y}{z} \cdot t}{t} \le 0.0:\\ \;\;\;\;\frac{y \cdot x}{z}\\ \mathbf{if}\;\frac{\frac{y}{z} \cdot t}{t} \le 1.8054901909153583 \cdot 10^{+155}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{z} \cdot y\\ \end{array}\]

Error

Bits error versus x

Bits error versus y

Bits error versus z

Bits error versus t

Derivation

  1. Split input into 3 regimes
  2. if (/ (* (/ y z) t) t) < -1.5501875875146737e+307 or 1.8054901909153583e+155 < (/ (* (/ y z) t) t)

    1. Initial program 45.3

      \[x \cdot \frac{\frac{y}{z} \cdot t}{t}\]
    2. Applied simplify17.3

      \[\leadsto \color{blue}{\frac{x}{\frac{z}{y}}}\]
    3. Using strategy rm
    4. Applied associate-/r/2.9

      \[\leadsto \color{blue}{\frac{x}{z} \cdot y}\]

    if -1.5501875875146737e+307 < (/ (* (/ y z) t) t) < -2.2829355167637312e-127 or 0.0 < (/ (* (/ y z) t) t) < 1.8054901909153583e+155

    1. Initial program 0.7

      \[x \cdot \frac{\frac{y}{z} \cdot t}{t}\]
    2. Applied simplify0.5

      \[\leadsto \color{blue}{\frac{x}{\frac{z}{y}}}\]
    3. Using strategy rm
    4. Applied div-inv0.6

      \[\leadsto \color{blue}{x \cdot \frac{1}{\frac{z}{y}}}\]
    5. Applied simplify0.4

      \[\leadsto x \cdot \color{blue}{\frac{y}{z}}\]

    if -2.2829355167637312e-127 < (/ (* (/ y z) t) t) < 0.0

    1. Initial program 21.3

      \[x \cdot \frac{\frac{y}{z} \cdot t}{t}\]
    2. Applied simplify9.6

      \[\leadsto \color{blue}{\frac{x}{\frac{z}{y}}}\]
    3. Taylor expanded around 0 1.8

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

Runtime

Time bar (total: 56.3s)Debug logProfile

herbie shell --seed '#(1062930989 876886121 3990119081 3032829768 3060892583 1929069376)' 
(FPCore (x y z t)
  :name "Graphics.Rendering.Chart.Backend.Diagrams:calcFontMetrics from Chart-diagrams-1.5.1"
  (* x (/ (* (/ y z) t) t)))