Average Error: 15.1 → 6.4
Time: 6.8s
Precision: 64
Internal Precision: 128
\[x \cdot \frac{\frac{y}{z} \cdot t}{t}\]
\[\begin{array}{l} \mathbf{if}\;x \le -4.600074853300428 \cdot 10^{-166}:\\ \;\;\;\;\frac{x}{\frac{z}{y}}\\ \mathbf{elif}\;x \le 6.962439330072715 \cdot 10^{-245}:\\ \;\;\;\;\frac{y \cdot x}{z}\\ \mathbf{elif}\;x \le 4.061613913461472 \cdot 10^{-168}:\\ \;\;\;\;\frac{x}{\frac{z}{y}}\\ \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

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Split input into 2 regimes
  2. if x < -4.600074853300428e-166 or 6.962439330072715e-245 < x < 4.061613913461472e-168

    1. Initial program 16.1

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

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

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

      \[\leadsto \color{blue}{\left(y \cdot x\right) \cdot \frac{1}{z}}\]
    7. Using strategy rm
    8. Applied pow16.0

      \[\leadsto \left(y \cdot x\right) \cdot \color{blue}{{\left(\frac{1}{z}\right)}^{1}}\]
    9. Applied pow16.0

      \[\leadsto \color{blue}{{\left(y \cdot x\right)}^{1}} \cdot {\left(\frac{1}{z}\right)}^{1}\]
    10. Applied pow-prod-down6.0

      \[\leadsto \color{blue}{{\left(\left(y \cdot x\right) \cdot \frac{1}{z}\right)}^{1}}\]
    11. Simplified6.8

      \[\leadsto {\color{blue}{\left(\frac{x}{\frac{z}{y}}\right)}}^{1}\]

    if -4.600074853300428e-166 < x < 6.962439330072715e-245 or 4.061613913461472e-168 < x

    1. Initial program 14.4

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \le -4.600074853300428 \cdot 10^{-166}:\\ \;\;\;\;\frac{x}{\frac{z}{y}}\\ \mathbf{elif}\;x \le 6.962439330072715 \cdot 10^{-245}:\\ \;\;\;\;\frac{y \cdot x}{z}\\ \mathbf{elif}\;x \le 4.061613913461472 \cdot 10^{-168}:\\ \;\;\;\;\frac{x}{\frac{z}{y}}\\ \mathbf{else}:\\ \;\;\;\;\frac{y \cdot x}{z}\\ \end{array}\]

Runtime

Time bar (total: 6.8s)Debug logProfile

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