Average Error: 14.7 → 1.8
Time: 5.5s
Precision: 64
Internal Precision: 320
\[x \cdot \frac{\frac{y}{z} \cdot t}{t}\]
\[\begin{array}{l} \mathbf{if}\;\frac{y}{z} \le -2.2261197785509625 \cdot 10^{-216}:\\ \;\;\;\;\frac{x}{\frac{z}{y}}\\ \mathbf{elif}\;\frac{y}{z} \le 4.235716652121138 \cdot 10^{-281}:\\ \;\;\;\;\frac{1}{\frac{\frac{z}{x}}{y}}\\ \mathbf{elif}\;\frac{y}{z} \le 7.429887155118814 \cdot 10^{+283}:\\ \;\;\;\;\frac{x}{\frac{z}{y}}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\frac{z}{x \cdot 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) < -2.2261197785509625e-216 or 4.235716652121138e-281 < (/ y z) < 7.429887155118814e+283

    1. Initial program 12.1

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

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

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

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

    if -2.2261197785509625e-216 < (/ y z) < 4.235716652121138e-281

    1. Initial program 18.5

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

      \[\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 clear-num1.0

      \[\leadsto \color{blue}{\frac{1}{\frac{z}{x \cdot y}}}\]
    6. Using strategy rm
    7. Applied associate-/r*1.0

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

    if 7.429887155118814e+283 < (/ y z)

    1. Initial program 53.4

      \[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.2

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{y}{z} \le -2.2261197785509625 \cdot 10^{-216}:\\ \;\;\;\;\frac{x}{\frac{z}{y}}\\ \mathbf{elif}\;\frac{y}{z} \le 4.235716652121138 \cdot 10^{-281}:\\ \;\;\;\;\frac{1}{\frac{\frac{z}{x}}{y}}\\ \mathbf{elif}\;\frac{y}{z} \le 7.429887155118814 \cdot 10^{+283}:\\ \;\;\;\;\frac{x}{\frac{z}{y}}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\frac{z}{x \cdot y}}\\ \end{array}\]

Runtime

Time bar (total: 5.5s)Debug logProfile

BaselineHerbieOracleSpan%
Regimes6.21.80.06.271.5%
herbie shell --seed 2018339 +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)))