question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

19 digit Number rounded to some other number.

See original GitHub issue

Hi, I am fetching data from Stored Procedure. It is sending many fields. One of the fields is 19 digit account number. That account number is getting rounded to some other number. For example : 2657843246789123456 -> 2657843246789123500. This is very big issue of automatic manipulation of the data. Can someone help?

Expected behaviour:

Number received should be what is sent from database.

Actual behaviour:

19 digit account number is rounded.

request.query(EXEC spGet ${crnum};);

Software versions

  • NodeJS: 8.x.x
  • node-mssql: 5.0.0

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
willmorgancommented, Mar 11, 2019

It’s an issue with JS, you should probably be using strings.

https://www.avioconsulting.com/blog/overcoming-javascript-numeric-precision-issues

0reactions
willmorgancommented, Mar 12, 2019

In summary, yes. As this isn’t a defect with the library, I’d kindly suggest you are best placed to resolve implementation questions on StackOverflow or similar.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why my 19 digit number will be rounded to 17 digits
I got the transaction number from a server request: $sendInfo = file_get_contents($server.$request); $obj_sendInfo = json_decode($sendInfo); $transaction = $ ...
Read more >
How to put 19 digit or more digit number in a excel cell
It is simple to copy / type in excel with more than 15 numbers. Pls follow the steps given below: If you want...
Read more >
Rules for Rounding Off - Chemteam.info
When rounding, you examine the digit following (i.e., to the right of) the digit that is to be the last digit in the...
Read more >
Rounding Whole Numbers | Mathematics for the Liberal Arts ...
The process of approximating a number is called rounding. Numbers are rounded to a specific place value depending on how much accuracy is...
Read more >
10 scale digits getting rounded on 8th digit as number data type
If you want numbers stored in Oracle the same as your application processes them then you should use datatypes that are identical to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found