3 ms·
factor is buggy : factor 100000000000000000000000000000000000000 100000000000000000000000000000000000000: 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
by sabujp 9y ago
factor is buggy :
factor 100000000000000000000000000000000000000
100000000000000000000000000000000000000: 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5
http://www.wolframalpha.com/input/?i=factor+100000000000000000000000000000000000000&dataset= http://www.wolframalpha.com/input/?i=factor+1000000000000000...
also numfmt bug:
$ numfmt --to=iec 999999999999999999939999999
828Y
$ numfmt --to=iec 999999999999999999940000000
numfmt: value too large to be printed: '1e+27' (cannot handle values > 999Y)
but 999999999999999999939999999 is ~1000YB : http://www.wolframalpha.com/input/?dataset=&i=999999999999999999939999999+bytes+to+yottabytes http://www.wolframalpha.com/input/?dataset=&i=99999999999999...
- barrkel 9y agoYou got the same answer from factor and Wolfram alpha; where is the bug?
- sabujp 9y agowa shows 76 prime factors, which is the not same as printing out a bunch of 2's and 5's
- thehobgoblin 9y agoWolframAlpha lists the factors as 2^38 * 5^38, which is just a compact notation for 38 2s and 38 5s, totalling 76 factors. If you count the 2s and 5s in the output of factor, you get the same result of 38 each for a total of 76 factors.
- godd2 9y ago100000000000000000000000000000000000000 == 10 ^ 38 == (2 * 5) ^ 38 == 2 ^ 38 * 5 ^ 38 == 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 5 * 5 * 5 * 5 * 5 * 5 * 5 * 5 * 5 * 5 * 5 * 5 * 5 * 5 * 5 * 5 * 5 * 5 * 5 * 5 * 5 * 5 * 5 * 5 * 5 * 5 * 5 * 5 * 5 * 5 * 5 * 5 * 5 * 5 * 5 * 5 * 5 * 5 Are 2 and 5 not prime?
- sabujp 9y agohrrm but bc -l shows : 999999999999999999939999999 / 1024^8 827.18061255302767482177
- cyphar 9y agoThe output of the error is not using IEC units -- YB not YiB (IEC units have a lowercase "i" when written). So it's referring to yottabytes not yobibytes.