converting float in 0-1 or vice verca