Average Error: 14.1 → 0.7
Time: 6.5s
Precision: 64
Internal Precision: 128
\[x \cdot \frac{\frac{y}{z} \cdot t}{t}\]
\[\begin{array}{l} \mathbf{if}\;\frac{y}{z} = -\infty:\\ \;\;\;\;y \cdot \left(\frac{1}{z} \cdot x\right)\\ \mathbf{elif}\;\frac{y}{z} \le -8.044887316823053 \cdot 10^{-181}:\\ \;\;\;\;\frac{y}{z} \cdot x\\ \mathbf{elif}\;\frac{y}{z} \le 1.0906822003746772 \cdot 10^{-251}:\\ \;\;\;\;\frac{x}{z} \cdot y\\ \mathbf{elif}\;\frac{y}{z} \le 1.5151645434563507 \cdot 10^{+112}:\\ \;\;\;\;\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 4 regimes
  2. if (/ y z) < -inf.0

    1. Initial program 60.2

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

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

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

      \[\leadsto \color{blue}{\frac{x}{\frac{z}{y}}}\]
    6. Using strategy rm
    7. Applied div-inv60.2

      \[\leadsto \color{blue}{x \cdot \frac{1}{\frac{z}{y}}}\]
    8. Using strategy rm
    9. Applied associate-/r/60.2

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

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

    if -inf.0 < (/ y z) < -8.044887316823053e-181 or 1.0906822003746772e-251 < (/ y z) < 1.5151645434563507e+112

    1. Initial program 8.7

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

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

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

      \[\leadsto \color{blue}{\frac{x}{\frac{z}{y}}}\]
    6. Using strategy rm
    7. Applied div-inv0.3

      \[\leadsto \color{blue}{x \cdot \frac{1}{\frac{z}{y}}}\]
    8. Taylor expanded around 0 0.2

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

    if -8.044887316823053e-181 < (/ y z) < 1.0906822003746772e-251

    1. Initial program 17.4

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

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

    if 1.5151645434563507e+112 < (/ y z)

    1. Initial program 27.6

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{y}{z} = -\infty:\\ \;\;\;\;y \cdot \left(\frac{1}{z} \cdot x\right)\\ \mathbf{elif}\;\frac{y}{z} \le -8.044887316823053 \cdot 10^{-181}:\\ \;\;\;\;\frac{y}{z} \cdot x\\ \mathbf{elif}\;\frac{y}{z} \le 1.0906822003746772 \cdot 10^{-251}:\\ \;\;\;\;\frac{x}{z} \cdot y\\ \mathbf{elif}\;\frac{y}{z} \le 1.5151645434563507 \cdot 10^{+112}:\\ \;\;\;\;\frac{y}{z} \cdot x\\ \mathbf{else}:\\ \;\;\;\;\frac{x \cdot y}{z}\\ \end{array}\]

Runtime

Time bar (total: 6.5s)Debug logProfile

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