Average Error: 14.1 → 0.2
Time: 17.0s
Precision: 64
Internal Precision: 384
\[x \cdot \frac{\frac{y}{z} \cdot t}{t}\]
\[\begin{array}{l} \mathbf{if}\;y \cdot x = -\infty:\\ \;\;\;\;\frac{1}{\frac{\frac{z}{y}}{x}}\\ \mathbf{if}\;y \cdot x \le -5.06365455129564 \cdot 10^{-274}:\\ \;\;\;\;\frac{y \cdot x}{z}\\ \mathbf{if}\;y \cdot x \le 1.53082369955485 \cdot 10^{-305}:\\ \;\;\;\;\log_* (1 + (e^{\frac{y}{\frac{z}{x}}} - 1)^*)\\ \mathbf{if}\;y \cdot x \le 1.973061321617615 \cdot 10^{+200}:\\ \;\;\;\;\frac{y \cdot x}{z}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\frac{\frac{z}{y}}{x}}\\ \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) or 1.973061321617615e+200 < (* y x)

    1. Initial program 9.1

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

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

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

    if (* y x) < -5.06365455129564e-274 or 1.53082369955485e-305 < (* y x) < 1.973061321617615e+200

    1. Initial program 17.2

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

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

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

    if -5.06365455129564e-274 < (* y x) < 1.53082369955485e-305

    1. Initial program 2.9

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

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

      \[\leadsto \frac{x}{\color{blue}{z \cdot \frac{1}{y}}}\]
    5. Applied associate-/r*0.1

      \[\leadsto \color{blue}{\frac{\frac{x}{z}}{\frac{1}{y}}}\]
    6. Using strategy rm
    7. Applied log1p-expm1-u0.2

      \[\leadsto \color{blue}{\log_* (1 + (e^{\frac{\frac{x}{z}}{\frac{1}{y}}} - 1)^*)}\]
    8. Applied simplify0.2

      \[\leadsto \log_* (1 + \color{blue}{(e^{\frac{y}{\frac{z}{x}}} - 1)^*})\]
  3. Recombined 3 regimes into one program.

Runtime

Time bar (total: 17.0s)Debug logProfile

herbie shell --seed '#(1070258749 1877548225 2229079127 1588002776 3179087814 1886870650)' +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)))