Mercurial > babel > old > babel-test
diff babel/numbers.py @ 369:c2ae38340540 stable-0.9.x
Ported [388:405/trunk] to 0.9.x branch.
author | cmlenz |
---|---|
date | Fri, 27 Jun 2008 15:22:12 +0000 |
parents | e8bfc65444f3 |
children | 369300a7ebd3 |
line wrap: on
line diff
--- a/babel/numbers.py +++ b/babel/numbers.py @@ -463,7 +463,10 @@ is_negative = int(value < 0) if self.exp_prec: # Scientific notation value = abs(value) - exp = int(math.floor(math.log(value, 10))) + if value: + exp = int(math.floor(math.log(value, 10))) + else: + exp = 0 # Minimum number of integer digits if self.int_prec[0] == self.int_prec[1]: exp -= self.int_prec[0] - 1