Average Error: 14.4 → 0.2
Time: 29.2s
Precision: 64
Internal Precision: 576
\[x \cdot \frac{\frac{y}{z} \cdot t}{t}\]
\[\begin{array}{l} \mathbf{if}\;x \cdot y \le -1.7124367751371198 \cdot 10^{+269}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{if}\;x \cdot y \le -7.851297223846804 \cdot 10^{-276}:\\ \;\;\;\;\frac{x \cdot y}{z}\\ \mathbf{if}\;x \cdot y \le 2.278079078415076 \cdot 10^{-304}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{if}\;x \cdot y \le 4.059792223425976 \cdot 10^{+280}:\\ \;\;\;\;\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 2 regimes
  2. if (* x y) < -1.7124367751371198e+269 or -7.851297223846804e-276 < (* x y) < 2.278079078415076e-304 or 4.059792223425976e+280 < (* x y)

    1. Initial program 4.7

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

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

    if -1.7124367751371198e+269 < (* x y) < -7.851297223846804e-276 or 2.278079078415076e-304 < (* x y) < 4.059792223425976e+280

    1. Initial program 17.5

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

      \[\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}}\]
  3. Recombined 2 regimes into one program.

Runtime

Time bar (total: 29.2s)Debug logProfile

herbie shell --seed '#(1071725047 233389029 2036512464 3988615230 2972226563 1111574017)' +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)))