Quantcast
Channel: First steps - JuliaLang
Viewing all articles
Browse latest Browse all 2795

Difference between f(1.0e-7) & f(1.0e-8)

$
0
0

@Stephen wrote:

the limit of the following function at 0 is 1,

QQ截图20191229180612

yet f(1.0e-8) gives 0 while f(1.0e-7) gives the correct answer, why?

julia> f(x)=2*(1-x*exp(-x)-exp(-x))/(1-exp(-x))^2
f (generic function with 1 method)

julia> f(1.0e-7)
0.9992008230547272

julia> f(1.0e-8)
0.0

Posts: 15

Participants: 11

Read full topic


Viewing all articles
Browse latest Browse all 2795

Latest Images

Trending Articles



Latest Images