What is the standard solution in JavaScript for handling big numbers (BigNum)? [closed]How to deal with big numbers in javascriptJavaScript large number library?is there any JavaScript interpretor that can handle very large numbers?javascript parseInt() failing?How do I deal with number greater than 2^53 in Javascript?Javascript - get very big number as string containing all digitsJavaScript calculating with very large numbersJavascript: Integer exceeding 10^308 (maximum value)How to convert a 64 bit number string to int in JSWhy does parseInt() return a wrong integer?Validate decimal numbers in JavaScript - IsNumeric()What is the most efficient way to deep clone an object in JavaScript?What is the preferred syntax for defining enums in JavaScript?What is the scope of variables in JavaScript?What is the !! (not not) operator in JavaScript?What is the JavaScript version of sleep()?What does “use strict” do in JavaScript, and what is the reasoning behind it?What is the 'new' keyword in JavaScript?Generate random number between two numbers in JavaScriptIs there a standard function to check for null, undefined, or blank variables in JavaScript?
How do I ask for 2-3 days per week remote work in a job interview?
Shifting tenses in the middle of narration
Boss wants me to ignore a software API license
Is there a way to proportionalize fixed costs in a MILP?
If a person claims to know anything could it be disproven by saying 'prove that we are not in a simulation'?
Escape Velocity - Won't the orbital path just become larger with higher initial velocity?
Is it really Security Misconfiguration to show a version number?
How can God warn people of the upcoming rapture without disrupting society?
Attacking the Hydra
A+ rating still unsecure by chrome's opinion
How to prevent criminal gangs from making/buying guns?
Why aren't rainbows blurred-out into nothing after they are produced?
Telephone number in spoken words
Co-workers with a lot of money and openly talk about it
Dogfights in outer space
How would you translate this? バタコチーズライス
Would the USA be eligible to join the European Union?
Did Pope Urban II issue the papal bull "terra nullius" in 1095?
Will using a resistor in series with a LED to control its voltage increase the total energy expenditure?
Good textbook for queueing theory and performance modeling
Lípínguapua dopo Pêpê
Do beef farmed pastures net remove carbon emissions?
Are there any cons in using rounded corners for bar graphs?
What unique challenges/limitations will I face if I start a career as a pilot at 45 years old?
What is the standard solution in JavaScript for handling big numbers (BigNum)? [closed]
How to deal with big numbers in javascriptJavaScript large number library?is there any JavaScript interpretor that can handle very large numbers?javascript parseInt() failing?How do I deal with number greater than 2^53 in Javascript?Javascript - get very big number as string containing all digitsJavaScript calculating with very large numbersJavascript: Integer exceeding 10^308 (maximum value)How to convert a 64 bit number string to int in JSWhy does parseInt() return a wrong integer?Validate decimal numbers in JavaScript - IsNumeric()What is the most efficient way to deep clone an object in JavaScript?What is the preferred syntax for defining enums in JavaScript?What is the scope of variables in JavaScript?What is the !! (not not) operator in JavaScript?What is the JavaScript version of sleep()?What does “use strict” do in JavaScript, and what is the reasoning behind it?What is the 'new' keyword in JavaScript?Generate random number between two numbers in JavaScriptIs there a standard function to check for null, undefined, or blank variables in JavaScript?
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
Is there a bignum library for JavaScript or built-in that I can include like
<script type="text/javascript" src="the_bignum_library.js"></script>
?
I think my users would prefer to enter numbers in a web page and wait 7 seconds for a result, rather than download an executable and click through a bunch of "this executable could possibly harm your computer" warning screens to install it.
I've considered basing my own off of http://github.com/silentmatt/javascript-biginteger or http://www.mainebrook.com/john/fun/euler.html. Or would you recommend calling from JavaScript into a Java bignum library such as apfloat?
javascript floating-accuracy bignum
closed as off-topic by Andrew Barber Oct 18 '13 at 20:49
This question appears to be off-topic. The users who voted to close gave this specific reason:
- "Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it." – Andrew Barber
|
show 1 more comment
Is there a bignum library for JavaScript or built-in that I can include like
<script type="text/javascript" src="the_bignum_library.js"></script>
?
I think my users would prefer to enter numbers in a web page and wait 7 seconds for a result, rather than download an executable and click through a bunch of "this executable could possibly harm your computer" warning screens to install it.
I've considered basing my own off of http://github.com/silentmatt/javascript-biginteger or http://www.mainebrook.com/john/fun/euler.html. Or would you recommend calling from JavaScript into a Java bignum library such as apfloat?
javascript floating-accuracy bignum
closed as off-topic by Andrew Barber Oct 18 '13 at 20:49
This question appears to be off-topic. The users who voted to close gave this specific reason:
- "Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it." – Andrew Barber
I don't quite understand your question, first you ask for a bignum library, then you provide two on your own? :)
– Skurmedel
Jun 18 '10 at 18:52
When I said "exact-rational-arithmetic", I meant "can exactly represent numbers like 1/7". The two libraries I mentioned, as far as I can tell, can't do that -- they can only handle integers.
– David Cary
Jun 21 '10 at 6:58
Okay, my bad for sloppy reading :)
– Skurmedel
Jun 21 '10 at 11:35
1
There is a BigRational.js library for exact rational arithmetic.
– Peter Olson
Nov 12 '14 at 23:41
2
This is a pretty useful question so I tried salvaging it. Obscure library requests are inappropriate; standard library solutions should thrive on SO.
– djechlin
Apr 10 '15 at 22:56
|
show 1 more comment
Is there a bignum library for JavaScript or built-in that I can include like
<script type="text/javascript" src="the_bignum_library.js"></script>
?
I think my users would prefer to enter numbers in a web page and wait 7 seconds for a result, rather than download an executable and click through a bunch of "this executable could possibly harm your computer" warning screens to install it.
I've considered basing my own off of http://github.com/silentmatt/javascript-biginteger or http://www.mainebrook.com/john/fun/euler.html. Or would you recommend calling from JavaScript into a Java bignum library such as apfloat?
javascript floating-accuracy bignum
Is there a bignum library for JavaScript or built-in that I can include like
<script type="text/javascript" src="the_bignum_library.js"></script>
?
I think my users would prefer to enter numbers in a web page and wait 7 seconds for a result, rather than download an executable and click through a bunch of "this executable could possibly harm your computer" warning screens to install it.
I've considered basing my own off of http://github.com/silentmatt/javascript-biginteger or http://www.mainebrook.com/john/fun/euler.html. Or would you recommend calling from JavaScript into a Java bignum library such as apfloat?
javascript floating-accuracy bignum
javascript floating-accuracy bignum
edited Oct 6 '17 at 21:43
community wiki
5 revs, 3 users 58%
David Cary
closed as off-topic by Andrew Barber Oct 18 '13 at 20:49
This question appears to be off-topic. The users who voted to close gave this specific reason:
- "Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it." – Andrew Barber
closed as off-topic by Andrew Barber Oct 18 '13 at 20:49
This question appears to be off-topic. The users who voted to close gave this specific reason:
- "Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it." – Andrew Barber
closed as off-topic by Andrew Barber Oct 18 '13 at 20:49
This question appears to be off-topic. The users who voted to close gave this specific reason:
- "Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it." – Andrew Barber
I don't quite understand your question, first you ask for a bignum library, then you provide two on your own? :)
– Skurmedel
Jun 18 '10 at 18:52
When I said "exact-rational-arithmetic", I meant "can exactly represent numbers like 1/7". The two libraries I mentioned, as far as I can tell, can't do that -- they can only handle integers.
– David Cary
Jun 21 '10 at 6:58
Okay, my bad for sloppy reading :)
– Skurmedel
Jun 21 '10 at 11:35
1
There is a BigRational.js library for exact rational arithmetic.
– Peter Olson
Nov 12 '14 at 23:41
2
This is a pretty useful question so I tried salvaging it. Obscure library requests are inappropriate; standard library solutions should thrive on SO.
– djechlin
Apr 10 '15 at 22:56
|
show 1 more comment
I don't quite understand your question, first you ask for a bignum library, then you provide two on your own? :)
– Skurmedel
Jun 18 '10 at 18:52
When I said "exact-rational-arithmetic", I meant "can exactly represent numbers like 1/7". The two libraries I mentioned, as far as I can tell, can't do that -- they can only handle integers.
– David Cary
Jun 21 '10 at 6:58
Okay, my bad for sloppy reading :)
– Skurmedel
Jun 21 '10 at 11:35
1
There is a BigRational.js library for exact rational arithmetic.
– Peter Olson
Nov 12 '14 at 23:41
2
This is a pretty useful question so I tried salvaging it. Obscure library requests are inappropriate; standard library solutions should thrive on SO.
– djechlin
Apr 10 '15 at 22:56
I don't quite understand your question, first you ask for a bignum library, then you provide two on your own? :)
– Skurmedel
Jun 18 '10 at 18:52
I don't quite understand your question, first you ask for a bignum library, then you provide two on your own? :)
– Skurmedel
Jun 18 '10 at 18:52
When I said "exact-rational-arithmetic", I meant "can exactly represent numbers like 1/7". The two libraries I mentioned, as far as I can tell, can't do that -- they can only handle integers.
– David Cary
Jun 21 '10 at 6:58
When I said "exact-rational-arithmetic", I meant "can exactly represent numbers like 1/7". The two libraries I mentioned, as far as I can tell, can't do that -- they can only handle integers.
– David Cary
Jun 21 '10 at 6:58
Okay, my bad for sloppy reading :)
– Skurmedel
Jun 21 '10 at 11:35
Okay, my bad for sloppy reading :)
– Skurmedel
Jun 21 '10 at 11:35
1
1
There is a BigRational.js library for exact rational arithmetic.
– Peter Olson
Nov 12 '14 at 23:41
There is a BigRational.js library for exact rational arithmetic.
– Peter Olson
Nov 12 '14 at 23:41
2
2
This is a pretty useful question so I tried salvaging it. Obscure library requests are inappropriate; standard library solutions should thrive on SO.
– djechlin
Apr 10 '15 at 22:56
This is a pretty useful question so I tried salvaging it. Obscure library requests are inappropriate; standard library solutions should thrive on SO.
– djechlin
Apr 10 '15 at 22:56
|
show 1 more comment
2 Answers
2
active
oldest
votes
If you need arbitrary-precision decimal numbers, use Javascript-bignum. This represents numbers as a sequence of decimal digits.
1
This answer is being discussed on Meta.
– halfer
Jul 25 '18 at 22:09
Not an enlightening discussion. I'm quite a bit frustrated that it seems "illegal" to give an answer to this question which appears more than legit to me.
– Max
Jun 14 at 3:47
add a comment |
Big Number.
This will work great for my application. (Although technically this library can't exactly represent 1/7, it comes close enough for my application).
– David Cary
Jun 21 '10 at 8:03
2
This library's internal representation is to store the number as a decimal string. This is very slow for larger numbers and operations.
– jnnnnn
Mar 14 '12 at 1:08
Babiker, forgive me from taking away your big green "answered" checkmark and giving it to jnnnnn. jnnnnn's answer actually does represent 1/7 exactly.
– David Cary
Jun 5 '12 at 16:35
1
Seriously there is a bug. Tryalert(new BigNumber(100).divide(1));
– Pacerier
Oct 28 '13 at 15:29
10
Not to be rude, but this buggy library is going to subtly hurt more people than it helps...
– Pacerier
Oct 31 '13 at 16:56
|
show 3 more comments
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
If you need arbitrary-precision decimal numbers, use Javascript-bignum. This represents numbers as a sequence of decimal digits.
1
This answer is being discussed on Meta.
– halfer
Jul 25 '18 at 22:09
Not an enlightening discussion. I'm quite a bit frustrated that it seems "illegal" to give an answer to this question which appears more than legit to me.
– Max
Jun 14 at 3:47
add a comment |
If you need arbitrary-precision decimal numbers, use Javascript-bignum. This represents numbers as a sequence of decimal digits.
1
This answer is being discussed on Meta.
– halfer
Jul 25 '18 at 22:09
Not an enlightening discussion. I'm quite a bit frustrated that it seems "illegal" to give an answer to this question which appears more than legit to me.
– Max
Jun 14 at 3:47
add a comment |
If you need arbitrary-precision decimal numbers, use Javascript-bignum. This represents numbers as a sequence of decimal digits.
If you need arbitrary-precision decimal numbers, use Javascript-bignum. This represents numbers as a sequence of decimal digits.
edited Apr 19 '16 at 19:28
community wiki
5 revs, 4 users 35%
Matt
1
This answer is being discussed on Meta.
– halfer
Jul 25 '18 at 22:09
Not an enlightening discussion. I'm quite a bit frustrated that it seems "illegal" to give an answer to this question which appears more than legit to me.
– Max
Jun 14 at 3:47
add a comment |
1
This answer is being discussed on Meta.
– halfer
Jul 25 '18 at 22:09
Not an enlightening discussion. I'm quite a bit frustrated that it seems "illegal" to give an answer to this question which appears more than legit to me.
– Max
Jun 14 at 3:47
1
1
This answer is being discussed on Meta.
– halfer
Jul 25 '18 at 22:09
This answer is being discussed on Meta.
– halfer
Jul 25 '18 at 22:09
Not an enlightening discussion. I'm quite a bit frustrated that it seems "illegal" to give an answer to this question which appears more than legit to me.
– Max
Jun 14 at 3:47
Not an enlightening discussion. I'm quite a bit frustrated that it seems "illegal" to give an answer to this question which appears more than legit to me.
– Max
Jun 14 at 3:47
add a comment |
Big Number.
This will work great for my application. (Although technically this library can't exactly represent 1/7, it comes close enough for my application).
– David Cary
Jun 21 '10 at 8:03
2
This library's internal representation is to store the number as a decimal string. This is very slow for larger numbers and operations.
– jnnnnn
Mar 14 '12 at 1:08
Babiker, forgive me from taking away your big green "answered" checkmark and giving it to jnnnnn. jnnnnn's answer actually does represent 1/7 exactly.
– David Cary
Jun 5 '12 at 16:35
1
Seriously there is a bug. Tryalert(new BigNumber(100).divide(1));
– Pacerier
Oct 28 '13 at 15:29
10
Not to be rude, but this buggy library is going to subtly hurt more people than it helps...
– Pacerier
Oct 31 '13 at 16:56
|
show 3 more comments
Big Number.
This will work great for my application. (Although technically this library can't exactly represent 1/7, it comes close enough for my application).
– David Cary
Jun 21 '10 at 8:03
2
This library's internal representation is to store the number as a decimal string. This is very slow for larger numbers and operations.
– jnnnnn
Mar 14 '12 at 1:08
Babiker, forgive me from taking away your big green "answered" checkmark and giving it to jnnnnn. jnnnnn's answer actually does represent 1/7 exactly.
– David Cary
Jun 5 '12 at 16:35
1
Seriously there is a bug. Tryalert(new BigNumber(100).divide(1));
– Pacerier
Oct 28 '13 at 15:29
10
Not to be rude, but this buggy library is going to subtly hurt more people than it helps...
– Pacerier
Oct 31 '13 at 16:56
|
show 3 more comments
Big Number.
Big Number.
answered Jun 18 '10 at 18:59
community wiki
Babiker
This will work great for my application. (Although technically this library can't exactly represent 1/7, it comes close enough for my application).
– David Cary
Jun 21 '10 at 8:03
2
This library's internal representation is to store the number as a decimal string. This is very slow for larger numbers and operations.
– jnnnnn
Mar 14 '12 at 1:08
Babiker, forgive me from taking away your big green "answered" checkmark and giving it to jnnnnn. jnnnnn's answer actually does represent 1/7 exactly.
– David Cary
Jun 5 '12 at 16:35
1
Seriously there is a bug. Tryalert(new BigNumber(100).divide(1));
– Pacerier
Oct 28 '13 at 15:29
10
Not to be rude, but this buggy library is going to subtly hurt more people than it helps...
– Pacerier
Oct 31 '13 at 16:56
|
show 3 more comments
This will work great for my application. (Although technically this library can't exactly represent 1/7, it comes close enough for my application).
– David Cary
Jun 21 '10 at 8:03
2
This library's internal representation is to store the number as a decimal string. This is very slow for larger numbers and operations.
– jnnnnn
Mar 14 '12 at 1:08
Babiker, forgive me from taking away your big green "answered" checkmark and giving it to jnnnnn. jnnnnn's answer actually does represent 1/7 exactly.
– David Cary
Jun 5 '12 at 16:35
1
Seriously there is a bug. Tryalert(new BigNumber(100).divide(1));
– Pacerier
Oct 28 '13 at 15:29
10
Not to be rude, but this buggy library is going to subtly hurt more people than it helps...
– Pacerier
Oct 31 '13 at 16:56
This will work great for my application. (Although technically this library can't exactly represent 1/7, it comes close enough for my application).
– David Cary
Jun 21 '10 at 8:03
This will work great for my application. (Although technically this library can't exactly represent 1/7, it comes close enough for my application).
– David Cary
Jun 21 '10 at 8:03
2
2
This library's internal representation is to store the number as a decimal string. This is very slow for larger numbers and operations.
– jnnnnn
Mar 14 '12 at 1:08
This library's internal representation is to store the number as a decimal string. This is very slow for larger numbers and operations.
– jnnnnn
Mar 14 '12 at 1:08
Babiker, forgive me from taking away your big green "answered" checkmark and giving it to jnnnnn. jnnnnn's answer actually does represent 1/7 exactly.
– David Cary
Jun 5 '12 at 16:35
Babiker, forgive me from taking away your big green "answered" checkmark and giving it to jnnnnn. jnnnnn's answer actually does represent 1/7 exactly.
– David Cary
Jun 5 '12 at 16:35
1
1
Seriously there is a bug. Try
alert(new BigNumber(100).divide(1));
– Pacerier
Oct 28 '13 at 15:29
Seriously there is a bug. Try
alert(new BigNumber(100).divide(1));
– Pacerier
Oct 28 '13 at 15:29
10
10
Not to be rude, but this buggy library is going to subtly hurt more people than it helps...
– Pacerier
Oct 31 '13 at 16:56
Not to be rude, but this buggy library is going to subtly hurt more people than it helps...
– Pacerier
Oct 31 '13 at 16:56
|
show 3 more comments
I don't quite understand your question, first you ask for a bignum library, then you provide two on your own? :)
– Skurmedel
Jun 18 '10 at 18:52
When I said "exact-rational-arithmetic", I meant "can exactly represent numbers like 1/7". The two libraries I mentioned, as far as I can tell, can't do that -- they can only handle integers.
– David Cary
Jun 21 '10 at 6:58
Okay, my bad for sloppy reading :)
– Skurmedel
Jun 21 '10 at 11:35
1
There is a BigRational.js library for exact rational arithmetic.
– Peter Olson
Nov 12 '14 at 23:41
2
This is a pretty useful question so I tried salvaging it. Obscure library requests are inappropriate; standard library solutions should thrive on SO.
– djechlin
Apr 10 '15 at 22:56