Fix float/double conflict

Especially, `abs` for double may be potential bug
Merge pull request #1 from youknowone/type

Fix float/double conflict