?

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

?

$\left(-1000000000 \leq b \land b \leq 1000000000\right) \land \left(-1000000000 \leq a \land a \leq 1000000000\right)$
$\frac{b}{1 + a}$
$\frac{b}{1 + a}$
(FPCore (b a) :precision binary64 (/ b (+ 1.0 a)))
(FPCore (b a) :precision binary64 (/ b (+ 1.0 a)))
double code(double b, double a) {
return b / (1.0 + a);
}

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

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

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

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

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

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

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

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

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

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

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

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

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

\frac{b}{1 + a}

\frac{b}{1 + a}


Try it out?

Results

 In Out
Enter valid numbers for all inputs

Derivation?

1. Initial program 0.0

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

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

Alternatives

Alternative 1
Error2.4
Cost320
$b - b \cdot a$
Alternative 2
Error3.0
Cost64
$b$

Reproduce?

herbie shell --seed 1
(FPCore (b a)
:name " b / (1. + a)"
:precision binary64
:pre (and (and (<= -1000000000.0 b) (<= b 1000000000.0)) (and (<= -1000000000.0 a) (<= a 1000000000.0)))
(/ b (+ 1.0 a)))