Skip to content

Commit

Permalink
Uploaded the sources for version 5.0beta
Browse files Browse the repository at this point in the history
  • Loading branch information
vermaseren committed Apr 4, 2023
1 parent 3626a4a commit 1d4b775
Show file tree
Hide file tree
Showing 79 changed files with 4,994 additions and 1,101 deletions.
363 changes: 326 additions & 37 deletions doc/manual/diagrams.tex

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions doc/manual/man.tex
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@
\input{external}
\input{spectators}
\input{diagrams}
\input{float.tex}
%
\printindex

Expand Down
69 changes: 46 additions & 23 deletions sources/argument.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

/* #[ License : */
/*
* Copyright (C) 1984-2022 J.A.M. Vermaseren
* Copyright (C) 1984-2017 J.A.M. Vermaseren
* When using this file you are requested to refer to the publication
* J.A.M.Vermaseren "New features of FORM" math-ph/0010025
* This is considered a matter of courtesy as the development was paid
Expand Down Expand Up @@ -158,9 +158,14 @@ WORD execarg(PHEAD WORD *term, WORD level)
}
RightNum:
if ( m[1] == 2 ) {
m += 2;
m += *m;
goto HaveTodo;
#ifdef WITHFLOAT
if ( *t != FLOATFUN || AT.aux_ == 0 || TestFloat(t) == 0 )
#endif
{
m += 2;
m += *m;
goto HaveTodo;
}
}
else {
r = m + m[1];
Expand Down Expand Up @@ -525,7 +530,7 @@ ScaledVariety:;
}
/*
We generate a statement for adapting all terms in the
argument successively
argument sucessively
*/
r4 = AddRHS(AT.ebufnum,1);
while ( (r4+j+12) > CC->Top ) r4 = DoubleCbuffer(AT.ebufnum,r4,3);
Expand Down Expand Up @@ -1139,35 +1144,35 @@ ScaledVariety:;
EAscrat = (UWORD *)(TermMalloc("execarg"));
if ( t + *t == r3 ) {
if ( factor == 0 || *factor > 2 ) {
if ( pow > 0 ) {
if ( pow > 0 ) {
*r1++ = -SNUMBER; *r1++ = -1;
t = r5;
while ( t < r3 ) {
t += *t; t[-1] = -t[-1];
}
}
t = rr; *r1++ = *t++; *r1++ = 1; t++;
COPYARG(r1,t);
while ( t < m ) *r1++ = *t++;
}
t = rr; *r1++ = *t++; *r1++ = 1; t++;
COPYARG(r1,t);
while ( t < m ) *r1++ = *t++;
}
}
else {
GETSTOP(t,r6);
ngcd = t[t[0]-1];
i = abs(ngcd)-1;
while ( --i >= 0 ) EAscrat[i] = r6[i];
t += *t;
while ( t < r3 ) {
GETSTOP(t,r6);
ngcd = t[t[0]-1];
i = abs(ngcd)-1;
while ( --i >= 0 ) EAscrat[i] = r6[i];
t += *t;
while ( t < r3 ) {
GETSTOP(t,r6);
i = t[t[0]-1];
if ( AccumGCD(BHEAD EAscrat,&ngcd,(UWORD *)r6,i) ) goto execargerr;
if ( ngcd == 3 && EAscrat[0] == 1 && EAscrat[1] == 1 ) break;
t += *t;
}
}
/*
if ( ngcd != 3 || EAscrat[0] != 1 || EAscrat[1] != 1 ) {
if ( ngcd != 3 || EAscrat[0] != 1 || EAscrat[1] != 1 )
*/
{
{
if ( pow ) ngcd = -ngcd;
t = r5; r9 = r1; *r1++ = t[-ARGHEAD]; *r1++ = 1;
FILLARG(r1); ngcd = REDLENG(ngcd);
Expand Down Expand Up @@ -1215,9 +1220,26 @@ ScaledVariety:;
if ( ToFast(r9,r9) ) r1 = r9+2;
}
}
}
}
/*
#] Numerical factor :
#] Numerical factor :
else {
onetermnew:;
if ( factor == 0 || *factor > 2 ) {
if ( pow > 0 ) {
*r1++ = -SNUMBER; *r1++ = -1;
t = r5;
while ( t < r3 ) {
t += *t; t[-1] = -t[-1];
}
}
t = rr; *r1++ = *t++; *r1++ = 1; t++;
COPYARG(r1,t);
while ( t < m ) *r1++ = *t++;
}
}
onetermnew:;
*/
}
TermFree(EAscrat,"execarg");
Expand Down Expand Up @@ -1689,6 +1711,7 @@ oneterm:;
}
} /* AC.OldFactArgFlag */
}
/* r1 is fout in ons voorbeeld. */
r2[1] = r1 - r2;
action = 1;
v[2] = DIRTYFLAG;
Expand All @@ -1707,7 +1730,7 @@ oneterm:;
if ( AT.WorkPointer < t ) AT.WorkPointer = t;
}
/*
#] FACTARG :
#] FACTARG :
*/
AR.Cnumlhs = oldnumlhs;
if ( action && Normalize(BHEAD term) ) goto execargerr;
Expand All @@ -1726,7 +1749,7 @@ oneterm:;
}

