Implement clear for floats

Rebased #715