Average Error: 13.9 → 0.6
Time: 12.2s
Precision: 64
Internal Precision: 384
\[x \cdot \frac{\frac{y}{z} \cdot t}{t}\]
\[\begin{array}{l} \mathbf{if}\;y \cdot x \le -2.544303619625978 \cdot 10^{+187}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{if}\;y \cdot x \le -2.942339147116522 \cdot 10^{-303}:\\ \;\;\;\;\frac{y \cdot x}{z}\\ \mathbf{if}\;y \cdot x \le 6.996633849420548 \cdot 10^{-146}:\\ \;\;\;\;\frac{x}{z} \cdot y\\ \mathbf{if}\;y \cdot x \le 1.1733399963400005 \cdot 10^{+131}:\\ \;\;\;\;\frac{y \cdot x}{z}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \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 x) < -2.544303619625978e+187 or 1.1733399963400005e+131 < (* y x)

    1. Initial program 10.9

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

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

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

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

    if -2.544303619625978e+187 < (* y x) < -2.942339147116522e-303 or 6.996633849420548e-146 < (* y x) < 1.1733399963400005e+131

    1. Initial program 18.3

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

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

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

    if -2.942339147116522e-303 < (* y x) < 6.996633849420548e-146

    1. Initial program 5.8

      \[x \cdot \frac{\frac{y}{z} \cdot t}{t}\]
    2. Applied simplify1.1

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

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

Runtime

Time bar (total: 12.2s)Debug logProfile

herbie shell --seed '#(1064397287 3527694221 3797617954 1138343853 2854031332 1153838279)' 
(FPCore (x y z t)
  :name "Graphics.Rendering.Chart.Backend.Diagrams:calcFontMetrics from Chart-diagrams-1.5.1"
  (* x (/ (* (/ y z) t) t)))