/*
#] execarg :
#] execarg :
#[ execterm :
*/

Expand Down
2 changes: 1 addition & 1 deletion sources/bugtool.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

/* #[ License : */
/*
* Copyright (C) 1984-2022 J.A.M. Vermaseren
* Copyright (C) 1984-2017 J.A.M. Vermaseren
* When using this file you are requested to refer to the publication
* J.A.M.Vermaseren "New features of FORM" math-ph/0010025
* This is considered a matter of courtesy as the development was paid
Expand Down
14 changes: 7 additions & 7 deletions sources/checkpoint.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
#] Explanations :
#[ License :
*
* Copyright (C) 1984-2022 J.A.M. Vermaseren
* Copyright (C) 1984-2017 J.A.M. Vermaseren
* When using this file you are requested to refer to the publication
* J.A.M.Vermaseren "New features of FORM" math-ph/0010025
* This is considered a matter of courtesy as the development was paid
Expand Down Expand Up @@ -275,7 +275,7 @@ static int PF_CheckRecoveryFile()
}
#endif

int CheckRecoveryFile()
int CheckRecoveryFile(VOID)
{
int ret = 0;
#ifdef WITHMPI
Expand Down Expand Up @@ -330,7 +330,7 @@ int CheckRecoveryFile()
* Deletes the recovery files. It is called by CleanUp() in the case of a
* successful completion.
*/
void DeleteRecoveryFile()
void DeleteRecoveryFile(VOID)
{
if ( done_snapshot ) {
remove(recoveryfile);
Expand Down Expand Up @@ -361,7 +361,7 @@ void DeleteRecoveryFile()
/**
* Returns pointer to recovery filename.
*/
char *RecoveryFilename()
char *RecoveryFilename(VOID)
{
return(recoveryfile);
}
Expand Down Expand Up @@ -396,7 +396,7 @@ static char *InitName(char *str, char *ext)
* This functions should only be called once to avoid memory leaks and after
* AM.TempDir has been initialized.
*/
void InitRecovery()
void InitRecovery(VOID)
{
int lenpath = AM.TempDir ? strlen((char*)AM.TempDir)+1 : 0;
#ifdef WITHMPI
Expand Down Expand Up @@ -2343,9 +2343,9 @@ int DoRecovery(int *moduletype)
R_SET(AR.SortType, WORD);
R_SET(AR.ShortSortCount, WORD);

/* this is usually done in Process(), but sometimes FORM does not
/* this is usually done in Process(), but sometimes FORM doesn't
end up executing Process() before it uses the AR.CompressPointer,
so we need to explicitly set it here. */
so we need to explicitely set it here. */
AR.CompressPointer = AR.CompressBuffer;

#ifdef WITHPTHREADS
Expand Down
Loading

0 comments on commit 1d4b775

Please sign in to comment.