Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion lib/float.gi
Original file line number Diff line number Diff line change
Expand Up @@ -1058,7 +1058,19 @@ InstallMethod( \^, "for float and rational", ReturnTrue, [ IsFloat, IsRat ], -1,
end );
InstallMethod( \^, "for floats", ReturnTrue, [ IsFloat, IsFloat ], -1,
function ( x, y ) return x ^ MakeFloat(x,y); end );



InstallMethod( IsGeneratorsOfMagmaWithInverses,
"for a collection of floats (return false)",
[ IsFloatCollection ],
SUM_FLAGS, # override everything else
function( gens )
Info( InfoWarning, 1,
"no groups of floats allowed because of incompatible ^" );
return false;
end );


#############################################################################
##
#E
13 changes: 13 additions & 0 deletions tst/testbugfix/2018-03-27-float-group.tst
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Disallow creating groups with non-associative generators.
# See issue #823
gap> Group(2.0);
#I no groups of floats allowed because of incompatible ^
Error, usage: Group(<gen>,...), Group(<gens>), Group(<gens>,<id>)
gap> Group(2.0,3.0);
#I no groups of floats allowed because of incompatible ^
Error, usage: Group(<gen>,...), Group(<gens>), Group(<gens>,<id>)
gap> Group([], 1.0);
<trivial group>
gap> Group([2.0], 1.0);
#I no groups of floats allowed because of incompatible ^
Error, usage: Group(<gen>,...), Group(<gens>), Group(<gens>,<id>)