Average Error: 13.9 → 0.3
Time: 14.4s
Precision: 64
Internal Precision: 384
\[x \cdot \frac{\frac{y}{z} \cdot t}{t}\]
\[\begin{array}{l} \mathbf{if}\;\frac{y}{z} = -\infty:\\ \;\;\;\;\frac{y \cdot x}{z}\\ \mathbf{if}\;\frac{y}{z} \le -1.3612484407566292 \cdot 10^{-183}:\\ \;\;\;\;\frac{x}{\frac{z}{y}}\\ \mathbf{if}\;\frac{y}{z} \le 5.755659669505292 \cdot 10^{-239}:\\ \;\;\;\;\frac{y \cdot x}{z}\\ \mathbf{if}\;\frac{y}{z} \le 3.314906944751074 \cdot 10^{+249}:\\ \;\;\;\;\frac{x}{\frac{z}{y}}\\ \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 3 regimes
  2. if (/ y z) < -inf.0 or -1.3612484407566292e-183 < (/ y z) < 5.755659669505292e-239

    1. Initial program 20.8

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

      \[\leadsto \color{blue}{\frac{x}{\frac{z}{y}}}\]
    3. Taylor expanded around 0 0.4

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

    if -inf.0 < (/ y z) < -1.3612484407566292e-183 or 5.755659669505292e-239 < (/ y z) < 3.314906944751074e+249

    1. Initial program 8.8

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

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

    if 3.314906944751074e+249 < (/ y z)

    1. Initial program 46.0

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

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

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

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

Runtime

Time bar (total: 14.4s)Debug logProfile

herbie shell --seed '#(1070355188 2193211668 3977393919 3454156579 3755371326 1656365382)' +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)))