largenumber Questions
2
Solved
How would you make a function that generates a random number from 1 to 25 million?
I've thought about using rand() but am I right in thinking that the maximum number, RAND_MAX is = 32000 (there ab...
Bullion asked 10/12, 2015 at 19:2
3
Solved
Does the standard library have a BigInt class? (numbers with many digits held in a container)
Pohai asked 14/2, 2011 at 21:16
1
Solved
While experimenting with Euler 99, I noticed that these operations take different time:
>>> 632382**518061 # never finishes..
>>> 632382**518061 > 519432**525806 # finishes i...
Everything asked 5/5, 2015 at 22:48
1
Solved
How do arbitrary-precision libraries like GMP store extremely large floating-point numbers represented in memory?
I would imagine that if for instance you wanted to compute Pi or Euler's constant ...
Genisia asked 24/5, 2014 at 1:54
1
I would like to change the precision in a calculation of R. For example I would like to calculate x^6 with x = c(-2.5e+59, -5.6e+60). In order to calculate it I should change the precision in R, ot...
Birth asked 17/3, 2014 at 21:56
2
I have this operation (8 * (512 * 786432)) and the product is 3221225472
I tried to use it with variables like longlong, unsigned long
But the compiler throw me an error
c4307 integral constant ove...
Grayback asked 31/1, 2014 at 23:51
1
I need to handle large numbers in Lua which goes with Redis. Normally you would do that like:
require"bc"
bc.mul(...)
bc.mod(...)
etc.
But unfortunately Redis Lua doesn't support "require". The ...
Mesozoic asked 25/6, 2013 at 17:51
3
I want to iterate a large number such as 600851475143 using the range() function in Python. But whenever I run the program it gives me an OverflowError.
I have used the following code -
um ...
Trichite asked 31/3, 2013 at 1:48
5
Solved
Can you recommend good languages to do math with large numbers in?
So far I've used Actionscript 2 and Objective-c and with Objective-c even using NSDecimalNumbers I was limited to 32 digits in my...
Lemmie asked 6/2, 2013 at 7:17
3
Solved
I need to compute sin(4^x) with x > 1000 in Matlab, with is basically sin(4^x mod 2π) Since the values inside the sin function become very large, Matlab returns infinite for 4^1000. How can I effic...
Hudson asked 2/12, 2012 at 22:28
3
Solved
I have declared few integer values in an xml and need to use the values in a Class to define the array size of an object.
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- De...
Entranceway asked 18/11, 2012 at 14:10
3
Solved
Problem: Generate large binary strings (length 2000+). Do it quickly, as this generateRandom() function will be called 300,000 times in the algorithm.
Attempted Solutions: Generate 3 or 4 binary n...
Outlying asked 28/8, 2012 at 14:53
2
Solved
I have done a lot of work on this but couldnt find the answer for larger test cases
Problem statement
In mathematics, binomial coefficients are a family of positive integers that occur as coeffic...
Obfuscate asked 8/8, 2012 at 14:49
2
Solved
I cant find why I got a java.lang.ArithmeticException: Invalid operation while using big decimal.
public static String E (int exponent, String value){
BigDecimal ten= new BigDecimal("10");
BigDeci...
Overnight asked 29/3, 2012 at 19:36
2
Solved
I am doing a puzzle where I have to deal with numbers of order 10^18. However, I find python isn't able to handle very large numbers in all areas.
To be specific, if we assign a = 1000000000000000...
Lavinalavine asked 23/1, 2012 at 12:59
3
I tried to multiply 111111111*111111111, which is the same as 111111111^2, and got incorrect results. It should give 12345678987654321, but instead it gives a rounding error. Do I need to use some ...
Cunnilingus asked 17/11, 2011 at 22:35
4
Solved
First a little background:
- I'm a first time poster, a student in university (not in programming).
- This is not a homework question, I'm only doing this for fun.
- My programming experience consi...
Wojcik asked 2/11, 2011 at 19:0
2
Solved
Javascript represents all numbers as double-precision floating-point. This means it loses precision when dealing with numbers at the very highest end of the 64 bit Java Long datatype -- anything af...
Gotham asked 2/4, 2011 at 20:50
2
Solved
Is there a library for large precision complex numbers in Python?
Tridentum asked 8/3, 2011 at 11:25
2
Solved
from Wikipedia: fourier division.
Here is a screenshot of the same:
(view in full-resolution)
What is the logic behind this algorithm?
I know it can be used to divide very large numbers, but h...
Matriarchy asked 19/9, 2009 at 1:50
2
Solved
Possible Duplicate:
Working with large numbers in PHP.
I run a completely useless Facebook app. I'm having a problem with PHP's support for integers. Basically, users give themselves ...
View asked 18/9, 2010 at 6:2
3
Solved
I have to store the number 600851475143 in my program. I tried to store it in long long int variable and long double as well but on compiling it shows the error
integer constant is too large for ...
Geometrize asked 29/8, 2010 at 15:5
3
Solved
I'm trying to work with large numbers (~10^14), and I need to be able to store them and iterate over loops of that length, i.e.
n=SOME_BIG_NUMBER
do i=n,1,-1
I've tried the usual star notation, ...
Goldie asked 8/7, 2010 at 14:26
5
Solved
I need to write an algorithm(I cannot use any 3rd party library, because this is an assignment) to divide(integer division, floating parts are not important) very large numbers like 100 - 1000 digi...
Heterosis asked 21/5, 2010 at 17:26
15
I am using the RSA Algorithm for encryption/decryption, and in order to decrypt the files you have to deal with some pretty big values. More specifically, things like
P = C^d % n
= 62^65 %...
Remonstrant asked 23/9, 2008 at 22:32
© 2022 - 2024 — McMap. All rights reserved.