A. L. wrote: > I am writing the code involved in numerical computation. When I need a > float epsilon similar to FLT_EPS in C, eps in matlab, I fail to find > the equivalent in python. Could somebody here can give me some advices?
Have you searched the documentation? I you can't find anything there, you can always calculate it yourself. Epsilon is usually defined as follows: >>> eps = 1. >>> while 1. + eps != 1.: ... eps /= 2. ... >>> eps 1.1102230246251565e-16 Then some people actually multiply the above number by 2. In other words (on my machine), eps is math.ldexp(1, -52). YMMV Jan -- http://mail.python.org/mailman/listinfo/python-list