Average Error: 14.2 → 5.9
Time: 6.8s
Precision: 64
Internal Precision: 128
\[x \cdot \frac{\frac{y}{z} \cdot t}{t}\]
\[\begin{array}{l} \mathbf{if}\;z \le 1.1654421685057851 \cdot 10^{-173}:\\ \;\;\;\;\frac{x}{\frac{z}{y}}\\ \mathbf{elif}\;z \le 4.446150160347846 \cdot 10^{+226}:\\ \;\;\;\;y \cdot \frac{x}{z}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{\frac{z}{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 2 regimes
  2. if z < 1.1654421685057851e-173 or 4.446150160347846e+226 < z

    1. Initial program 14.7

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

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

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

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

    if 1.1654421685057851e-173 < z < 4.446150160347846e+226

    1. Initial program 13.2

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \le 1.1654421685057851 \cdot 10^{-173}:\\ \;\;\;\;\frac{x}{\frac{z}{y}}\\ \mathbf{elif}\;z \le 4.446150160347846 \cdot 10^{+226}:\\ \;\;\;\;y \cdot \frac{x}{z}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{\frac{z}{y}}\\ \end{array}\]

Runtime

Time bar (total: 6.8s)Debug logProfile

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