Average Error: 14.2 → 0.2
Time: 6.5s
Precision: 64
Internal Precision: 576
\[x \cdot \frac{\frac{y}{z} \cdot t}{t}\]
\[\begin{array}{l} \mathbf{if}\;\frac{y}{z} \le -2.63516773260367 \cdot 10^{+206}:\\ \;\;\;\;\frac{x \cdot y}{z}\\ \mathbf{elif}\;\frac{y}{z} \le -5.201395448389169 \cdot 10^{-234}:\\ \;\;\;\;\frac{x}{\frac{z}{y}}\\ \mathbf{elif}\;\frac{y}{z} \le 6.499548147314372 \cdot 10^{-261}:\\ \;\;\;\;\frac{x \cdot y}{z}\\ \mathbf{elif}\;\frac{y}{z} \le 2.319706950878206 \cdot 10^{+228}:\\ \;\;\;\;\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) < -2.63516773260367e+206 or -5.201395448389169e-234 < (/ y z) < 6.499548147314372e-261

    1. Initial program 22.9

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

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

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

    if -2.63516773260367e+206 < (/ y z) < -5.201395448389169e-234 or 6.499548147314372e-261 < (/ y z) < 2.319706950878206e+228

    1. Initial program 8.4

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

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

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

    if 2.319706950878206e+228 < (/ y z)

    1. Initial program 44.6

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{y}{z} \le -2.63516773260367 \cdot 10^{+206}:\\ \;\;\;\;\frac{x \cdot y}{z}\\ \mathbf{elif}\;\frac{y}{z} \le -5.201395448389169 \cdot 10^{-234}:\\ \;\;\;\;\frac{x}{\frac{z}{y}}\\ \mathbf{elif}\;\frac{y}{z} \le 6.499548147314372 \cdot 10^{-261}:\\ \;\;\;\;\frac{x \cdot y}{z}\\ \mathbf{elif}\;\frac{y}{z} \le 2.319706950878206 \cdot 10^{+228}:\\ \;\;\;\;\frac{x}{\frac{z}{y}}\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{x}{z}\\ \end{array}\]

Runtime

Time bar (total: 6.5s)Debug logProfile

herbie shell --seed 2018250 +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)))