Average Error: 14.6 → 0.8
Time: 24.9s
Precision: 64
Internal Precision: 384
\[x \cdot \frac{\frac{y}{z} \cdot t}{t}\]
\[\begin{array}{l} \mathbf{if}\;\frac{y}{z} \le -3.7471581527883123 \cdot 10^{+242}:\\ \;\;\;\;\frac{x \cdot y}{z}\\ \mathbf{if}\;\frac{y}{z} \le -3.3195478994330023 \cdot 10^{-279}:\\ \;\;\;\;\frac{x}{\frac{z}{y}}\\ \mathbf{if}\;\frac{y}{z} \le 4.4097910387752456 \cdot 10^{-75}:\\ \;\;\;\;\frac{x \cdot y}{z}\\ \mathbf{if}\;\frac{y}{z} \le 2.698636675291103 \cdot 10^{+230}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\frac{\frac{z}{x}}{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 (/ y z) < -3.7471581527883123e+242 or -3.3195478994330023e-279 < (/ y z) < 4.4097910387752456e-75

    1. Initial program 19.2

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

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

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

    if -3.7471581527883123e+242 < (/ y z) < -3.3195478994330023e-279

    1. Initial program 9.7

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

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

      \[\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 4.4097910387752456e-75 < (/ y z) < 2.698636675291103e+230

    1. Initial program 7.1

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

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

    if 2.698636675291103e+230 < (/ y z)

    1. Initial program 48.0

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

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

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

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

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

Runtime

Time bar (total: 24.9s)Debug logProfile

herbie shell --seed '#(1070991898 1055468627 4280279443 640792587 928206309 3646738750)' +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)))