- 7th August 2017. In line 337 of davison.c, I changed CHANGEI to CHANGE. Also tightened up CHANGEI(n) so that an error message is displayed if |n| > R0.
- 16th July 2017. The cycle program was not returning cycles starting with a negative integer because of a "cast" conversion failure in line 143 of collatz.c. This was solved by changing the variable n from unsigned int to long int.
- 18th February 2017. Thanks to Wilberd van der Kallen, the pseudocode for the Havas-Majewski-Matthews LLLHNF algorithm has been corrected and lllhermite() has been accordingly been updated. Also thanks to Benjamin Hildprecht, who had produced an example where LLLHNF gave a slightly incorrect answer on a 6x5 matrix.
- 9th February 2017. lllhermite() sometimes delivers and answer which is not quite in HNF.
- 20th September 2016. I now list the known composite number with a statement that it's composite yet not factored. I also decreased the upper r limit 33554432 to 65536 on line 187 of primes1.c. I had previously used 33554432, as that enabled me to use BRENT_POLLARD to extract a factor on one occasion. However, it is just too time-consuming to use 33554432.
- 20th June 2016. Added conwayrangetest1(m1,m2,n1,n2).
- 31st May 2016. Added conwaycycles(a,b).
- 31st May 2016. Added lprimefactor(n).
- 16th January 2015. Added pell4(d,e,&x,&y) and stolt(a,b,c,n).
- 4th January 2015. Updated calc_win32.exe.
- 1st January 2015. FREEMATI(Tmp1); is now in the correct place at line 2887 of nfunc.c. This was causing errors when using axb(). Also on line 130 of lllhermi.c, I replaced ffree((char *)COL, (1 + m) * sizeof(USI *)); by ffree((char *)COL, (1 + m) * sizeof(USI)); I have not updated the win32 executable yet.
- 2nd June 2014. Noticed an error in CHANGEI(long n) which never caused a problem until now! I had an
`if else if else`construction, where the first else had inadvertently been omitted. - 14th May 2014. Increased number of primes used in MILLER from 5 to 16 in primes1.c.
- 15th January 2014. Replaced fgets by Gets in i6I.c.
- 11th September 2013. Fixed a help problem whereby the request for information about the exceptionals function gave Abort Trap, because I had only allowed 10 character names and exceptionals had 12 characters.
- 17th July 2013. Fixed a sign problem in the output of the basis for the non-negative solutions in nagell(d,n). Also fixed a problem in NAGELL, where I used MULT_I(Temp, y) instead of MULT(Temp,Y).
- 16th July 2013. Updated nagell(d,n) so that it now additionally gets the basis of non-negative solutions that frattini(d,n) gets.
- 15th July 2013. Added frattini(d,n)
- 29th June 2013. Noticed that I had excluded x=0 in mthroot(x,m). Also I had excluded the possible ambiguous solution u=0 in nagell(d,n), when n < 0. This is now fixed.
- 22nd June 2013. Added nagell(d,n).
- 29th August 2012. Updated calc.tar and calc.exe. Added fg(p,q).
- 10th February 2012. Michael Zuker pointed out that cyclotomic(105) gave the wrong answer. This was due to the segment
next;

