Average Error: 14.4 → 1.1
Time: 15.9s
Precision: 64
Internal Precision: 576
\[x \cdot \frac{\frac{y}{z} \cdot t}{t}\]
\[\begin{array}{l} \mathbf{if}\;x \cdot y \le -1.984167408365087 \cdot 10^{+79}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{if}\;x \cdot y \le -2.9674970220016754 \cdot 10^{-268}:\\ \;\;\;\;\frac{x \cdot y}{z}\\ \mathbf{if}\;x \cdot y \le 2.6811974231139 \cdot 10^{-317}:\\ \;\;\;\;\frac{x}{\frac{z}{y}}\\ \mathbf{if}\;x \cdot y \le 1.6361723623705766 \cdot 10^{+148}:\\ \;\;\;\;\frac{x \cdot y}{z}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{z}}{\frac{1}{y}}\\ \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) < -1.984167408365087e+79

    1. Initial program 15.9

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

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

    if -1.984167408365087e+79 < (* x y) < -2.9674970220016754e-268 or 2.6811974231139e-317 < (* x y) < 1.6361723623705766e+148

    1. Initial program 17.8

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

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

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

    if -2.9674970220016754e-268 < (* x y) < 2.6811974231139e-317

    1. Initial program 2.7

      \[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/18.0

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

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

    if 1.6361723623705766e+148 < (* x y)

    1. Initial program 11.3

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

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

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

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

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

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

Runtime

Time bar (total: 15.9s)Debug logProfile

herbie shell --seed '#(1071501266 3581234924 1086666455 2685055582 1243441566 1802958749)' 
(FPCore (x y z t)
  :name "Graphics.Rendering.Chart.Backend.Diagrams:calcFontMetrics from Chart-diagrams-1.5.1"
  (* x (/ (* (/ y z) t) t)))