angular.js/test/ng/filter
Braden Shepherdson 45a8db9c08 fix(currency): Handle not-quite-zero values
IEEE 754 floating point sometimes results in values that are very small,
rather than zero. One example is 1.0 + 1.07 - 2.07, which returns
4.440892098500626e-16 instead of 0.

This change tweaks the number formatting logic so that an exponential
value with a negative exponent that is larger than the precision+1
returns 0 instead. For example: with precision 2, anything with an
exponent of -4, -5 or more would become 0. 9e-3 = 0.009 = 0.01, but 9e-4
= 0.0009 = 0.001 = 0.00. This detail is unlikely to matter since this
quirk is usually only triggered with values very close to zero.

Closes #1469
2012-10-29 19:37:52 -07:00
..
filterSpec.js chore(module): move files around in preparation for more modules 2012-03-28 11:16:35 -07:00
filtersSpec.js fix(currency): Handle not-quite-zero values 2012-10-29 19:37:52 -07:00
limitToSpec.js chore(module): move files around in preparation for more modules 2012-03-28 11:16:35 -07:00
orderBySpec.js chore(module): move files around in preparation for more modules 2012-03-28 11:16:35 -07:00