Average Error: 14.5 → 0.9
Time: 8.4s
Precision: 64
Internal Precision: 576
\[x \cdot \frac{\frac{y}{z} \cdot t}{t}\]
\[\begin{array}{l} \mathbf{if}\;\frac{y}{z} = -\infty:\\ \;\;\;\;\frac{y}{\frac{z}{x}}\\ \mathbf{elif}\;\frac{y}{z} \le -2.1698274862388855 \cdot 10^{-243}:\\ \;\;\;\;\frac{\frac{y}{z}}{\frac{1}{x}}\\ \mathbf{elif}\;\frac{y}{z} \le 2.5158129348404035 \cdot 10^{-302}:\\ \;\;\;\;\frac{x \cdot y}{z}\\ \mathbf{elif}\;\frac{y}{z} \le 9.254273070241212 \cdot 10^{+63}:\\ \;\;\;\;\frac{\frac{y}{z}}{\frac{1}{x}}\\ \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 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.3

      \[\leadsto y \cdot \frac{x}{z}\]
    3. Using strategy rm
    4. Applied associate-*r/0.3

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

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

    if -inf.0 < (/ y z) < -2.1698274862388855e-243 or 2.5158129348404035e-302 < (/ y z) < 9.254273070241212e+63

    1. Initial program 9.4

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

      \[\leadsto y \cdot \frac{x}{z}\]
    3. Using strategy rm
    4. Applied associate-*r/8.7

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

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

      \[\leadsto \frac{y}{\color{blue}{z \cdot \frac{1}{x}}}\]
    9. Applied associate-/r*0.3

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

    if -2.1698274862388855e-243 < (/ y z) < 2.5158129348404035e-302

    1. Initial program 19.9

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

      \[\leadsto y \cdot \frac{x}{z}\]
    3. Using strategy rm
    4. Applied associate-*r/0.2

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

    if 9.254273070241212e+63 < (/ y z)

    1. Initial program 23.3

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{y}{z} = -\infty:\\ \;\;\;\;\frac{y}{\frac{z}{x}}\\ \mathbf{elif}\;\frac{y}{z} \le -2.1698274862388855 \cdot 10^{-243}:\\ \;\;\;\;\frac{\frac{y}{z}}{\frac{1}{x}}\\ \mathbf{elif}\;\frac{y}{z} \le 2.5158129348404035 \cdot 10^{-302}:\\ \;\;\;\;\frac{x \cdot y}{z}\\ \mathbf{elif}\;\frac{y}{z} \le 9.254273070241212 \cdot 10^{+63}:\\ \;\;\;\;\frac{\frac{y}{z}}{\frac{1}{x}}\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{x}{z}\\ \end{array}\]

Runtime

Time bar (total: 8.4s)Debug logProfile

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