Average Error: 14.0 → 1.0
Time: 9.5s
Precision: 64
Internal Precision: 128
\[x \cdot \frac{\frac{y}{z} \cdot t}{t}\]
\[\begin{array}{l} \mathbf{if}\;\frac{y}{z} \le -6.469257618171391 \cdot 10^{+239}:\\ \;\;\;\;\frac{x \cdot y}{z}\\ \mathbf{elif}\;\frac{y}{z} \le -8.582193873926915 \cdot 10^{-68}:\\ \;\;\;\;\frac{x}{\frac{z}{y}}\\ \mathbf{elif}\;\frac{y}{z} \le 2.2241673893182337 \cdot 10^{-284}:\\ \;\;\;\;\frac{x \cdot y}{z}\\ \mathbf{elif}\;\frac{y}{z} \le 6.542849579947867 \cdot 10^{+211}:\\ \;\;\;\;\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) < -6.469257618171391e+239 or -8.582193873926915e-68 < (/ y z) < 2.2241673893182337e-284

    1. Initial program 19.0

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

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

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

    if -6.469257618171391e+239 < (/ y z) < -8.582193873926915e-68 or 2.2241673893182337e-284 < (/ y z) < 6.542849579947867e+211

    1. Initial program 8.1

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

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

      \[\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 6.542849579947867e+211 < (/ y z)

    1. Initial program 38.8

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{y}{z} \le -6.469257618171391 \cdot 10^{+239}:\\ \;\;\;\;\frac{x \cdot y}{z}\\ \mathbf{elif}\;\frac{y}{z} \le -8.582193873926915 \cdot 10^{-68}:\\ \;\;\;\;\frac{x}{\frac{z}{y}}\\ \mathbf{elif}\;\frac{y}{z} \le 2.2241673893182337 \cdot 10^{-284}:\\ \;\;\;\;\frac{x \cdot y}{z}\\ \mathbf{elif}\;\frac{y}{z} \le 6.542849579947867 \cdot 10^{+211}:\\ \;\;\;\;\frac{x}{\frac{z}{y}}\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{x}{z}\\ \end{array}\]

Runtime

Time bar (total: 9.5s)Debug logProfile

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