Average Error: 14.4 → 5.6
Time: 7.0s
Precision: 64
Internal Precision: 128
\[x \cdot \frac{\frac{y}{z} \cdot t}{t}\]
\[\begin{array}{l} \mathbf{if}\;x \le -8.105841038305899 \cdot 10^{-158}:\\ \;\;\;\;y \cdot \frac{x}{z}\\ \mathbf{elif}\;x \le 2.3812906285427413 \cdot 10^{-303}:\\ \;\;\;\;\left(\frac{1}{z} \cdot y\right) \cdot x\\ \mathbf{elif}\;x \le 2.937605696047127 \cdot 10^{-86}:\\ \;\;\;\;y \cdot \frac{x}{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

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Split input into 3 regimes
  2. if x < -8.105841038305899e-158 or 2.3812906285427413e-303 < x < 2.937605696047127e-86

    1. Initial program 14.1

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

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

    if -8.105841038305899e-158 < x < 2.3812906285427413e-303

    1. Initial program 13.0

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

      \[\leadsto y \cdot \frac{x}{z}\]
    3. Taylor expanded around -inf 7.2

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

      \[\leadsto \color{blue}{\left(x \cdot y\right) \cdot \frac{1}{z}}\]
    6. Using strategy rm
    7. Applied associate-*l*6.3

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

    if 2.937605696047127e-86 < x

    1. Initial program 15.7

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

      \[\leadsto y \cdot \frac{x}{z}\]
    3. Taylor expanded around -inf 5.5

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \le -8.105841038305899 \cdot 10^{-158}:\\ \;\;\;\;y \cdot \frac{x}{z}\\ \mathbf{elif}\;x \le 2.3812906285427413 \cdot 10^{-303}:\\ \;\;\;\;\left(\frac{1}{z} \cdot y\right) \cdot x\\ \mathbf{elif}\;x \le 2.937605696047127 \cdot 10^{-86}:\\ \;\;\;\;y \cdot \frac{x}{z}\\ \mathbf{else}:\\ \;\;\;\;\frac{y \cdot x}{z}\\ \end{array}\]

Runtime

Time bar (total: 7.0s)Debug logProfile

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