NaN returned if value < 1e-6
See original GitHub issueI need my app to display formatted values less than 0.00000100. However numeral returns NaN for such values.
Here are reproducible test cases:
console.log(`1e-8, ${numeral(1e-8).format('0,0.00000000')}`) //output: NaN
console.log(`1e-7, ${numeral(1e-7).format('0,0.00000000')}`) //output: NaN
console.log(`9e-7, ${numeral(9e-7).format('0,0.00000000')}`) //output: NaN
console.log(`9.999999e-7, ${numeral(9.999999e-7).format('0,0.00000000')}`) //output: NaN
console.log(`1e-6, ${numeral(1e-6).format('0,0.00000000')}`) //output: 0.00000100
Please fix this. Thank you.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:21
- Comments:8
Top Results From Across the Web
NaN - JavaScript - MDN Web Docs
The global NaN property is a value representing Not-A-Number. ... isNaN() : the former will return true if the value is currently NaN ......
Read more >The NaN story, short version - Nim forum
NaN is a very special floating point value. Comparing a float with NaN gives always false, so testing for NaN does not work...
Read more >Handling Missing Data | Python Data Science Handbook
Here and throughout the book, we'll refer to missing data in general as null, NaN, or NA values. Trade-Offs in Missing Data Conventions¶....
Read more >Simple Method for Finding if ANY NaN values occur in a matrix.
Simple Method for Finding if ANY NaN values... Learn more about nan's, infinities, matrix, vector, array MATLAB.
Read more >LogBackward returned nan values in its 0th output - autograd
Can you maybe tell me if anyline I should use to catch the number that is causing that issue or anyways to recover...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Has this repository been abandoned? We need a new maintainer to fix this problem that I still experience (and any other problems).
fuck