On Mon, Aug 21, 2017 at 10:47:24AM -0400, Joey Iverson wrote: > Dear GAP forum, > > I was recently caught off guard by the following: > > gap> Sqrt(2)<2; > false > > Now that I've read the manual more carefully, I don't think this is a > malfunction. Instead, it looks like GAP will always report irrational > cyclotomics to be larger than rationals. > > Does anybody know of a workaround that compares real numbers with their > usual ordering instead? Suppose we agree that E(n) = exp(2*pi*i/n). > > As a last resort, I suppose I could run GAP inside of SAGE and get > numerical approximations of everything, but I would like to avoid that if > possible. > > > Thanks for any advice! > > Joey Iverson > Research Associate > University of Maryland, College Park
Dear Joey, dear Forum, Comparisons of real cyclotomic numbers in the natural ordering of the reals depend on the choice of embeddings of E(n) into the complex plane. The only way I know to decide if a real cyclotomic number is positive is indeed by using numerical approximations. I have a small package http://www.math.rwth-aachen.de/~Frank.Luebeck/gap/FUtil/ which can be used as a workaround. It contains a function 'HasPositiveRealPartCyc' which decides what its name suggests. It uses numerical approximations and a simple interval arithmetic and automatically enlarges precision if needed. The function assumes the suggested embedding E(n) = exp(2*pi*i/n). Best regards, Frank -- /// Dr. Frank Lübeck, Lehrstuhl D für Mathematik, Pontdriesch 14/16, \\\ 52062 Aachen, Germany /// E-mail: frank.lueb...@math.rwth-aachen.de \\\ WWW: http://www.math.rwth-aachen.de/~Frank.Luebeck/ _______________________________________________ Forum mailing list Forum@mail.gap-system.org http://mail.gap-system.org/mailman/listinfo/forum