![]() |
|
|
#1 |
|
Mar 2018
2×5×53 Posts |
I am trying to factor 2^200 with Julia software. So I tried to write factor(2^200) but the result is 0 which is clearly wrong. How does it work BigInt in Julia for handling extremely large numbers? Have I to install some extra-package?
|
|
|
|
|
|
#2 |
|
"Serge"
Mar 2008
Phi(4,2^7658614+1)/2
36·13 Posts |
|
|
|
|
|
|
#3 | |
|
Sep 2002
Database er0rr
3,739 Posts |
Quote:
Code:
factor(BigInt(2^200))
|
|
|
|
|
|
|
#4 |
|
Banned
"Luigi"
Aug 2002
Team Italia
32×5×107 Posts |
enzo, 2^200 = 2*2*2*2*2*2*.......*2*2*2
That is, 200 times. So 2^200 factors like 200 times 2. |
|
|
|
|
|
#5 | |
|
Just call me Henry
"David"
Sep 2007
Cambridge (GMT/BST)
588010 Posts |
Quote:
|
|
|
|
|
|
|
#6 |
|
"Dana Jacobsen"
Feb 2011
Bangkok, TH
11100011002 Posts |
Henry is right and I have tested. big(2^200) gives 0. big(2)^200 will give you what you want. Hence factor(big(2)^200).
With Julia v0.5 and later, factor is in the Prime package, you need to run Pkg.add("Primes") if it isn't already installed. Then Code:
julia> using Primes julia> factor(big(2)^2000 * big(3)^1000 * 57 * 25) 2^2000 ⋅ 3^1001 ⋅ 5^2 ⋅ 19 julia> factor(big(2^2000)) 0 |
|
|
|
|
|
#7 | |
|
Mar 2018
2·5·53 Posts |
Quote:
|
|
|
|
|
|
|
#8 | |
|
Mar 2018
2·5·53 Posts |
Quote:
|
|
|
|
|
|
|
#9 |
|
"Serge"
Mar 2008
Phi(4,2^7658614+1)/2
36×13 Posts |
yes.
just go on and rent one. the proof of the pudding is in the eating. |
|
|
|
![]() |
| Thread Tools | |
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| GNFS or SIGS in Julia? | skan | Factoring | 0 | 2017-07-15 15:19 |
| Calculating large numbers | Historian | Information & Answers | 4 | 2010-03-26 19:39 |
| extremely large numbers | Mini-Geek | Programming | 10 | 2008-07-31 17:04 |
| Julia Sets | mfgoode | Miscellaneous Math | 2 | 2006-04-04 00:18 |
| How do I get LARGE numbers | Bundu | Software | 5 | 2004-08-26 01:56 |