?

Average Error: 0.0 → 0.0
Time: 7.7s
Precision: binary64
Cost: 320

?

$\left(-5 \cdot 10^{+37} \leq a \land a \leq 0\right) \land \left(0 \leq b \land b \leq 4 \cdot 10^{+38}\right)$
$\frac{1}{a - b}$
$\frac{1}{a - b}$
(FPCore (a b) :precision binary64 (/ 1.0 (- a b)))
(FPCore (a b) :precision binary64 (/ 1.0 (- a b)))
double code(double a, double b) {
return 1.0 / (a - b);
}

double code(double a, double b) {
return 1.0 / (a - b);
}

real(8) function code(a, b)
real(8), intent (in) :: a
real(8), intent (in) :: b
code = 1.0d0 / (a - b)
end function

real(8) function code(a, b)
real(8), intent (in) :: a
real(8), intent (in) :: b
code = 1.0d0 / (a - b)
end function

public static double code(double a, double b) {
return 1.0 / (a - b);
}

public static double code(double a, double b) {
return 1.0 / (a - b);
}

def code(a, b):
return 1.0 / (a - b)

def code(a, b):
return 1.0 / (a - b)

function code(a, b)
return Float64(1.0 / Float64(a - b))
end

function code(a, b)
return Float64(1.0 / Float64(a - b))
end

function tmp = code(a, b)
tmp = 1.0 / (a - b);
end

function tmp = code(a, b)
tmp = 1.0 / (a - b);
end

code[a_, b_] := N[(1.0 / N[(a - b), $MachinePrecision]),$MachinePrecision]

code[a_, b_] := N[(1.0 / N[(a - b), $MachinePrecision]),$MachinePrecision]

\frac{1}{a - b}

\frac{1}{a - b}


Try it out?

Results

 In Out
Enter valid numbers for all inputs

Derivation?

1. Initial program 0.0

$\frac{1}{a - b}$
2. Final simplification0.0

$\leadsto \frac{1}{a - b}$

Alternatives

Alternative 1
Error17.9
Cost324
$\begin{array}{l} \mathbf{if}\;b \leq 2.7 \cdot 10^{-198}:\\ \;\;\;\;\frac{1}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{-1}{b}\\ \end{array}$
Alternative 2
Error31.5
Cost192
$\frac{-1}{b}$

Reproduce?

herbie shell --seed 1
(FPCore (a b)
:name "1/(a-b)"
:precision binary64
:pre (and (and (<= -5e+37 a) (<= a 0.0)) (and (<= 0.0 b) (<= b 4e+38)))
(/ 1.0 (- a b)))