Average Error: 14.3 → 0.7
Time: 13.9s
Precision: 64
Internal Precision: 576
\[x \cdot \frac{\frac{y}{z} \cdot t}{t}\]
\[\begin{array}{l} \mathbf{if}\;\frac{x}{z} \le -4.976893323372148 \cdot 10^{+107}:\\ \;\;\;\;\frac{x}{\frac{z}{y}}\\ \mathbf{if}\;\frac{x}{z} \le -8.40450379793841 \cdot 10^{-210}:\\ \;\;\;\;\frac{y}{\frac{z}{x}}\\ \mathbf{if}\;\frac{x}{z} \le 7.04505313064968 \cdot 10^{-300}:\\ \;\;\;\;\frac{x}{\frac{z}{y}}\\ \mathbf{if}\;\frac{x}{z} \le 4.004979357220133 \cdot 10^{+174}:\\ \;\;\;\;\frac{y}{\frac{z}{x}}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{z} \cdot \left(y \cdot x\right)\\ \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 z) < -4.976893323372148e+107 or -8.40450379793841e-210 < (/ x z) < 7.04505313064968e-300

    1. Initial program 7.4

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

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

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

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

    if -4.976893323372148e+107 < (/ x z) < -8.40450379793841e-210 or 7.04505313064968e-300 < (/ x z) < 4.004979357220133e+174

    1. Initial program 18.1

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

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

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

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

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

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

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

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

    if 4.004979357220133e+174 < (/ x z)

    1. Initial program 10.9

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

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

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

      \[\leadsto \color{blue}{\left(x \cdot y\right) \cdot \frac{1}{z}}\]
  3. Recombined 3 regimes into one program.
  4. Applied simplify0.7

    \[\leadsto \color{blue}{\begin{array}{l} \mathbf{if}\;\frac{x}{z} \le -4.976893323372148 \cdot 10^{+107}:\\ \;\;\;\;\frac{x}{\frac{z}{y}}\\ \mathbf{if}\;\frac{x}{z} \le -8.40450379793841 \cdot 10^{-210}:\\ \;\;\;\;\frac{y}{\frac{z}{x}}\\ \mathbf{if}\;\frac{x}{z} \le 7.04505313064968 \cdot 10^{-300}:\\ \;\;\;\;\frac{x}{\frac{z}{y}}\\ \mathbf{if}\;\frac{x}{z} \le 4.004979357220133 \cdot 10^{+174}:\\ \;\;\;\;\frac{y}{\frac{z}{x}}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{z} \cdot \left(y \cdot x\right)\\ \end{array}}\]

Runtime

Time bar (total: 13.9s)Debug logProfile

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