Skip to content

Commit 154a0db

Browse files
authored
Avoid some uses of Log resp. LogInt (#52)
1 parent 3e1ea42 commit 154a0db

File tree

2 files changed

+9
-11
lines changed

2 files changed

+9
-11
lines changed

lib/group.gi

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -463,11 +463,9 @@ InstallMethod( ProjElWithFrob,
463463

464464
# figure out a field which contains the matrices and admits the
465465
# automorphisms (nontrivially)
466-
dim := Lcm(
467-
LogInt(Size(matrixfield),mchar),
468-
LogInt(Size(frobfield),fchar)
469-
);
470-
return ProjElWithFrob( m, frob, GF(mchar^dim) );
466+
dim := LcmInt(DegreeOverPrimeField(matrixfield),
467+
DegreeOverPrimeField(frobfield));
468+
return ProjElWithFrob(m, frob, GF(mchar^dim));
471469
end);
472470

473471
# CHECKED 5/09/11 jdb
@@ -535,7 +533,7 @@ InstallMethod( ProjElsWithFrob,
535533
[IsList],
536534
function( l )
537535
local matrixfield, frobfield, mchar, fchar, oldchar, f, dim, m, objectlist;
538-
if(IsEmpty(l)) then
536+
if IsEmpty(l) then
539537
return [];
540538
fi;
541539
dim := 1;
@@ -557,8 +555,8 @@ InstallMethod( ProjElsWithFrob,
557555
# so that it contains all the matrices and admits all the automorphisms
558556
# (nontrivially.)
559557

560-
dim := Lcm( dim, LogInt(Size(matrixfield),mchar),
561-
LogInt(Size(frobfield),fchar));
558+
dim := LcmInt(dim, DegreeOverPrimeField(matrixfield));
559+
dim := LcmInt(dim, DegreeOverPrimeField(frobfield));
562560
od;
563561

564562
f := GF(oldchar ^ dim);
@@ -2477,7 +2475,7 @@ InstallMethod( CanonicalQuadraticForm,
24772475
od;
24782476
p := Characteristic(f);
24792477
q := Size(f);
2480-
if IsOddInt(Log(q, p)) then
2478+
if IsOddInt(DegreeOverPrimeField(f)) then
24812479
m[2,2] := one;
24822480
else
24832481
R := PolynomialRing( f, 1 );
@@ -3019,7 +3017,7 @@ InstallMethod( GammaOplus, [IsPosInt, IsField and IsFinite],
30193017
Add(gens, ProjElWithFrob( IdentityMat(d, f), frob, f ));
30203018
g := GroupWithGenerators( gens );
30213019
SetName( g, Concatenation("PGammaO+(",String(d),",",String(q),")") );
3022-
SetSize( g, Log(q, Characteristic(f)) * Size(deltao) );
3020+
SetSize( g, DegreeOverPrimeField(f) * Size(deltao) );
30233021
return g;
30243022
end );
30253023

lib/morphisms.gi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3509,7 +3509,7 @@ InstallMethod( NaturalDualityHermitian,
35093509
id := IdentityMat(4,f);
35103510
id6 := IdentityMat(6,f);
35113511
special := List([1..6],i->id6[7-i]);
3512-
i := Log(q,Characteristic(f));
3512+
i := DegreeOverPrimeField(f)/2;
35133513
theta := FrobeniusAutomorphism(f)^i;
35143514

35153515
if IsCanonicalPolarSpace( h ) then

0 commit comments

Comments
 (0)