Average Error: 14.2 → 0.7
Time: 10.6s
Precision: 64
Internal Precision: 384
\[x \cdot \frac{\frac{y}{z} \cdot t}{t}\]
\[\begin{array}{l} \mathbf{if}\;y \cdot x \le -8.848462821600082 \cdot 10^{+285}:\\ \;\;\;\;\frac{x}{z} \cdot y\\ \mathbf{if}\;y \cdot x \le -3.3843264108827247 \cdot 10^{-246}:\\ \;\;\;\;\frac{y \cdot x}{z}\\ \mathbf{if}\;y \cdot x \le 1.1669627146910484 \cdot 10^{-213}:\\ \;\;\;\;\frac{x}{z} \cdot y\\ \mathbf{if}\;y \cdot x \le 7.861310228265737 \cdot 10^{+86}:\\ \;\;\;\;\frac{y \cdot x}{z}\\ \mathbf{if}\;y \cdot x \le +\infty:\\ \;\;\;\;\frac{x}{\frac{z}{y}}\\ \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

Derivation

  1. Split input into 3 regimes
  2. if (* y x) < -8.848462821600082e+285 or -3.3843264108827247e-246 < (* y x) < 1.1669627146910484e-213

    1. Initial program 4.1

      \[x \cdot \frac{\frac{y}{z} \cdot t}{t}\]
    2. Applied simplify0.3

      \[\leadsto \color{blue}{\frac{x}{\frac{z}{y}}}\]
    3. Using strategy rm
    4. Applied associate-/r/0.2

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

    if -8.848462821600082e+285 < (* y x) < -3.3843264108827247e-246 or 1.1669627146910484e-213 < (* y x) < 7.861310228265737e+86

    1. Initial program 18.1

      \[x \cdot \frac{\frac{y}{z} \cdot t}{t}\]
    2. Applied simplify8.6

      \[\leadsto \color{blue}{\frac{x}{\frac{z}{y}}}\]
    3. Taylor expanded around 0 0.2

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

    if 7.861310228265737e+86 < (* y x)

    1. Initial program 16.2

      \[x \cdot \frac{\frac{y}{z} \cdot t}{t}\]
    2. Applied simplify3.7

      \[\leadsto \color{blue}{\frac{x}{\frac{z}{y}}}\]
  3. Recombined 3 regimes into one program.

Runtime

Time bar (total: 10.6s)Debug logProfile

herbie shell --seed '#(1070131407 1246090267 3027482374 2150728003 2026520792 2347815650)' 
(FPCore (x y z t)
  :name "Graphics.Rendering.Chart.Backend.Diagrams:calcFontMetrics from Chart-diagrams-1.5.1"
  (* x (/ (* (/ y z) t) t)))