lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


http://docs.sun.com/source/806-3568/ncg_goldberg.html

On Wed, Jul 14, 2010 at 2:59 PM, Pantelis Kavallieratos <kavallieratos@gmail.com> wrote:
one would expect that b=1-(1-a) leads to b=a

that is not always the case if a is a rational number less than 1

if a is one of the following 1/3, 1/5, 1/6, 2/6, 1/7, 3/7, 1/9, 3/9, 1/10, 2/10, 3/10, 1/11 ...

b=1-(1-a)
print(a==b)

returns false!