Average Error: 14.1 → 0.8
Time: 8.3s
Precision: 64
Internal Precision: 128
\[x \cdot \frac{\frac{y}{z} \cdot t}{t}\]
\[\begin{array}{l} \mathbf{if}\;\frac{y}{z} \le -1.395511087623302 \cdot 10^{+121}:\\ \;\;\;\;\frac{x \cdot y}{z}\\ \mathbf{elif}\;\frac{y}{z} \le -5.347089676345625 \cdot 10^{-190}:\\ \;\;\;\;\frac{x}{\frac{z}{y}}\\ \mathbf{elif}\;\frac{y}{z} \le 2.5401891115282 \cdot 10^{-319}:\\ \;\;\;\;\frac{1}{z} \cdot \left(x \cdot y\right)\\ \mathbf{elif}\;\frac{y}{z} \le 2.4356045616342145 \cdot 10^{+226}:\\ \;\;\;\;\frac{x}{\frac{z}{y}}\\ \mathbf{else}:\\ \;\;\;\;\frac{x \cdot y}{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) < -1.395511087623302e+121 or 2.4356045616342145e+226 < (/ y z)

    1. Initial program 33.5

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

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

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

    if -1.395511087623302e+121 < (/ y z) < -5.347089676345625e-190 or 2.5401891115282e-319 < (/ y z) < 2.4356045616342145e+226

    1. Initial program 8.3

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

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

      \[\leadsto \color{blue}{\frac{x \cdot y}{z}}\]
    5. Using strategy rm
    6. Applied associate-/l*0.4

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

    if -5.347089676345625e-190 < (/ y z) < 2.5401891115282e-319

    1. Initial program 17.4

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

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

      \[\leadsto x \cdot \color{blue}{\left(y \cdot \frac{1}{z}\right)}\]
    5. Applied associate-*r*0.7

      \[\leadsto \color{blue}{\left(x \cdot y\right) \cdot \frac{1}{z}}\]
  3. Recombined 3 regimes into one program.
  4. Final simplification0.8

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{y}{z} \le -1.395511087623302 \cdot 10^{+121}:\\ \;\;\;\;\frac{x \cdot y}{z}\\ \mathbf{elif}\;\frac{y}{z} \le -5.347089676345625 \cdot 10^{-190}:\\ \;\;\;\;\frac{x}{\frac{z}{y}}\\ \mathbf{elif}\;\frac{y}{z} \le 2.5401891115282 \cdot 10^{-319}:\\ \;\;\;\;\frac{1}{z} \cdot \left(x \cdot y\right)\\ \mathbf{elif}\;\frac{y}{z} \le 2.4356045616342145 \cdot 10^{+226}:\\ \;\;\;\;\frac{x}{\frac{z}{y}}\\ \mathbf{else}:\\ \;\;\;\;\frac{x \cdot y}{z}\\ \end{array}\]

Reproduce

herbie shell --seed 2019089 
(FPCore (x y z t)
  :name "Graphics.Rendering.Chart.Backend.Diagrams:calcFontMetrics from Chart-diagrams-1.5.1"
  (* x (/ (* (/ y z) t) t)))