Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Download

GAP 4.8.9 installation with standard packages -- copy to your CoCalc project to get it

563580 views
1
#include "typedef.h"
2
#include "getput.h"
3
#include "matrix.h"
4
5
6
/**************************************************************************\
7
@---------------------------------------------------------------------------
8
@---------------------------------------------------------------------------
9
@ FILE: put_order.c
10
@---------------------------------------------------------------------------
11
@---------------------------------------------------------------------------
12
@
13
\**************************************************************************/
14
15
/**************************************************************************\
16
@---------------------------------------------------------------------------
17
@ void fput_order(outfile, divisors, ord)
18
@ FILE *outfile;
19
@ int *divisors;
20
@ int ord;
21
@ A tools to print the order of a bravais_TYP
22
@---------------------------------------------------------------------------
23
@
24
\**************************************************************************/
25
void fput_order(outfile, divisors, ord)
26
FILE *outfile;
27
int *divisors;
28
int ord;
29
{
30
int tester, i, j;
31
if(divisors == NULL)
32
{
33
if(ord <= 0)
34
fprintf(outfile, "%% order of the group unknown\n");
35
else
36
fprintf(outfile, " = %d %% order of the group\n", ord);
37
}
38
else
39
{
40
tester = FALSE;
41
if(divisors[0] != 0)
42
fprintf(outfile, "%% order of the group unknown\n");
43
else
44
{
45
for(i=0; i<100 && tester == FALSE; i++)
46
if(divisors[i] != 0)
47
tester = TRUE;
48
if(tester == FALSE && ord == 0)
49
fprintf(outfile, "%% order of the group unknown\n");
50
if(tester == TRUE)
51
{
52
j = 0;
53
for(i=2; i<100; i++)
54
{
55
if(divisors[i] != 0)
56
{
57
if(j != 0)
58
fprintf(outfile, "* ");
59
fprintf(outfile, "%d^%d ", i, divisors[i]);
60
j = 1;
61
}
62
}
63
if(ord != 0)
64
fprintf(outfile, " = %d ", ord);
65
fprintf(outfile, "%% order of the group\n");
66
}
67
}
68
}
69
}
70
71
72
/*{{{}}}*/
73
74