Skip to content

Commit

Permalink
Optimize normalization expression -- thanks David Schaich
Browse files Browse the repository at this point in the history
  • Loading branch information
detar committed Jan 28, 2021
1 parent 9bdbe9a commit cf1cd3d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion generic_pg/monte.c
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,8 @@ b3=1/(Real)3;
vsq = v0*v0 + v1*v1 + v2*v2 + v3*v3;
z = sqrt((double)vsq );
/* Normalize u */
v0 = v0/z; v1 = v1/z; v2 = v2/z; v3 = v3/z;
Real y = 1./z;
v0 = v0*y; v1 = v1*y; v2 = v2*y; v3 = v3*y;

/* end norm check--trial SU(2) matrix is a0 + i a(j)sigma(j)*/

Expand Down

0 comments on commit cf1cd3d

Please sign in to comment.