Average Error: 14.1 → 1.6
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} \le -1.3809341348223062 \cdot 10^{+256}:\\ \;\;\;\;y \cdot \frac{x}{z}\\ \mathbf{elif}\;\frac{y}{z} \le -3.808927552847435 \cdot 10^{-241}:\\ \;\;\;\;\frac{y}{z} \cdot x\\ \mathbf{elif}\;\frac{y}{z} \le 1.3275543903754 \cdot 10^{-320}:\\ \;\;\;\;y \cdot \frac{x}{z}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{\frac{z}{y}}\\ \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) < -1.3809341348223062e+256 or -3.808927552847435e-241 < (/ y z) < 1.3275543903754e-320

    1. Initial program 23.1

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

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

    if -1.3809341348223062e+256 < (/ y z) < -3.808927552847435e-241

    1. Initial program 9.2

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

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

      \[\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 inf 0.2

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

    if 1.3275543903754e-320 < (/ y z)

    1. Initial program 13.4

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{y}{z} \le -1.3809341348223062 \cdot 10^{+256}:\\ \;\;\;\;y \cdot \frac{x}{z}\\ \mathbf{elif}\;\frac{y}{z} \le -3.808927552847435 \cdot 10^{-241}:\\ \;\;\;\;\frac{y}{z} \cdot x\\ \mathbf{elif}\;\frac{y}{z} \le 1.3275543903754 \cdot 10^{-320}:\\ \;\;\;\;y \cdot \frac{x}{z}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{\frac{z}{y}}\\ \end{array}\]

Runtime

Time bar (total: 6.5s)Debug logProfile

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