[F] JS float precision #2454
Replies: 4 comments
-
@VeblenDian Can you provide a specific example? Or provide an excel template? |
Beta Was this translation helpful? Give feedback.
-
I believe this is happening because of JavaScript number's representation. The |
Beta Was this translation helpful? Give feedback.
-
I've just run into this same problem and had to round the numbers manually in my application code to get them to match the original Excel cell value. Would be great to get this resolved in this package as this is quite odd and unexpected behaviour. |
Beta Was this translation helpful? Give feedback.
-
The numbers cannot be expressed in exact decimal form because JavaScript uses 64-bit double precision floating point numbers, like 0.15 which cannot be expressed in exact binary form, so it will round to nearest 53-bit significand precision. |
Beta Was this translation helpful? Give feedback.
-
🚀 Feature Proposal
When some decimals are entered in Excel, the numbers parsed by Exceljs will lose precision, such as 0.15 -> 0.1500000000002Ï
Motivation
Please outline the motivation for the proposal.
Example
Please provide an example for how this feature would be used.
Beta Was this translation helpful? Give feedback.
All reactions