Average Error: 14.4 → 0.9
Time: 18.0s
Precision: 64
Internal Precision: 576
\[x \cdot \frac{\frac{y}{z} \cdot t}{t}\]
\[\begin{array}{l} \mathbf{if}\;x \cdot y \le -2.4579028461214247 \cdot 10^{+91}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{if}\;x \cdot y \le -1.3941187706457518 \cdot 10^{-171}:\\ \;\;\;\;\frac{x \cdot y}{z}\\ \mathbf{if}\;x \cdot y \le 2.4715428965024342 \cdot 10^{-238}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{if}\;x \cdot y \le 6.590959665323072 \cdot 10^{+186}:\\ \;\;\;\;\frac{x \cdot y}{z}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\frac{\frac{z}{y}}{x}}\\ \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 (* x y) < -2.4579028461214247e+91 or -1.3941187706457518e-171 < (* x y) < 2.4715428965024342e-238

    1. Initial program 7.9

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

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

    if -2.4579028461214247e+91 < (* x y) < -1.3941187706457518e-171 or 2.4715428965024342e-238 < (* x y) < 6.590959665323072e+186

    1. Initial program 19.5

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

      \[\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 6.590959665323072e+186 < (* x y)

    1. Initial program 11.7

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

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

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

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

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

Runtime

Time bar (total: 18.0s)Debug logProfile

herbie shell --seed '#(1071852389 864846987 1238109217 3425890003 4124793586 650694553)' +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)))