Average Error: 14.2 → 6.0
Time: 7.1s
Precision: 64
Internal Precision: 320
\[x \cdot \frac{\frac{y}{z} \cdot t}{t}\]
\[\begin{array}{l} \mathbf{if}\;z \le -6.961428734902451 \cdot 10^{+143}:\\ \;\;\;\;\frac{x}{\frac{z}{y}}\\ \mathbf{elif}\;z \le 2.485245629353602 \cdot 10^{-229}:\\ \;\;\;\;\frac{x \cdot y}{z}\\ \mathbf{elif}\;z \le 9.804480552862454 \cdot 10^{+180}:\\ \;\;\;\;\frac{y}{\frac{z}{x}}\\ \mathbf{else}:\\ \;\;\;\;\frac{x \cdot y}{z}\\ \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 z < -6.961428734902451e+143

    1. Initial program 12.0

      \[x \cdot \frac{\frac{y}{z} \cdot t}{t}\]
    2. Initial simplification7.3

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

      \[\leadsto \color{blue}{\frac{y \cdot x}{z}}\]
    5. Using strategy rm
    6. Applied div-inv7.1

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

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

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

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

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

    if -6.961428734902451e+143 < z < 2.485245629353602e-229 or 9.804480552862454e+180 < z

    1. Initial program 15.3

      \[x \cdot \frac{\frac{y}{z} \cdot t}{t}\]
    2. Initial simplification6.2

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

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

    if 2.485245629353602e-229 < z < 9.804480552862454e+180

    1. Initial program 13.8

      \[x \cdot \frac{\frac{y}{z} \cdot t}{t}\]
    2. Initial simplification4.9

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \le -6.961428734902451 \cdot 10^{+143}:\\ \;\;\;\;\frac{x}{\frac{z}{y}}\\ \mathbf{elif}\;z \le 2.485245629353602 \cdot 10^{-229}:\\ \;\;\;\;\frac{x \cdot y}{z}\\ \mathbf{elif}\;z \le 9.804480552862454 \cdot 10^{+180}:\\ \;\;\;\;\frac{y}{\frac{z}{x}}\\ \mathbf{else}:\\ \;\;\;\;\frac{x \cdot y}{z}\\ \end{array}\]

Runtime

Time bar (total: 7.1s)Debug logProfile

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