Try this also,
select cast(CAST(12.5800 as decimal(18,5)) as float)
select cast(CAST(12.5 as decimal(18,5)) as float)
select cast(CAST(12.58 as decimal(18,5)) as float)
select cast(CAST(0.00 as decimal(18,5)) as float)
and the out put will be
12.58
12.5
12.58
0
respectively
thanks
animesh