Average Error: 14.1 → 1.0
Time: 17.9s
Precision: 64
Internal precision: 128
\[x \cdot \frac{\frac{y}{z} \cdot t}{t}\]
\[\begin{array}{l} \mathbf{if}\;\frac{\frac{y}{z} \cdot t}{t} \le -6.4042332376573255 \cdot 10^{+208}:\\ \;\;\;\;\frac{y \cdot x}{z}\\ \mathbf{if}\;\frac{\frac{y}{z} \cdot t}{t} \le -1.2665794875040561 \cdot 10^{-228}:\\ \;\;\;\;\frac{x}{\frac{z}{y}}\\ \mathbf{if}\;\frac{\frac{y}{z} \cdot t}{t} \le -0.0:\\ \;\;\;\;\frac{y \cdot x}{z}\\ \mathbf{if}\;\frac{\frac{y}{z} \cdot t}{t} \le 8.240287997287591 \cdot 10^{+264}:\\ \;\;\;\;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) < -6.4042332376573255e+208 or -1.2665794875040561e-228 < (/ (* (/ y z) t) t) < -0.0 or 8.240287997287591e+264 < (/ (* (/ y z) t) t)

    1. Initial program 34.3

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

      \[\leadsto \color{blue}{\frac{x}{\frac{z}{y}}}\]
    3. Applied taylor 1.9

      \[\leadsto \frac{y \cdot x}{z}\]
    4. Taylor expanded around 0 1.9

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

    if -6.4042332376573255e+208 < (/ (* (/ y z) t) t) < -1.2665794875040561e-228

    1. Initial program 0.5

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

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

    if -0.0 < (/ (* (/ y z) t) t) < 8.240287997287591e+264

    1. Initial program 0.7

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

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

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

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

Runtime

Time bar (total: 17.9s) Debug log

Please include this information when filing a bug report:

herbie --seed '#(1783572468 3863613768 3512785497 430809791 1767835035 1415167301)'
(FPCore (x y z t)
  :name "Graphics.Rendering.Chart.Backend.Diagrams:calcFontMetrics from Chart-diagrams-1.5.1"
  (* x (/ (* (/ y z) t) t)))