on line 58 of cyclo.c having been commented out. This has now been fixed in the source file in calc.tar and in calc.exe. - 25th October 2011. Fixed a small but important logical error in function AX1() in nfunc.c.
- 27th July 2011. Added pqcycle( ).
- 27th July 2011. Added mcycle( ).
- 25th July 2011. Added twocycle( ).
- 9th July 2011. Added partition(n).
- 9th July 2011. Added tangent(n) and bernoulli(n,&x,&y).
- 29th December 2010. Added carnielli() and lupei().
- 4th September 2010. Improved the logic of the carmichael program. Instead of taking PRIME_FOUND(PRIME_COUNT) to be the next prime after n+1, we take it to be 0.
- 3rd September 2010. Added carmichael(n). Also fixed an error in ramanujan(n). Also added #define _CRT_SECURE_NO_DEPRECATE and #define _CRT_NONSTDC_NO_DEPRECATE to all .c files to get rid of warnings when compiling CALC for Windows-XP.
- 22nd December 2008. Added nicfperiod(), nicfperiod0(), nscfperiod0(), rcfperiod0().
- 15th October 2008. Added algcycle(), spiral() and spiralinverse().
- 14th March 2008. Added nscfperiod. Also changed the name
`cfracperiod`to`rcfperiod`. - 28th September 2007. Added a windows XP version of calc, thanks to Jean-Jacques Delgove.
- 26th February 2007. Fixed a counting error in
`cfracperiod()`which occurred only when the period-length ≥ 2^{31}. - 13th February 2007. Added cfracperiod.
- 12th February 2007. Added euclid1.
- 12th February 2007. Added powerd.
- 6th February 2007. Noticed that
`lllhermite()`was printing an unwanted matrix when in verbose mode. - 15th November 2006. Improved
`reducepos()`and added output file reducepos.out. Also construct an unimodular transforming matrix converting the given form to a reduced form. This feature is available in the BCMATH version. - 30th June 2006. Added
`repdefinite()`. - 16th May 2006. Changed
`cycle()`so that the cycle generator is of minimal absolute value. - 18th December 2004. Balbir Thomas pointed out that calc.tar.gz was inaccessible. This was because I had switched over to storing only calc.tar! I no longer gzip the file, as some people had trouble gunzipping it.
- 11th November 2004.
`help`had omitted descriptions of`congr`and`inhomfp`; also the description for`slv`was that of`inhomfp`. - 16th August 2004. It has been pointed out that
`p-adic.c`was still apparently omitted from the source files in calc.tar.gz. This has now been fixed. - 12th July 2004. Added clarification to cycle program, both in krm_calc.html and readme.c. The latter has been incorporated into calc.tar, but not in the dos executable so far.
- 1st June 2004. I noticed that
`p-adic.c`was strangely omitted from the source files in calc.tar.gz. - 27th April 2004. Added
`ramanujan`. - 15th April 2004. Fixed an error in
`CORNACCHIAX()`in primes1.c, where I had`t < 0`instead of`t > 0`. This had the effect of preventing`cornacchia()`from being used! - 4th April 2004. Fixed the omission of the &a[] in the description of
`twoadicsqrt(b,n,&a[])`; - 4th April 2004. Added
`padicrsqrt`. - 3rd April 2004. Added
`twoadicrsqrt`. - 30th March 2004. Made
`buff`and`outfile`global variables in davison.c, so as to have but one`fopen`and one`fclose`. Also changed maximum number of partial quotients from 10^{5}to 10^{6}. - 30th March 2004. Added
`raney`. - 31st March 2004. Added
`unimodular`. - 30th March 2004. Added
`raney`. - 29th March 2004. Added
`davison`. - 16th May 2003. Added
`tablepos`. - 15th May 2003. Added
`tableneg`. - 12th May 2003. Added
`classnop0`. - 12th May 2003. Regarding
`classnop`- fixed a small error in`PERIOD`in the file reductio.c - was returning`global_count`, instead of`cycle_length`. - 9th May 2003. Added
`reducepos`. - 8th May 2003. Added
`reduceneg`. - 7th May 2003. Added
`nearint`. - 7th May 2003. Added
`classnon`. - 6th May 2003. Added
`classnop`. - 26th September 2002. Added
`cyclotomic`. - 23rd September 2002. Added
`sturmsequence`. Also added some checking to`lagrange`, as well as now catering for the case when the root is rational. - 23rd September 2002. I no longer provide calc.exe.gz, only calc.exe, as some people had trouble with the former.
- 4th September 2002. Added
`primes`. - 20th August 2002. Added
`resultant(p,q)`,`discriminant(p)`and`deriv(p)`. - 27th June 2002. Added
`testlog(a,b,d,m,n)`. - 25th June 2002. Tidied up
`log`. It now seems to print only partial quotients, though doubtless there is a counterexample. - 23rd June 2002. I coded an improved algorithm for finding with high certainty the continued fraction expansion of log
_{b}a, as expounded in the latest version of paper. Typing`log(3,2,10,100,&a[],&l)`produces the first l = 102 partial quotients a[0],...,a[101] of log_{2}3. I had to code the ceiling function`ceil(a,b)`. This is the least integer not less than a/b. - 28th March 2002. Didn't quite get it right yesterday. I now think I have fixed things.
- 27th March 2002. I noticed that
`patz(180,-1616)`was missing some fundamental solutions. Fixed the bug around line 85 of lagrange.c. - 18th January 2001. Fixed an error in
`SQROOT`in primes1.c at line 1569. Also improved the definition of SO at line 1589. The problem was only noticeable if N divided D and was composed of at least 2 primes. (Arose from typing`binform(11,-35,5,18,1)`and getting a bus error.) - 6th January 2001. Added output to file
`binform.out`for`binform(a,b,c,n,e)`. - 5th January 2001. Changed
`binform(a,b,c,n)`to`binform(a,b,c,n,e)`, where e=1 is verbose, e=0 is terse. - 5th January 2001. In
`binform(a,b,c,n)`, I now test to see if d=gcd(a,b,c) divides n; if so, a,b,c,n are replaced by a/d,b/d,c/d,n/d. Also test to see if n is nonzero. - 4th January 2001. Somehow I had not made the change e to l at line 1625 in the UNIX copy of CALC. I also deleted lines 884-893 of
`lagrange.c`, as they were not necessary and in fact resulted in an occasional extra equivalent solution. Finally, I added a test to preclude b^2-4ac 0 or a perfect square.

