ho risolto così:
codice:
costo=Math.round(costo*100)/100;
grazie mille