Average Error: 10.4 → 0.8
Time: 22.1s
Precision: 64
Internal Precision: 576
\[\frac{a}{a \cdot d - b \cdot c}\]
\[\begin{array}{l} \mathbf{if}\;\frac{a}{{\left(a \cdot d\right)}^{3} - {\left(b \cdot c\right)}^{3}} \cdot \left(\left(a \cdot d\right) \cdot \left(a \cdot d\right) + \left(\left(b \cdot c\right) \cdot \left(b \cdot c\right) + \left(a \cdot d\right) \cdot \left(b \cdot c\right)\right)\right) \le 5.332016508109729 \cdot 10^{+235}:\\ \;\;\;\;\frac{a}{a \cdot d - b \cdot c}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{d - \frac{c}{a} \cdot b}\\ \end{array}\]

Error

Bits error versus a

Bits error versus d

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 (* (/ a (- (pow (* a d) 3) (pow (* b c) 3))) (+ (* (* a d) (* a d)) (+ (* (* b c) (* b c)) (* (* a d) (* b c))))) < 5.332016508109729e+235

    1. Initial program 0.2

      \[\frac{a}{a \cdot d - b \cdot c}\]

    if 5.332016508109729e+235 < (* (/ a (- (pow (* a d) 3) (pow (* b c) 3))) (+ (* (* a d) (* a d)) (+ (* (* b c) (* b c)) (* (* a d) (* b c)))))

    1. Initial program 17.7

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

      \[\leadsto \color{blue}{\frac{1}{\frac{a \cdot d - b \cdot c}{a}}}\]
    4. Applied simplify5.8

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

      \[\leadsto \color{blue}{\frac{1}{\frac{d - \frac{b \cdot c}{a}}{1}}}\]
    7. Applied simplify1.3

      \[\leadsto \frac{1}{\color{blue}{d - \frac{c}{a} \cdot b}}\]
  3. Recombined 2 regimes into one program.

Runtime

Time bar (total: 22.1s)Debug log

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