Replies: 3 comments
-
Hey @devorel, you have to use BigInt in case you want to work with bigger integers. The reason is described here: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/MAX_SAFE_INTEGER#description |
Beta Was this translation helpful? Give feedback.
-
it very weak. (just 16 digits) nodejsconst a= 55066263022277343669578718895168534326250603453777594175500187360389116729240n;
const b=32670510020758816978083085130507043184471273380659243275938904335757337482424n;
const c=a/b;
console.log(c)//1n - error pythonfrom decimal import *
getcontext().prec = 13000
a= 55066263022277343669578718895168534326250603453777594175500187360389116729240;
b=32670510020758816978083085130507043184471273380659243275938904335757337482424;
c=a/b;
print(c); #1.6855036235212821 |
Beta Was this translation helpful? Give feedback.
-
See "More precision" at https://stackoverflow.com/a/54409977/436641 None of this is Node.js specific. This is ECMAScript. This is what browsers implement. Node.js contributors have limited availability to address general support questions and also are not the ones who designed or implemented BigInt etc. Use StackOverflow or a similar venue for general "how do I" questions like this one. I'm locking this discussion. |
Beta Was this translation helpful? Give feedback.
-
i would like use with huge integer .
can i override it ?
shall it works?
i want 12 thousands digits..
why i need use with another libs (very slowly ..)
node/deps/v8/tools/clusterfuzz/js_fuzzer/mutators/number_mutator.js
Line 18 in e46c680
Beta Was this translation helpful? Give feedback.
All reactions