(The foregoing was in response to some observations of Dario Alejandro Alpern.) - 3rd January 2001. Added
`absmod(a,b)`. Also fixed a small error in`binform`(in three places, just after the calls to**EUCLID**in`lagrange.c`) where**n**was outputted with the wrong sign. - 23rd December 2000. Withdrew
`binform(a,b,c,n)`, as John Robertson has uncovered bugs. Subsequently fixed a small bug - shifted lines 721,722 to line 712. - 22nd December 2000. Redesigned and improved
`congq`. - 21st December 2000. Fixed bugs in
`congq`. Also changed e to l in lines 1625 and 1655 of primes1.c. This had caused a bus error when typing sqroot(33,96,&s[],&a,&m) twice in succession! Also noticed a memory leak at line 1644 because of the argument ZEROI().

Added`binform(a,b,c,n)`, which solves the diophantine equation ax^{2}+bxy+cy^{2}=n, where b^{2}-4ac > 0 and is not a perfect square. - 14th December 2000. Added
`congq(a,b,c,n,&s[])`, which solves the congruence ax^{2}+bx+c=0(mod n). - 13th December 2000. Tightened up
**SQROOT_W(...)**by creating**SQROOTX(...)**.

Also realised that the fix on 7th November was too severe and would occasionally result in not testing all the ±P_{0}. This necessitated a fix starting at line 86 of`lagrange.c`. - 10th December 2000. While investigating a leak of 20 bytes in
**SQROOT**, I stumbled on a serious error on line 282 of`qres.c`, where I had freed x!. This had caused CALC to hang on typing`sqroot(1,105,&s[],&m,&n)`.

