Average Error: 14.0 → 3.2
Time: 7.2s
Precision: 64
Internal Precision: 128
\[x \cdot \frac{\frac{y}{z} \cdot t}{t}\]
\[\begin{array}{l} \mathbf{if}\;\frac{y}{z} \le 3.694440312892776 \cdot 10^{-257}:\\ \;\;\;\;\frac{x \cdot y}{z}\\ \mathbf{elif}\;\frac{y}{z} \le 1.858683731334887 \cdot 10^{+209}:\\ \;\;\;\;\frac{y}{z} \cdot 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 2 regimes
  2. if (/ y z) < 3.694440312892776e-257 or 1.858683731334887e+209 < (/ y z)

    1. Initial program 17.1

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

      \[\leadsto y \cdot \frac{x}{z}\]
    3. Taylor expanded around -inf 4.7

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

    if 3.694440312892776e-257 < (/ y z) < 1.858683731334887e+209

    1. Initial program 8.1

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

      \[\leadsto y \cdot \frac{x}{z}\]
    3. Taylor expanded around -inf 8.5

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

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

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

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

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

      \[\leadsto {\color{blue}{\left(\frac{y}{\frac{z}{x}}\right)}}^{1}\]
    11. Using strategy rm
    12. Applied associate-/r/0.2

      \[\leadsto {\color{blue}{\left(\frac{y}{z} \cdot x\right)}}^{1}\]
  3. Recombined 2 regimes into one program.
  4. Final simplification3.2

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{y}{z} \le 3.694440312892776 \cdot 10^{-257}:\\ \;\;\;\;\frac{x \cdot y}{z}\\ \mathbf{elif}\;\frac{y}{z} \le 1.858683731334887 \cdot 10^{+209}:\\ \;\;\;\;\frac{y}{z} \cdot x\\ \mathbf{else}:\\ \;\;\;\;\frac{x \cdot y}{z}\\ \end{array}\]

Runtime

Time bar (total: 7.2s)Debug logProfile

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