Tryed avoiding the int->str dirty tricks, but float to int transformations drive me crazy.

```
from math import floor
def digit_sum(n):
a=n
total=0
while a>9:
a=float(a)/10
total+=(a-floor(a))*10
a=floor(a)
total+=a
return total
```

Depending on the place I try to convert total variable from float to int the difference may get up to 2 if test against n=434