Average Error: 14.6 → 1.8
Time: 6.3s
Precision: 64
Internal Precision: 128
\[x \cdot \frac{\frac{y}{z} \cdot t}{t}\]
\[\begin{array}{l} \mathbf{if}\;\frac{y}{z} \le -3.358999357469415 \cdot 10^{+240}:\\ \;\;\;\;y \cdot \frac{x}{z}\\ \mathbf{elif}\;\frac{y}{z} \le -7.704258297746231 \cdot 10^{-13}:\\ \;\;\;\;\frac{x}{\frac{z}{y}}\\ \mathbf{elif}\;\frac{y}{z} \le 1.027940309737743 \cdot 10^{-309}:\\ \;\;\;\;\frac{y}{\frac{z}{x}}\\ \mathbf{elif}\;\frac{y}{z} \le 3.6376431378973445 \cdot 10^{+191}:\\ \;\;\;\;\frac{x}{\frac{z}{y}}\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{x}{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 (/ y z) < -3.358999357469415e+240 or 3.6376431378973445e+191 < (/ y z)

    1. Initial program 41.4

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

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

    if -3.358999357469415e+240 < (/ y z) < -7.704258297746231e-13 or 1.027940309737743e-309 < (/ y z) < 3.6376431378973445e+191

    1. Initial program 9.6

      \[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 associate-/l*0.3

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

    if -7.704258297746231e-13 < (/ y z) < 1.027940309737743e-309

    1. Initial program 13.9

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{y}{z} \le -3.358999357469415 \cdot 10^{+240}:\\ \;\;\;\;y \cdot \frac{x}{z}\\ \mathbf{elif}\;\frac{y}{z} \le -7.704258297746231 \cdot 10^{-13}:\\ \;\;\;\;\frac{x}{\frac{z}{y}}\\ \mathbf{elif}\;\frac{y}{z} \le 1.027940309737743 \cdot 10^{-309}:\\ \;\;\;\;\frac{y}{\frac{z}{x}}\\ \mathbf{elif}\;\frac{y}{z} \le 3.6376431378973445 \cdot 10^{+191}:\\ \;\;\;\;\frac{x}{\frac{z}{y}}\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{x}{z}\\ \end{array}\]

Runtime

Time bar (total: 6.3s)Debug logProfile

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