Average Error: 14.6 → 0.4
Time: 17.3s
Precision: 64
Internal Precision: 384
\[x \cdot \frac{\frac{y}{z} \cdot t}{t}\]
\[\begin{array}{l} \mathbf{if}\;x \cdot y \le -8.396162549307128 \cdot 10^{+207}:\\ \;\;\;\;\frac{x}{\frac{z}{y}}\\ \mathbf{if}\;x \cdot y \le -9.372725188909327 \cdot 10^{-239}:\\ \;\;\;\;\frac{x \cdot y}{z}\\ \mathbf{if}\;x \cdot y \le 5.6856486881731 \cdot 10^{-315}:\\ \;\;\;\;\frac{\frac{x}{z}}{\frac{1}{y}}\\ \mathbf{if}\;x \cdot y \le 1.1060041750570711 \cdot 10^{+144}:\\ \;\;\;\;\frac{x \cdot y}{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 4 regimes
  2. if (* x y) < -8.396162549307128e+207

    1. Initial program 10.8

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

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

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

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

    if -8.396162549307128e+207 < (* x y) < -9.372725188909327e-239 or 5.6856486881731e-315 < (* x y) < 1.1060041750570711e+144

    1. Initial program 18.1

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

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

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

    if -9.372725188909327e-239 < (* x y) < 5.6856486881731e-315

    1. Initial program 3.5

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

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

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

      \[\leadsto \color{blue}{\frac{x}{\frac{z}{y}}}\]
    7. Using strategy rm
    8. Applied div-inv0.1

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

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

    if 1.1060041750570711e+144 < (* x y)

    1. Initial program 13.9

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

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

Runtime

Time bar (total: 17.3s)Debug logProfile

herbie shell --seed '#(1070833653 108281690 3330367898 3632331308 3494323072 43156186)' +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)))