Average Error: 13.8 → 1.0
Time: 4.6s
Precision: 64
Internal Precision: 128
\[x \cdot \frac{\frac{y}{z} \cdot t}{t}\]
\[\begin{array}{l} \mathbf{if}\;\frac{y}{z} \le -3.7720787671774744 \cdot 10^{+271}:\\ \;\;\;\;\frac{1}{\frac{\frac{z}{x}}{y}}\\ \mathbf{elif}\;\frac{y}{z} \le -2.1065892102531793 \cdot 10^{-92}:\\ \;\;\;\;\frac{x}{\frac{z}{y}}\\ \mathbf{elif}\;\frac{y}{z} \le 1.6063376693352102 \cdot 10^{-257}:\\ \;\;\;\;\frac{y \cdot x}{z}\\ \mathbf{elif}\;\frac{y}{z} \le 2.786568551560321 \cdot 10^{+145}:\\ \;\;\;\;\frac{x}{\frac{z}{y}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{1}{z}}{\frac{1}{y \cdot 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 4 regimes
  2. if (/ y z) < -3.7720787671774744e+271

    1. Initial program 51.5

      \[x \cdot \frac{\frac{y}{z} \cdot t}{t}\]
    2. Simplified42.0

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

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

      \[\leadsto \color{blue}{\frac{1}{\frac{z}{x \cdot y}}}\]
    7. Using strategy rm
    8. Applied associate-/r*0.4

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

    if -3.7720787671774744e+271 < (/ y z) < -2.1065892102531793e-92 or 1.6063376693352102e-257 < (/ y z) < 2.786568551560321e+145

    1. Initial program 7.8

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

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

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

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

    if -2.1065892102531793e-92 < (/ y z) < 1.6063376693352102e-257

    1. Initial program 15.3

      \[x \cdot \frac{\frac{y}{z} \cdot t}{t}\]
    2. Simplified8.7

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

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

    if 2.786568551560321e+145 < (/ y z)

    1. Initial program 31.5

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

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

      \[\leadsto \color{blue}{\frac{x \cdot y}{z}}\]
    5. Using strategy rm
    6. Applied clear-num2.6

      \[\leadsto \color{blue}{\frac{1}{\frac{z}{x \cdot y}}}\]
    7. Using strategy rm
    8. Applied div-inv3.1

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

      \[\leadsto \color{blue}{\frac{\frac{1}{z}}{\frac{1}{x \cdot y}}}\]
  3. Recombined 4 regimes into one program.
  4. Final simplification1.0

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{y}{z} \le -3.7720787671774744 \cdot 10^{+271}:\\ \;\;\;\;\frac{1}{\frac{\frac{z}{x}}{y}}\\ \mathbf{elif}\;\frac{y}{z} \le -2.1065892102531793 \cdot 10^{-92}:\\ \;\;\;\;\frac{x}{\frac{z}{y}}\\ \mathbf{elif}\;\frac{y}{z} \le 1.6063376693352102 \cdot 10^{-257}:\\ \;\;\;\;\frac{y \cdot x}{z}\\ \mathbf{elif}\;\frac{y}{z} \le 2.786568551560321 \cdot 10^{+145}:\\ \;\;\;\;\frac{x}{\frac{z}{y}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{1}{z}}{\frac{1}{y \cdot x}}\\ \end{array}\]

Reproduce

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