Average Error: 14.4 → 0.4
Time: 20.0s
Precision: 64
Internal Precision: 576
\[x \cdot \frac{\frac{y}{z} \cdot t}{t}\]
\[\begin{array}{l} \mathbf{if}\;x \cdot y \le -2.053868311538636 \cdot 10^{+154}:\\ \;\;\;\;\frac{\frac{x}{z}}{\frac{1}{y}}\\ \mathbf{if}\;x \cdot y \le -6.0813174702995605 \cdot 10^{-292}:\\ \;\;\;\;\frac{x \cdot y}{z}\\ \mathbf{if}\;x \cdot y \le 8.284306679668892 \cdot 10^{-253}:\\ \;\;\;\;\frac{x}{\frac{z}{y}}\\ \mathbf{if}\;x \cdot y \le 3.1706314423170034 \cdot 10^{+212}:\\ \;\;\;\;\frac{x \cdot y}{z}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{\frac{z}{y}}\\ \end{array}\]

Error

Bits error versus x

Bits error versus y

Bits error versus z

Bits error versus t

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Split input into 3 regimes
  2. if (* x y) < -2.053868311538636e+154

    1. Initial program 12.4

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

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

      \[\leadsto \color{blue}{\frac{x \cdot y}{z}}\]
    5. Using strategy rm
    6. Applied associate-/l*2.1

      \[\leadsto \color{blue}{\frac{x}{\frac{z}{y}}}\]
    7. Using strategy rm
    8. Applied div-inv2.2

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

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

    if -2.053868311538636e+154 < (* x y) < -6.0813174702995605e-292 or 8.284306679668892e-253 < (* x y) < 3.1706314423170034e+212

    1. Initial program 18.2

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

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

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

    if -6.0813174702995605e-292 < (* x y) < 8.284306679668892e-253 or 3.1706314423170034e+212 < (* x y)

    1. Initial program 4.7

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

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

      \[\leadsto \color{blue}{\frac{x \cdot y}{z}}\]
    5. Using strategy rm
    6. Applied associate-/l*0.4

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

Runtime

Time bar (total: 20.0s)Debug logProfile

herbie shell --seed 2018193 +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)))