Average Error: 14.1 → 5.7
Time: 7.3s
Precision: 64
Internal Precision: 128
\[x \cdot \frac{\frac{y}{z} \cdot t}{t}\]
\[\begin{array}{l} \mathbf{if}\;y \le 2.795447396557503 \cdot 10^{-139}:\\ \;\;\;\;\frac{x}{\frac{z}{y}}\\ \mathbf{elif}\;y \le 1.7414645107885116 \cdot 10^{+196}:\\ \;\;\;\;\frac{x \cdot y}{z}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{\frac{z}{y}}\\ \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 y < 2.795447396557503e-139 or 1.7414645107885116e+196 < y

    1. Initial program 14.5

      \[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.0

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

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

    if 2.795447396557503e-139 < y < 1.7414645107885116e+196

    1. Initial program 12.8

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \le 2.795447396557503 \cdot 10^{-139}:\\ \;\;\;\;\frac{x}{\frac{z}{y}}\\ \mathbf{elif}\;y \le 1.7414645107885116 \cdot 10^{+196}:\\ \;\;\;\;\frac{x \cdot y}{z}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{\frac{z}{y}}\\ \end{array}\]

Runtime

Time bar (total: 7.3s)Debug logProfile

BaselineHerbieOracleSpan%
Regimes5.85.70.05.82%
herbie shell --seed 2018354 +o rules:numerics
(FPCore (x y z t)
  :name "Graphics.Rendering.Chart.Backend.Diagrams:calcFontMetrics from Chart-diagrams-1.5.1"
  (* x (/ (* (/ y z) t) t)))