Average Error: 14.5 → 1.5
Time: 35.4s
Precision: 64
Internal Precision: 384
\[x \cdot \frac{\frac{y}{z} \cdot t}{t}\]
\[\begin{array}{l} \mathbf{if}\;\frac{\frac{y}{z} \cdot t}{t} \le -inf.0:\\ \;\;\;\;\frac{x}{z} \cdot y\\ \mathbf{if}\;\frac{\frac{y}{z} \cdot t}{t} \le -2.7505505696020006 \cdot 10^{-105}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{if}\;\frac{\frac{y}{z} \cdot t}{t} \le 2.609628973841185 \cdot 10^{-242}:\\ \;\;\;\;\frac{y \cdot x}{z}\\ \mathbf{if}\;\frac{\frac{y}{z} \cdot t}{t} \le 3.155977372622876 \cdot 10^{+100}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{else}:\\ \;\;\;\;\frac{y \cdot x}{z}\\ \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 z) t) t)

    1. Initial program 60.6

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

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

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

    if (/ (* (/ y z) t) t) < -2.7505505696020006e-105 or 2.609628973841185e-242 < (/ (* (/ y z) t) t) < 3.155977372622876e+100

    1. Initial program 0.5

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

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

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

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

    if -2.7505505696020006e-105 < (/ (* (/ y z) t) t) < 2.609628973841185e-242 or 3.155977372622876e+100 < (/ (* (/ y z) t) t)

    1. Initial program 21.3

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

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

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

Runtime

Time bar (total: 35.4s)Debug logProfile

herbie shell --seed '#(1063185673 2139736501 2393378123 1907444849 1070993796 1007244912)' 
(FPCore (x y z t)
  :name "Graphics.Rendering.Chart.Backend.Diagrams:calcFontMetrics from Chart-diagrams-1.5.1"
  (* x (/ (* (/ y z) t) t)))