-
Notifications
You must be signed in to change notification settings - Fork 160
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fixed ImaginaryPart
for quaternion algebras
#2938
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks correct.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems to fix the issue, thanks!
gap> List( gens, RealPart ); | ||
[ e, 0*e, 0*e, 0*e ] | ||
gap> List( gens, ImaginaryPart ) * gens[2]; | ||
[ 0*e, i, j, k ] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A slightly more extensive test could test the identity claimed by the manual; based on #2801:
...
gap> vecs := Concatenation( gens, [ Sum( gens ) ] );
[ e, i, j, k, e+i+j+k ]
gap> ForAll( vecs, v -> (v + ComplexConjugate( v )) / 2 = RealPart(v) );
true
gap> ForAll( vecs, v -> (v - ComplexConjugate( v )) / (2*gens[2]) = ImaginaryPart(v) );
true
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
O.k., I have extended the test.
c4c9765
to
eed628a
Compare
Codecov Report
@@ Coverage Diff @@
## master #2938 +/- ##
==========================================
+ Coverage 83.8% 83.8% +<.01%
==========================================
Files 681 681
Lines 346794 346748 -46
==========================================
- Hits 290627 290595 -32
+ Misses 56167 56153 -14
|
Fixes #2801.