Average Error: 14.2 → 2.1
Time: 6.0s
Precision: 64
Internal precision: 384
\[x \cdot \frac{\frac{y}{z} \cdot t}{t}\]
\[\begin{array}{l} \mathbf{if}\;\frac{\frac{y}{z} \cdot t}{t} \le -9.410988200317622 \cdot 10^{-199}:\\ \;\;\;\;\frac{x}{\frac{z}{y}}\\ \mathbf{if}\;\frac{\frac{y}{z} \cdot t}{t} \le -0.0:\\ \;\;\;\;\frac{x}{z} \cdot y\\ \mathbf{if}\;\frac{\frac{y}{z} \cdot t}{t} \le 2.3184913045916877 \cdot 10^{+293}:\\ \;\;\;\;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 4 regimes.
  2. if (/ (* (/ y z) t) t) < -9.410988200317622e-199

    1. Initial program 11.0

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

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

    if -9.410988200317622e-199 < (/ (* (/ y z) t) t) < -0.0

    1. Initial program 23.7

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

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

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

    if -0.0 < (/ (* (/ y z) t) t) < 2.3184913045916877e+293

    1. Initial program 0.7

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

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

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

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

    if 2.3184913045916877e+293 < (/ (* (/ y z) t) t)

    1. Initial program 58.8

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

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

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

Runtime

Time bar (total: 6.0s) Debug logProfile

Please include this information when filing a bug report:

herbie shell --seed '#(1064524629 4159152179 2999149171 575749698 4006532819 692958815)'
(FPCore (x y z t)
  :name "Graphics.Rendering.Chart.Backend.Diagrams:calcFontMetrics from Chart-diagrams-1.5.1"
  (* x (/ (* (/ y z) t) t)))