News for hackers. Stuff that matters.
Re:Linux utils that you might not know by sabujp on Monday May 22, 2017 @02:34AM (#14391424)
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+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=99999999999999...

Re:Linux utils that you might not know by barrkel on Monday May 22, 2017 @02:45AM (#14391478)
You got the same answer from factor and Wolfram alpha; where is the bug?
Re:Linux utils that you might not know by sabujp on Monday May 22, 2017 @02:50AM (#14391494)
wa shows 76 prime factors, which is the not same as printing out a bunch of 2's and 5's
Re:Linux utils that you might not know by thehobgoblin on Monday May 22, 2017 @03:05AM (#14391563)
WolframAlpha 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.
Re:Linux utils that you might not know by godd2 on Monday May 22, 2017 @01:30PM (#14395416)
100000000000000000000000000000000000000

== 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?

Re:Linux utils that you might not know by sabujp on Monday May 22, 2017 @02:46AM (#14391482)
hrrm but bc -l shows :

999999999999999999939999999 / 1024^8 827.18061255302767482177

Re:Linux utils that you might not know by cyphar on Monday May 22, 2017 @07:39AM (#14392686)
The 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.