diff --git a/ChangeLog.txt b/ChangeLog.txt index ead178b..91eb80d 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -1,3 +1,12 @@ +029. 2022-12-03 20:41:17 v1.2.6 + + Fix a bug in formatRepMat which returns Indeterminate: + (-1+I)/4*((2+2*I)*(-1)^(11/12)+I*Sqrt[2]+Sqrt[6])//formatRepMat + An example affected by this is the following MSGCorep function: + showMLGCorep[{222, 100},{-1/3,2/3,1/4},"trace"->True] + The reason is that Simplify can not simplify the above number which is indeed 0. + Just change the Simplify in formatRepMat to FullSimplify to fix it. + 028. 2022-11-25 22:42:44 v1.2.5 Add a function showBandRep to show the result of getBandRep. diff --git a/SpaceGroupIrep.wl b/SpaceGroupIrep.wl index eb80f9f..a1d1b29 100644 --- a/SpaceGroupIrep.wl +++ b/SpaceGroupIrep.wl @@ -10,7 +10,7 @@ (* Mathematica version: >=11.2 *) (* License: GPLv3 http://www.gnu.org/licenses/gpl-3.0.txt *) -SpaceGroupIrep`Private`Version={1,2,5}; (*Specify version here.*) +SpaceGroupIrep`Private`Version={1,2,6}; (*Specify version here.*) With[{p=DirectoryName[$InputFileName]}, If[!MemberQ[$Path,p],AppendTo[$Path, p]]]; @@ -4200,7 +4200,7 @@ formatRepMat[mat_]:=Module[{norm,arg,fl,pu,poth,num}, If[MachineNumberQ[mat], Return[Round[mat,1.*^-6]]]; num=formatRepMatDict[mat]; If[num=!=None, Return[num]]; - num=Simplify[mat]; + num=FullSimplify[mat]; If[Flatten[Position[num,#]&/@{t\:2081,t\:2082,t\:2083}]!={}, formatRepMatDict[mat]=num; Return[num]]; If[Position[num,u]=={}, norm=Norm[num]//FullSimplify; arg=Arg[num]//FullSimplify;