mysql - Rounded numbers returned as '0.999999999992345' sometimes -


i have report should return along lines of

select brand, round(sum(count * price) / sum(count), 2)      ... group brand, ...;  

the problem is, sometimes 9990.32999999999992345 in perl code instead of 9990.33 direct sql request returns.

the number starts looking way right after fetchrow_hashref, if ever does. same number can come in 'good' or 'bad' form in different queries, same way in specific query.

how can track down?

i can think of couple of causes of this, first:

does make difference put concat( '', ... ) around round? version of perl using? perl -v:nvtype report?


Comments

Popular posts from this blog

WPF: binding viewmodel property of type DateTime to Calendar inside ItemsControl -

java - Getting corefrences with Standard corenlp package -

jQuery clickable div with working mailto link inside -