Average Error: 14.2 → 6.0
Time: 7.2s
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. Taylor expanded around 0 7.0

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

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

    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. Taylor expanded around 0 6.4

      \[\leadsto \color{blue}{\frac{x \cdot y}{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. Taylor expanded around 0 5.3

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

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

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

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

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

      \[\leadsto {\color{blue}{\left(\frac{y}{\frac{z}{x}}\right)}}^{1}\]
  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.2s)Debug logProfile

herbie shell --seed 2018256 
(FPCore (x y z t)
  :name "Graphics.Rendering.Chart.Backend.Diagrams:calcFontMetrics from Chart-diagrams-1.5.1"
  (* x (/ (* (/ y z) t) t)))