Average Error: 10.4 → 2.2
Time: 8.2s
Precision: 64
Internal Precision: 576
\[\frac{d}{a \cdot d - b \cdot c}\]
\[\begin{array}{l} \mathbf{if}\;d \le -4.674245232507722 \cdot 10^{-77} \lor \neg \left(d \le 5.351892082359565 \cdot 10^{-170}\right):\\ \;\;\;\;\frac{1}{a - \frac{b}{\frac{d}{c}}}\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{a \cdot d - b \cdot c}\\ \end{array}\]

Error

Bits error versus d

Bits error versus a

Bits error versus b

Bits error versus c

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Split input into 2 regimes
  2. if d < -4.674245232507722e-77 or 5.351892082359565e-170 < d

    1. Initial program 13.7

      \[\frac{d}{a \cdot d - b \cdot c}\]
    2. Initial simplification13.7

      \[\leadsto \frac{d}{d \cdot a - b \cdot c}\]
    3. Using strategy rm
    4. Applied clear-num13.8

      \[\leadsto \color{blue}{\frac{1}{\frac{d \cdot a - b \cdot c}{d}}}\]
    5. Using strategy rm
    6. Applied *-un-lft-identity13.8

      \[\leadsto \frac{1}{\color{blue}{1 \cdot \frac{d \cdot a - b \cdot c}{d}}}\]
    7. Applied associate-/r*13.8

      \[\leadsto \color{blue}{\frac{\frac{1}{1}}{\frac{d \cdot a - b \cdot c}{d}}}\]
    8. Simplified2.0

      \[\leadsto \frac{\frac{1}{1}}{\color{blue}{a - \frac{b}{\frac{d}{c}}}}\]

    if -4.674245232507722e-77 < d < 5.351892082359565e-170

    1. Initial program 2.6

      \[\frac{d}{a \cdot d - b \cdot c}\]
    2. Initial simplification2.6

      \[\leadsto \frac{d}{d \cdot a - b \cdot c}\]
  3. Recombined 2 regimes into one program.
  4. Final simplification2.2

    \[\leadsto \begin{array}{l} \mathbf{if}\;d \le -4.674245232507722 \cdot 10^{-77} \lor \neg \left(d \le 5.351892082359565 \cdot 10^{-170}\right):\\ \;\;\;\;\frac{1}{a - \frac{b}{\frac{d}{c}}}\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{a \cdot d - b \cdot c}\\ \end{array}\]

Runtime

Time bar (total: 8.2s)Debug log

herbie shell --seed '#(2775764126 3555076145 3898259844 1891440260 2599947619 1948460636)' 
(FPCore (d a b c)
  :name "d / (a * d - b * c)"
  (/ d (- (* a d) (* b c))))