I fixed the leak in the**else if (tt == 0){...}**starting at line 1573 of`primes1.c`. - 5th December 2000.
- 28th November 2000. I had somehow overlooked the degenerate case N=1 in
**SQROOT(MPI *A, MPI *N, MPIA *SOL, MPI **MODULUS, USI *lptr)**. This caused a core-dump when calling`patz(15,1)`, for example. Easily fixed by inserting a few lines of code at line 1520 of`primes1.c`. - 26th November 2000. In
`collatz.c`, deleted the**fopen**of line 109 and the**fclose**of line 206. (This was causing a core to be dumped under linux and possibly dos.) - 10th November 2000.
- 7th November 2000. After noticing that
`patz(27,18)`was testing P0=3,9 and 15, instead of just 3 and 9, I inserted a test at line 85 of`lagrange.c`to pass over any QQ > Q0. - 23rd October 2000. Fixed a bug in
`sqroot()`in primes1.c by replacing line 1565 by**S[0]=E;**. (The error only manifested itself on a Linux platform when calling`patz(8,8)`, even though S[0] was subsequently accessed on line 1580 without possibly having been initialised.) I also inserted some**FREEMPI(S[i])**loops inside the**if(l==1){}**block. - 3rd September 2000. Fixed an error on line 98 of
`lagrange.c`, where I had Q0_2 instead of Q0. The error showed up in patz(67,89). - 7th August. Changed
`log1(a,b,r,e)`to`log1(a,b,d,r,e)`, so as to give the user the chance to input any positive base d > 1. - 13th July 2000. Replaces "4" by "5" on line 72 of init.c.
- 4th July 2000. While checking the numerical examples at the end of
*On the Diophantine equation u*, Bengt Stolt, Arkiv för Matematik,^{2}-Dv^{2}=±4N**2**1-23, 1952, I uncovered three simple but important bugs in CALC: (i) in`primes1.c`: line 1651,***lptr=1;**changed to***lptr=2;**, (ii) in`lagrange.c`: line 56, formerly I had freed**M0**, then used it on line 83! Moreover I should have been using**M**instead of**M0**in**TMP2 = MULT_I(M0, j);**in line 83! - 2nd June 2000. Fixed a bug in
`sqroot`, which arose in the example`sqroot(79,42,&[],&m,&l)`. (It returned 8 instead of 4). The fix was to insert an "if" statement at line 1825 of primes1.c. Could have corrupted`patz(d,n)`. - 29th May 2000. John Robertson raised doubts concerning about my claim that a fundamental solution would be found by examining only up to the first period in the continued fractions for the quadratic irrationalities used in patz(d,n) in the case where the period length is odd. I now use the second period in this case. The changes were minimal: an extra parameter
`surd_flag`was added to`SURD()`, so that an extra period is done if and only if surd_flag = 1. Changes were also made to`SURDX()`and`PATZ()`. - 25th May 2000. Removed two errors in two print statements, improved printing of output and added printing to a file
`patz.out`. - 24th May 2000. Removed a bug on line 93 of lagrange.c, replacing
**if ( tmp)**by**if ((Q0_2)->V[0]) % 2 == 0 && tmp)**. The bug had caused`patz(5,19)`to declare (12,5) to be a fundamental solution, whereas the correct answer is (8,3). Also removed the part of the code made redundant by my new proof of necessity in patz5.pdf, which rendered unnecessary the need to look at the cases D=2 and 3, N < 0 separately. - 22nd May 2000. Tightened up wrappers for
`patz`and`cornacchia`. - 17th May 2000. Fixed a harmless memory leak of 20 bytes in CONVERGENTS, where in cases n==0 and n==1, I forgot to FREEMPI(ONE). It propagated through SURD and thence to PATZ. (This took me over 3 hours to solve!)
- 16th May 2000. Fixed a a bug in
`patz(d,n)`which occurred when N=1 (pell's equation). Only the fundamental solution with Norm(eta)=-1 had been printed. - 15th May 2000. Fixed a bug in
`sqroot`. (The global variable**sqroot2_number**in`SQROOT2()`was not always reinitialised to a default value zero after use.

Installed`patz`. This returns the positive fundamental solutions of the diophantine equation x^{2}-d*y^{2}=±1, d > 1, not a perfect square. The algorithm is from a paper of the author and is in essence due to Lagrange 1770. - 6th May 2000. Fixed a bug in
`surd`. - 4th May 2000. Improved
`surd`. Also took some wrapper functiondeclarations out of fun.h and put them in wrappers.h. Changed SURD, SURDX, SURDW_W and REDUCED. Also put global MPIA variables A_SURD, U_SURD, V_SURD in nfunc.c. - 18th April 2000. Added
`cornacchia`. Also fixed a bug in`sqroot`(on line 1532 of primes1.c`e`should have been`e+1`). - 15th April 2000.
- 14th April 2000. Made
`sqroot(a,n,&s[ ],&m)`available. - 27th March 2000. Made
`log1(a,b,r,e)`available. This is Algorithm 1 of (manuscript-pdf 152K). - 25th March 2000. Improved the algorithm for
`log(a,b,d,u,v,e)`. This is Algorithm 3 of (manuscript pdf-152K). - 20th March 2000. Changed the algorithm for
`log()`, as I realised the earlier algorithm, admittedly heuristic in nature, was not giving the right answers for log(2^{10}+1,2,2,1). (See algorithm on page 7 of*On Shanks' algorithm for computing the continued fraction of log*, Journal of Integer Sequences_{b}a**5**2002, article 02.2.7. .) - 13th March 2000. Added
`log()`. - 9th March 2000.
- 8th March 2000. Slight alteration to
`rootexp()`so as to allow the user to enter a not necessarily squarefree polynomial. (The polynomial f(X) entered is replaced by f(X)/gcd(f(X),f'(X)).) calc.tar.gz updated. - 18th February 2000. Sean Seefried fixed a bug in the error recovery for some functions when not all arguments were entered. This caused a subsequent crash when the function was subsequently called with the correct number of arguments. Files parse.y (and parse.c), calc.h and symbol.c were changed. calc.tar.gz and calc.exe.gz were updated.
- 8th February 2000. Fixed a bug in
`nprimeap`which arose in the recent updating of CALC: on line 387 of wrappers.c, FREEMPI(B) should have been FREEM PI(M). I also noticed a missing "return(NULL);" after line 749 of func.c. calc.e xe.gz was also updated. - 26th January 2000. Updated the readme in calc.exe.gz. (The description of
`euclid`contained some inaccuracies.) - 23rd January 2000. I updated calc.exe.gz. In so doing I realised that in the 20th January update, I had forgotten to include some files! Also Makefile_dos was incorrect. I believe that this is now fixed in the current version of calc.tar.gz. Also it is possible some bugs have slipped in during Sean's recent improvements to CALC. Please let me know if any are found.
- 20th January 2000. Sean has finished his work on CALC. calc.tar.gz has been updated. This now includes a DOS makefile based on the djgpp C compiler) and a file ytab.h=y.tab.h. calc.exe.gz will be updated soon.
- 14th January 2000. Progress report: Since mid-December 1999, vacation scholar Sean Seefried has been working on CALC to improve error recovery. This has now essentially been finished. Sean has also written a Sturm's algorithm and in a week's time will have used this to improve
`lagrange`so as to find the simple continued fraction of all roots of a squarefree polynomial with integer coefficients with no rational roots, using the initial part of a paper of D.G. Cantor, P.H. Galyean and H.G. Zimmer. - 26th November 1999. Some cosmetic improvements to output were made. In
`surd.out`, the periodic part is now separated from the initial segment by a colon. Also the quadratic irrational is listed at the top of the file.

The function`convergents`now outputs the arrays p[ ] and q[ ] to a file`convergents.out`.

In parse.y, line 398, <= 0 was changed to < 0.

- 28th October 1999. Removed the dependence on external files title.dat and readme, which relied on the
`more`command. title.dat has been incorporated into trial.c, while readme has been turned into readme.c, accessible inside CALC by typing`help`. A list of all CALC functions comes up and one can make a selection of a function name.

Also now when a syntax error happens, CALC now recovers better and appears no longer to hang after a serious syntax error. All that was done was to insert a call to execerror(s, ""); in yyerror(s) in parse.c. This returns the user to the command line prompt. However one is still advised to exit CALC if a syntax error occurs.

The MSDOS version calc.exe was also updated.

Also files`title.dat`and`readme`are now incorporated in the executable. - 19th October 1999. Improved
`euclid`. It now returns the quotients, remainders and also the s_{k}and t_{k}, as well as the number of steps. Files i5I.c, parse.y, parse.c and fun.h were altered.

MSDOS version was also updated. - 28th September 1999. Added
`leastqnr(p)`to CALC. This returns n_{p}, the least quadratic non-residue (mod p), if n_{p}< 65536, otherwise returns 0. MSDOS version also updated. - 2nd September 1999. Fixed a small bug in
`surd()`at line 742 of`nfunc.c`. (I had freed W a few lines too soon!) MSDOS version not yet fixed. - 29th June 1999. Added the choice of finding
*all*shortest solutions to`axb()`. - 17th May 1999. Added
`power_cubicm()`( the kth power of (X,Y) on an elliptic curve over Z_{p}),`order_cubicr()`and`order_cubicm()`, which find the order of a point P on an elliptic curve over the rationals and Z_{p}, respectively. The latter is not sophisticated and simply tests each iterate kP for k=2,... calc.exe has still not been updated since 4th Feb. - 21st March 1999. Removed a bug at the end of collatz.c. I had freed the arrays m[] by carelessly first freeing the pointer to m and then the actual m[i]!. Similarly for X[]. (The bug was passed by solaris, but linux was unforgiving and dumped a core.)
- 15th March 1999. Added
`cycle()`a cycle finding program for the generalised collatz function. (see survey (pdf)). - 4th February 1999. Added some hidden stuff on my gcd research for use by fellow researchers, but of no interest to the average calc user.
- 20th January 1999. Added a shortest lattice vector program
`slv`(). - 19th January 1999. cosmetic changes to the output of
`fp`() and`inhomfp`(). - 18th January 1999. Updated calc.tar.gz and calc.exe.gz. I improved functions
`egcd`(),`lllgcd`() and`lllgcd0`(), making it easier to get a complete list of all shortest multipliers. I also added an option to`factor`(n) whereby one can enter the number of elliptic curves used. I removed the function short() as it is no longer needed. - 18th November 1998. Updated calc.tar.gz. Fixed a bug in i5m.c in FFM, line 763. The elements c[i] may be ≥ 2
^{16}, so SHIFTLB() cannot be used. In any case I don't use FFM as my implementation seems slow. Anyone who wishes to use it should uncomment the relevant code in MULTI() in i1.c. Also I am unable to free the temporary arrays B and C in FFT because of the way the recursion acts; consequently there is a buildup of nettbytes. Any suggestions on this score are welcome.

- 4th January 1999. Now allow the user to enter arbitrary m1 and n1, as mentioned previously.
- 30th December 1998. Realized I'd forgotten to warn users of LLL-based programs that m1 and n1 are less than 2
^{16}. I will render this warning unnecessary in the near future. My misuse of this in`lllgcd`() provided a counter-example in paper HMM, with m1/n1=100001/400000, which was in fact not a counter-example after all. (100001>655536.) - 27th November 1998. The above bug seems to disappear when I compile with the -O2 option instead of -O3.
- 21st November 1998.
On factorizing (10
^{65}-1)/9, calc hung in mpqsieve.c. This turned out to be due to not observing that 100000 is not less than 2^{16}. This caused a problem on line 116 with INT0_, which is solved by introducing srange=CHANGE(SRANGE) and then using INT0 instead of INT0_. There is one bug which continues to elude me. When I factorize numbers of greater than 50 digits invoking MPQS1, while the factoring processs runs to completion, one cannot always quit gracefully and also cannot continue using calc. Thus one has to kill calc on a UNIX machine, for example. This is unsatisfactory. The problem is clearly to do with freeing and I had hoped the error lay in the 1000000 bug discovered above. But apparently not. The code is so complicated and the bug only manifests itself after 3 hours running on an Ultra Sparc machine that it seems impossible at the moment for me to detect. If any enthusiast out there has any ideas, please let me know. One example where I think it hung was in factorising the 65 digit prime formed from 64 1's with a 4 in the middle. - 20th August 1998. removed the changes just made. Did make changes to nfunc.c, i9.c, fun.h, as regards SMITHI and SMITHI1.
- 15th August 1998. Updated calc.tar.gz, because of introduction of verbose mode in SMITH() in nfunc.c and i9.c. (Changes made to fun.h well.)
- 9th August 1998. Fixed a small bug in lllhermi.c, where lines 38-39 should have been part of the body of the
`if(!keith97)`. Also updated calc.exe.gz. - 6th August 1998. Fixed a small bug in axb(), whereby -X was returned instead of X at times.
- 5th August 1998. Added a new function
`axb`(), which solves the linear system AX=B, where A,X,B have integer coefficients. - 19th June 1998. Updated calc.exe.gz.
- 10th June 1998. Deleted lines 468-469 of elliptic.c, (ie, FREEMPI(P); and FREEMPI(tmp); to avoid double freeing. Also changed j > 100 to j > 5 at line 374. Also made a slight improvement to BRENT_POLLARD as regards increasing a. calc.exe will be similarly updated soon.
- 13th May 1998. Updated calc.exe.gz.
- 9th May 1998. The only change being in mpqsieve.c, line 75, where I now use FBASE = 3000; SRANGE = 180000; TOLERANCE = 22; This enabled me to factorise 10
^{103}+1 overnight, the stumbling block hitherto being a 61 digit number.

10^{103}+1= 11*1237*44092859*984385009*102860539*612053256358933*

182725114866521155647161*1471865453993855302660887614137521979 - 3rd March 1998. Updated calc.exe.gz in case my absentmindedness had extended to calc.exe.
- 26th February 1998. I had absentmindedly not updated all the relevant source files on 10th February. This has been fixed and calc.tar.gz updated.
- 11th February 1998. Updated calc.exe.gz.
- 10th February 1998. Rewrote
`POLLARD()`. Removed segmentation error and hanging problems arising from returning (MPI *)NULL from various functions such as`POLLARD`, by altering parse.y and symbol.c at a few places, not using`FREEMPI(N)`and`COPYI(N)`when N = NULL.

`pollard()`and`perfectpower`added to list of defined functions.

- 5th February 1998. Removed the array R[1280] from inside
`EFACTOR()`and placed it in a separate file primepowers.h. This now makes elliptic.o compile much quicker.

Also created a new function`elliptic(n,m,p)`to factor n using the elliptic curve method.

- 2nd February 1998. Updated calc.exe.gz.
- 29th January 1998. Alex Balfour pointed out that factoring 10
^{100}+1 gave rise to rubbish. The cause turned out to be five global arrays Q_[50], Q[50]; Q_PRIME[50]; K_[50], K[50] in primes1.c.

Replacing 50 by 100 solves the problem. This bug will be fixed soon. I have also increased the Brent-Pollard step number from 2048 to 8192. - 19th December 1997. I changed
`lagrange(a,n,m)`to`lagrange(a,&aa[],n,m)`. Also changed`convergents(a,n,&p,&q)`to`convergents(a,&p[],&q[],n)`. Also changed the meaning of n in`euclid(a,b,&c[],&n)`, so as to be consistent with its usage in convergents and lagrange. - 18th December 1997. Also at the request of Edward Brisse, I added
`lagrange(a,n,m)`. - 15th December 1997. At the request of Edward Brisse, I added
`euclid(a,b,&c[],&n)`and`convergents(a,n,&p,&q)`. - 4th December 1997. Changed
`collatz(x)`to`collatz(x,e)`and`pell(d,&x,&y)`to`pell(d,e,&x,&y)`, so that iterates and partial quotients (respectively) are printed iff e is non zero. - 2nd December 1997. Oops - I somehow did not comment out the call to ffm inthe MSDOS version of calc, as stated on 30th July 1997.
- 10th October 1997. Updated the MSDOS executable.
- 9th October 1997. Oops! I noticed I had absentmindedly left some print statements in lllgcd.c in
`LLLGCD()`lines 89-123 which only pertained to the gcd of 3 integers, causing a problem in verbose mode for other than 3 integers. Fixed the source and the SUN executable. - 24th September 1997. Upgraded the SUN executable and file primes1.c by adding
`PERFECT_POWER(N)`. This is employed in`BIG_FACTOR(N)`to return X if N=X^{p}. A corresponding declaration was added to fun.h. (Many thanks to Lew Baxter for pointing out that calc was not factoring a perfect power.) - 30th July 1997. Upgraded the SUN and MSDOS executables on alphasun as the Fast Fourier Transform has a subtle bug. Consequently multiplication of very large numbers is now done using the brute force method.
- 8th March 1997. Changed
`lllhermite1()`to`lllhermite()`. This is the current LLL-based Hermite normal form algorithm as described off my homepage via notes.html. - 27th February 1997. Replaced the previous LLL based Hermite normal form algorithm in SUN version on alphasun by an aesthetically more satisfying version.
- 20th February 1997. Included LLL based Hermite normal form algorithm in SUN version on alphasun.
- 7th February 1997. Added a list of CALC functions that a programmer might wish to use.
- 18th September 1996. Modified
`sgcd()`to`sgcd(N)`in private version - 23rd April 1996.
`gcda(x,n)`was actually calculating the lcm. I also fixed a serious corruption of data was occurring in some functions using`FACTOR()`such as`orderm()`and`lprimroot()`.

(I was freeing stuff that had already been freed.) - 9th February 1996. Updated Sun version at alphasun (runs faster-compiled with the O2 option.
- 7th December 1995. Updated MSDOS version at alphasun.

Improved`BRENT_POLLARD()`doing something I should have done initially - ie. only computed gcd's of every accumulated 10th product.

Also now bring in the elliptic curve algorithm after 65 digits. - 6th December 1995. Removed a bug in jacobi(n,m) which only came into effect when n < 0.
- 5th November 1995: Removed a small error in
`fund(d)`when d=t^2+1, t odd. Also removed a small bug in`pell()`resulting from using the same name pell in init.c for two functions. - 10th October 1995: Added
`addcubicr()`and`powercubicr()`. - 23rd July 1995: I fixed a bug in improvep() which only came into effect if rank(A)=number of rows of A.
- 11th June 1995: I noticed
`calc`was not factoring 2^135+1- a trivial example. I increased the range of Brent-Pollard and the factor base in MPQS for numbers of < 20 digits. I also added an elliptic curve factorization algorithm in case MPQS yields nothing. - 28th May 1995: Removed a small error in
`fund(d)`when d=t^2+4.