Average Error: 13.9 → 0.5
Time: 16.3s
Precision: 64
Internal Precision: 576
\[x \cdot \frac{\frac{y}{z} \cdot t}{t}\]
\[\begin{array}{l} \mathbf{if}\;\frac{z}{y} = -\infty:\\ \;\;\;\;\frac{y}{\frac{z}{x}}\\ \mathbf{if}\;\frac{z}{y} \le -3.4195659395601823 \cdot 10^{-259}:\\ \;\;\;\;\frac{x}{\frac{z}{y}}\\ \mathbf{if}\;\frac{z}{y} \le 1.14262225525217 \cdot 10^{-130}:\\ \;\;\;\;\frac{y}{\frac{z}{x}}\\ \mathbf{if}\;\frac{z}{y} \le 1.7782780139252615 \cdot 10^{+283}:\\ \;\;\;\;\frac{x}{\frac{z}{y}}\\ \mathbf{else}:\\ \;\;\;\;\frac{x \cdot 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 3 regimes
  2. if (/ z y) < -inf.0 or -3.4195659395601823e-259 < (/ z y) < 1.14262225525217e-130

    1. Initial program 29.6

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

      \[\leadsto \color{blue}{x \cdot \frac{y}{z}}\]
    3. Using strategy rm
    4. Applied div-inv21.5

      \[\leadsto x \cdot \color{blue}{\left(y \cdot \frac{1}{z}\right)}\]
    5. Applied associate-*r*1.3

      \[\leadsto \color{blue}{\left(x \cdot y\right) \cdot \frac{1}{z}}\]
    6. Using strategy rm
    7. Applied pow11.3

      \[\leadsto \left(x \cdot y\right) \cdot \color{blue}{{\left(\frac{1}{z}\right)}^{1}}\]
    8. Applied pow11.3

      \[\leadsto \color{blue}{{\left(x \cdot y\right)}^{1}} \cdot {\left(\frac{1}{z}\right)}^{1}\]
    9. Applied pow-prod-down1.3

      \[\leadsto \color{blue}{{\left(\left(x \cdot y\right) \cdot \frac{1}{z}\right)}^{1}}\]
    10. Applied simplify1.4

      \[\leadsto {\color{blue}{\left(\frac{y}{\frac{z}{x}}\right)}}^{1}\]

    if -inf.0 < (/ z y) < -3.4195659395601823e-259 or 1.14262225525217e-130 < (/ z y) < 1.7782780139252615e+283

    1. Initial program 8.4

      \[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.1

      \[\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.7782780139252615e+283 < (/ z y)

    1. Initial program 19.7

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

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

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

    \[\leadsto \color{blue}{\begin{array}{l} \mathbf{if}\;\frac{z}{y} = -\infty:\\ \;\;\;\;\frac{y}{\frac{z}{x}}\\ \mathbf{if}\;\frac{z}{y} \le -3.4195659395601823 \cdot 10^{-259}:\\ \;\;\;\;\frac{x}{\frac{z}{y}}\\ \mathbf{if}\;\frac{z}{y} \le 1.14262225525217 \cdot 10^{-130}:\\ \;\;\;\;\frac{y}{\frac{z}{x}}\\ \mathbf{if}\;\frac{z}{y} \le 1.7782780139252615 \cdot 10^{+283}:\\ \;\;\;\;\frac{x}{\frac{z}{y}}\\ \mathbf{else}:\\ \;\;\;\;\frac{x \cdot y}{z}\\ \end{array}}\]

Runtime

Time bar (total: 16.3s)Debug logProfile

herbie shell --seed '#(1071373924 2949776965 1885069702 3247780810 90874544 2263903749)' +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)))