Average Error: 14.5 → 6.1
Time: 43.4s
Precision: 64
Internal Precision: 384
\[x \cdot \frac{\frac{y}{z} \cdot t}{t}\]
\[\begin{array}{l} \mathbf{if}\;y \le -2.58053419571785 \cdot 10^{+22}:\\ \;\;\;\;\frac{y \cdot x}{z}\\ \mathbf{if}\;y \le 9.019566302352389 \cdot 10^{-119}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{if}\;y \le 5.127878477553548 \cdot 10^{+249}:\\ \;\;\;\;\frac{y \cdot x}{z}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{z} \cdot 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 4 regimes
  2. if y < -2.58053419571785e+22

    1. Initial program 17.5

      \[x \cdot \frac{\frac{y}{z} \cdot t}{t}\]
    2. Applied simplify7.4

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

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

    if -2.58053419571785e+22 < y < 9.019566302352389e-119

    1. Initial program 12.9

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

      \[\leadsto \color{blue}{\frac{x}{\frac{z}{y}}}\]
    3. Using strategy rm
    4. Applied div-inv6.3

      \[\leadsto \color{blue}{x \cdot \frac{1}{\frac{z}{y}}}\]
    5. Applied simplify5.7

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

    if 9.019566302352389e-119 < y < 5.127878477553548e+249

    1. Initial program 14.3

      \[x \cdot \frac{\frac{y}{z} \cdot t}{t}\]
    2. Applied simplify4.5

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

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

    if 5.127878477553548e+249 < y

    1. Initial program 24.4

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

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

      \[\leadsto \color{blue}{\frac{x}{z} \cdot y}\]
  3. Recombined 4 regimes into one program.
  4. Removed slow pow expressions.

Runtime

Time bar (total: 43.4s)Debug log

herbie shell --seed '#(1567391828 2030694642 2833800258 828025724 3004380912 3532991858)' +o setup:early-exit +o reduce:binary-search
(FPCore (x y z t)
  :name "Graphics.Rendering.Chart.Backend.Diagrams:calcFontMetrics from Chart-diagrams-1.5.1"
  (* x (/ (* (/ y z) t) t)))