Average Error: 14.0 → 2.5
Time: 6.2s
Precision: 64
Internal Precision: 576
\[x \cdot \frac{\frac{y}{z} \cdot t}{t}\]
\[\begin{array}{l} \mathbf{if}\;\frac{\frac{y}{z} \cdot t}{t} \le -4.783215536162634 \cdot 10^{+296}:\\ \;\;\;\;\frac{y \cdot x}{z}\\ \mathbf{elif}\;\frac{\frac{y}{z} \cdot t}{t} \le -2.0989122530775214 \cdot 10^{-155}:\\ \;\;\;\;x \cdot \frac{\frac{y}{z} \cdot t}{t}\\ \mathbf{elif}\;\frac{\frac{y}{z} \cdot t}{t} \le 5.910443916251389 \cdot 10^{-238}:\\ \;\;\;\;\frac{y \cdot x}{z}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\frac{\frac{z}{y}}{x}}\\ \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) t) t) < -4.783215536162634e+296 or -2.0989122530775214e-155 < (/ (* (/ y z) t) t) < 5.910443916251389e-238

    1. Initial program 26.7

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

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

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

    if -4.783215536162634e+296 < (/ (* (/ y z) t) t) < -2.0989122530775214e-155

    1. Initial program 0.5

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

    if 5.910443916251389e-238 < (/ (* (/ y z) t) t)

    1. Initial program 10.1

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{\frac{y}{z} \cdot t}{t} \le -4.783215536162634 \cdot 10^{+296}:\\ \;\;\;\;\frac{y \cdot x}{z}\\ \mathbf{elif}\;\frac{\frac{y}{z} \cdot t}{t} \le -2.0989122530775214 \cdot 10^{-155}:\\ \;\;\;\;x \cdot \frac{\frac{y}{z} \cdot t}{t}\\ \mathbf{elif}\;\frac{\frac{y}{z} \cdot t}{t} \le 5.910443916251389 \cdot 10^{-238}:\\ \;\;\;\;\frac{y \cdot x}{z}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\frac{\frac{z}{y}}{x}}\\ \end{array}\]

Runtime

Time bar (total: 6.2s)Debug logProfile

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