Average Error: 14.0 → 0.3
Time: 13.8s
Precision: 64
Internal Precision: 576
\[x \cdot \frac{\frac{y}{z} \cdot t}{t}\]
\[\begin{array}{l} \mathbf{if}\;\frac{y}{z} \le -1.2573367356121057 \cdot 10^{+274}:\\ \;\;\;\;\frac{x \cdot y}{z}\\ \mathbf{if}\;\frac{y}{z} \le -1.0193322468821646 \cdot 10^{-217}:\\ \;\;\;\;\frac{x}{\frac{z}{y}}\\ \mathbf{if}\;\frac{y}{z} \le 1.473521041029 \cdot 10^{-315}:\\ \;\;\;\;\frac{x \cdot y}{z}\\ \mathbf{if}\;\frac{y}{z} \le 1.776905063661063 \cdot 10^{+308}:\\ \;\;\;\;\frac{y}{z} \cdot x\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{\frac{z}{x}}\\ \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 5 regimes
  2. if (/ y z) < -1.2573367356121057e+274

    1. Initial program 50.9

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

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

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

    if -1.2573367356121057e+274 < (/ y z) < -1.0193322468821646e-217

    1. Initial program 9.3

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

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

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

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

    if -1.0193322468821646e-217 < (/ y z) < 1.473521041029e-315

    1. Initial program 17.1

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

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

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

    if 1.473521041029e-315 < (/ y z) < 1.776905063661063e+308

    1. Initial program 10.2

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

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

    if 1.776905063661063e+308 < (/ y z)

    1. Initial program 60.1

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

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{\begin{array}{l} \mathbf{if}\;\frac{y}{z} \le -1.2573367356121057 \cdot 10^{+274}:\\ \;\;\;\;\frac{x \cdot y}{z}\\ \mathbf{if}\;\frac{y}{z} \le -1.0193322468821646 \cdot 10^{-217}:\\ \;\;\;\;\frac{x}{\frac{z}{y}}\\ \mathbf{if}\;\frac{y}{z} \le 1.473521041029 \cdot 10^{-315}:\\ \;\;\;\;\frac{x \cdot y}{z}\\ \mathbf{if}\;\frac{y}{z} \le 1.776905063661063 \cdot 10^{+308}:\\ \;\;\;\;\frac{y}{z} \cdot x\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{\frac{z}{x}}\\ \end{array}}\]

Runtime

Time bar (total: 13.8s)Debug logProfile

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