This repository was archived by the owner on Apr 12, 2024. It is now read-only.
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
Number filter with exponentially small numbers without fractionSize #10246
Closed
Description
Currently, if fractionSize
is not passed, for small numbers like 1e-50
number filter produces string 1e-50
.
It happens because fractionSize
is undefined here: https://github.com/angular/angular.js/blob/g3_v1_3/src/ng/filter/filters.js#L152
undefined + 1
is NaN
and NaN
can't be bigger than number.
Fraction size is only computed if number has no exponent.
Is it by design?