Average Error: 14.5 → 1.6
Time: 19.6s
Precision: 64
Internal Precision: 384
\[x \cdot \frac{\frac{y}{z} \cdot t}{t}\]
\[\begin{array}{l} \mathbf{if}\;\frac{y}{z} \le -5.4744570469957105 \cdot 10^{-270}:\\ \;\;\;\;\frac{x}{\frac{z}{y}}\\ \mathbf{if}\;\frac{y}{z} \le 1.9578412646065 \cdot 10^{-311}:\\ \;\;\;\;\frac{1}{\frac{\frac{z}{x}}{y}}\\ \mathbf{if}\;\frac{y}{z} \le 4.907141680174758 \cdot 10^{+246}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{else}:\\ \;\;\;\;\frac{x \cdot 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 4 regimes
  2. if (/ y z) < -5.4744570469957105e-270

    1. Initial program 12.9

      \[x \cdot \frac{\frac{y}{z} \cdot t}{t}\]
    2. Applied simplify3.8

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

      \[\leadsto \color{blue}{\frac{x \cdot y}{z}}\]
    5. Using strategy rm
    6. Applied associate-/l*3.5

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

    if -5.4744570469957105e-270 < (/ y z) < 1.9578412646065e-311

    1. Initial program 20.4

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

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

      \[\leadsto \color{blue}{\frac{x \cdot y}{z}}\]
    5. Using strategy rm
    6. Applied clear-num0.6

      \[\leadsto \color{blue}{\frac{1}{\frac{z}{x \cdot y}}}\]
    7. Using strategy rm
    8. Applied associate-/r*0.6

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

    if 1.9578412646065e-311 < (/ y z) < 4.907141680174758e+246

    1. Initial program 9.9

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

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

    if 4.907141680174758e+246 < (/ y z)

    1. Initial program 48.1

      \[x \cdot \frac{\frac{y}{z} \cdot t}{t}\]
    2. Applied simplify36.7

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

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

Runtime

Time bar (total: 19.6s)Debug logProfile

herbie shell --seed '#(1070386091 2509006183 1430610344 1025408621 36622005 1425925650)' +o rules:numerics
(FPCore (x y z t)
  :name "Graphics.Rendering.Chart.Backend.Diagrams:calcFontMetrics from Chart-diagrams-1.5.1"
  (* x (/ (* (/ y z) t) t)))