Average Error: 14.1 → 0.3
Time: 12.0s
Precision: 64
Internal Precision: 384
\[x \cdot \frac{\frac{y}{z} \cdot t}{t}\]
\[\begin{array}{l} \mathbf{if}\;\frac{y}{z} = -\infty:\\ \;\;\;\;\frac{x}{z} \cdot y\\ \mathbf{if}\;\frac{y}{z} \le -1.1951226828780078 \cdot 10^{-248}:\\ \;\;\;\;\frac{x}{\frac{z}{y}}\\ \mathbf{if}\;\frac{y}{z} \le 2.7566161154944494 \cdot 10^{-191}:\\ \;\;\;\;\frac{x}{z} \cdot y\\ \mathbf{if}\;\frac{y}{z} \le 1.6949670904040425 \cdot 10^{+202}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{z} \cdot 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) or -1.1951226828780078e-248 < (/ y z) < 2.7566161154944494e-191 or 1.6949670904040425e+202 < (/ y z)

    1. Initial program 24.2

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

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

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

    if (/ y z) < -1.1951226828780078e-248

    1. Initial program 10.1

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

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

    if 2.7566161154944494e-191 < (/ y z) < 1.6949670904040425e+202

    1. Initial program 7.0

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

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

      \[\leadsto \color{blue}{x \cdot \frac{1}{\frac{z}{y}}}\]
    5. Applied simplify0.2

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

Runtime

Time bar (total: 12.0s)Debug logProfile

herbie shell --seed '#(1064173506 2580572819 2847706409 4129882574 1125180799 1845288547)' 
(FPCore (x y z t)
  :name "Graphics.Rendering.Chart.Backend.Diagrams:calcFontMetrics from Chart-diagrams-1.5.1"
  (* x (/ (* (/ y z) t) t)))