AREPL-vscode icon indicating copy to clipboard operation
AREPL-vscode copied to clipboard

arepl does not show bigints correctly

Open Almenon opened this issue 6 years ago • 2 comments

see https://news.ycombinator.com/item?id=18412844

x=123456789123456789

shows up as x: 123456789123456780

Also extremely big numbers get converted into infinity and fail to show up at all

Almenon avatar Mar 16 '19 19:03 Almenon

I should switch to using https://github.com/sidorares/json-bigint to parse

Almenon avatar Mar 16 '19 19:03 Almenon

two problems:

  1. right now it converts it to a bignumber class... I should probably wait till we get native bignumbers (node 10.4.0).
  • I could convert it to a string instead, but I don't want numbers to show as strings
  1. there is an exception when converting very large numbers

Almenon avatar Mar 16 '19 20:03 Almenon