All, In Dec 2019 I reported that the coreutil factor in Cygwin does not work correctly for some composite numbers (more details further below, try eg:
echo '3401347*3861211*12099721' | bc | factor which will not stop). While I had a prompt reply about how to build my own version (kindly supplied by Linda Walsh, which I had already done after the developers provided a fix a couple of years ago), I am confused why an updated version of factor has not been incorporated in recent releases of Cygwin. Moreover, I've compiled it with 16-Byte integer support only, so 2^127-1 (~1.7e+38) is the limit in my version (based on 8.29 & higher) -> echo '2^127-2' | bc | factor 170141183460469231731687303715884105726: 2 3 3 3 7 7 19 43 73 127 337 5419 92737 649657 77158673929 -> echo '2^127-1' | bc | factor170141183460469231731687303715884105727: 170141183460469231731687303715884105727 -> echo '2^127' | bc | factorfactor: ‘170141183460469231731687303715884105728’ is too large -> echo '2^127+1' | bc | factorfactor: ‘170141183460469231731687303715884105729’ is too large The faulty version (8.26) has been built with some multi-precision integer arithmetic package (GNU MP ?) and goes to much larger values. ( echo '10^999' | bc | tr -d '\\' | tr -d '\012' ; echo '' ) | & factor_826.exe2^999 5^999 [I've used "x^n" as abbreviation - factor prints "x" n times, separated by spaces] Best wishes, Bernd ---------- Original message ---------From: Bernd Eggen <br...@eggen.co.uk> Date: Sat, 21 Dec 2019 at 09:28 Subject: Re: cygwin Digest 13 Dec 2019 16:20:42 -0000 Issue 11673 // Bug in "factor" (coreutils: GNU core utilities (8.26-2), 64bit edition) To: Linda Walsh <cyg...@tlinx.org> Dear Linda, Many thanks for your thoughts re "Bug in "factor" (coreutils: GNU core utilities (8.26-2), 64bit edition)". I did get the fix directly via developers / from GNU site (URL https://ftp.gnu.org/gnu/coreutils/coreutils-8.31.tar.xz ). However, what "bugged" me was to see that this has not been taken through to the Cygwin distribution -after almost 2 years ! The error is not obvious, as "factor" can in certain cases take minutes to complete for large numbers. Best wishes & for the holidays, Bernd ---------- Original message ---------From: <cygwin-digest-h...@cygwin.com> Date: Fri, 13 Dec 2019 at 16:21 Subject: cygwin Digest 13 Dec 2019 16:20:42 -0000 Issue 11673 To: <cygwin@cygwin.com> cygwin Digest 13 Dec 2019 16:20:42 -0000 Issue 11673 Topics (messages 218573 through 218581): Re: Bug in "factor" (coreutils: GNU core utilities (8.26-2), 64bit edition) 218573 by: L A Walsh Re: non-persistant storage? 218574 by: Brian Inglis 218576 by: L A Walsh 218578 by: Ulli Horlacher Re: non-persistent storage? 218575 by: Jürgen Wagner 218577 by: Ulli Horlacher 218579 by: Ulli Horlacher 218580 by: Marco Atzeri 218581 by: Buchbinder, Barry (NIH/NIAID) [E] Administrivia: To subscribe to the digest, e-mail: cygwin-digest-subscr...@cygwin.com To unsubscribe from the digest, e-mail: cygwin-digest-unsubscr...@cygwin.com To post to the list, e-mail: cygwin@cygwin.com ---------------------------------------------------------------------- ---------- Forwarded message ---------- From: L A Walsh <cyg...@tlinx.org> To: cygwin@cygwin.com Date: Thu, 12 Dec 2019 17:33:25 -0800 Subject: Re: Bug in "factor" (coreutils: GNU core utilities (8.26-2), 64bit edition) On 2019/12/11 23:36, Bernd Eggen wrote: > Hello, > Some time ago I found that the Cygwin-64 "factor" command did not seem to > terminate with certain numbers, eg try: > -> echo '3401347*3861211*12099721' | bc | factor > > The developers provided a fix (in GNU coreutils 8.29), however, after some > two years I still find the faulty factor command in the current Cygwin > distribution. > When are you planning to upgrade ? > Cheers, Bernd > PS I think this only affects 64bit version > Wow... The source for factor should be easy to build .. like grab from gnu's website...(goog) tells me this link should work: https://ftp.gnu.org/gnu/coreutils/coreutils-8.31.tar.xz untar it and run configure in the dir where it was extracted, then run "make" in the same dir. You'll find factor in "src/factor". Or you could also get the cygwin source package (in setup checkmark the src package) and substitute in the new coreutils package, and adjust any needed paths in the cygwin make package, then you'd have an installable cygwin package rather than just a binary of factor... Just thinking out-loud, mostly, if I really needed it that is... But dunnow how complicated their packaging is... -linda [...] -- Problem reports: https://cygwin.com/problems.html FAQ: https://cygwin.com/faq/ Documentation: https://cygwin.com/docs.html Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple