Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NaN returned if value < 1e-6 #563

Open
tab00 opened this issue Oct 2, 2017 · 8 comments
Open

NaN returned if value < 1e-6 #563

tab00 opened this issue Oct 2, 2017 · 8 comments

Comments

@tab00
Copy link

tab00 commented Oct 2, 2017

I 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.

@michaelvolz
Copy link

I have the same problem. Everything below e-6 is not working. Any ideas how to fix this?

@thmaterna
Copy link

This is a duplicate of #514 and #512. There are already several pull requests to fix it.

@turnerniles
Copy link

@thmaterna @RaviDasari @JasonRammoray @adamwdraper Any update on the status of this issue?

There are 2 open issues, #512 and #563, and 2 PRs #564 and #514 open to fix this issue.

@adamwdraper would you be able to review #564? @thmaterna has noted #514 will not cover all cases.

@RaviDasari
Copy link

unfortunately, no update from @adamwdraper

@tab00
Copy link
Author

tab00 commented Apr 11, 2018

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

@lutangar
Copy link

@tab00 see #431

@BenjaminVanRyseghem
Copy link

Have you tried numbro?

@huihongzhou
Copy link

fuck

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants