# ?

Average Error: 0.0 → 0.0
Time: 8.0s
Precision: binary64
Cost: 13120

# ?

$-1.79 \cdot 10^{+308} \leq x \land x \leq 1$
$\sqrt{x + 1} - \sqrt{x}$
$\sqrt{x + 1} - \sqrt{x}$
(FPCore (x) :precision binary64 (- (sqrt (+ x 1.0)) (sqrt x)))
(FPCore (x) :precision binary64 (- (sqrt (+ x 1.0)) (sqrt x)))
double code(double x) {
return sqrt((x + 1.0)) - sqrt(x);
}

double code(double x) {
return sqrt((x + 1.0)) - sqrt(x);
}

real(8) function code(x)
real(8), intent (in) :: x
code = sqrt((x + 1.0d0)) - sqrt(x)
end function

real(8) function code(x)
real(8), intent (in) :: x
code = sqrt((x + 1.0d0)) - sqrt(x)
end function

public static double code(double x) {
return Math.sqrt((x + 1.0)) - Math.sqrt(x);
}

public static double code(double x) {
return Math.sqrt((x + 1.0)) - Math.sqrt(x);
}

def code(x):
return math.sqrt((x + 1.0)) - math.sqrt(x)

def code(x):
return math.sqrt((x + 1.0)) - math.sqrt(x)

function code(x)
return Float64(sqrt(Float64(x + 1.0)) - sqrt(x))
end

function code(x)
return Float64(sqrt(Float64(x + 1.0)) - sqrt(x))
end

function tmp = code(x)
tmp = sqrt((x + 1.0)) - sqrt(x);
end

function tmp = code(x)
tmp = sqrt((x + 1.0)) - sqrt(x);
end

code[x_] := N[(N[Sqrt[N[(x + 1.0), $MachinePrecision]],$MachinePrecision] - N[Sqrt[x], $MachinePrecision]),$MachinePrecision]

code[x_] := N[(N[Sqrt[N[(x + 1.0), $MachinePrecision]],$MachinePrecision] - N[Sqrt[x], $MachinePrecision]),$MachinePrecision]

\sqrt{x + 1} - \sqrt{x}

\sqrt{x + 1} - \sqrt{x}


# Try it out?

Results

 In Out
Enter valid numbers for all inputs

# Derivation?

1. Initial program 0.0

$\sqrt{x + 1} - \sqrt{x}$
2. Final simplification0.0

$\leadsto \sqrt{x + 1} - \sqrt{x}$

# Alternatives

Alternative 1
Error0.7
Cost6848
$x \cdot 0.5 + \left(1 - \sqrt{x}\right)$
Alternative 2
Error0.7
Cost6848
$1 + \left(x \cdot 0.5 - \sqrt{x}\right)$
Alternative 3
Error2.9
Cost64
$1$

# Reproduce?

herbie shell --seed 1
(FPCore (x)
:name "sqrt(x+1) - sqrt(x)"
:precision binary64
:pre (and (<= -1.79e+308 x) (<= x 1.0))
(- (sqrt (+ x 1.0)) (sqrt x)))