Question: I had written the following function in which values of x,y were passed:

```
def check(x, y):
    print(type(x))
    print(type(y))
    print(x)
    print(y)
    if x == y:
        print "Yes"

```

Now when I called
`check(1.00000000000000001, 1.0000000000000002)`
it was printing:

```
<type 'float'>
<type 'float'>
1.0
1.0

```

Now from the print statements of variables x & y, it was hard for me to debug why x != y (though both were printing same values). Though I resolved it by printing x - y which gave me the difference but is there any way to modify print statement so that to know why x!=y in this particular use case without using any external print libraries and subtraction solution.

Answer: 
What you really need here is decimals. Python float won't allow you for such precision.

```
In [28]: d= Decimal('1.00000000000000001')

In [29]: print d
1.00000000000000001

```
a solution to a similar case was discussed here:
[print float to n decimal places including trailing 0's](https://stackoverflow.com/questions/8568233/print-float-to-n-decimal-places-including-trailing-0s)

I don't know though if there is a way of printing the full length of the float. But I guess if you use like 100 values after a floating point, it will solve must of your problems.