MathGroup Archive 2001

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Algebraic Integers

  • To: mathgroup at
  • Subject: [mg28516] Re: Algebraic Integers
  • From: Konstantin L Kouptsov <klk206 at>
  • Date: Tue, 24 Apr 2001 01:48:51 -0400 (EDT)
  • Organization: New York University
  • References: <9bvvjt$>
  • Sender: owner-wri-mathgroup at

Thanks to all who replied. 

Considering that P can be more complex that I mentioned 
(for example 23-sqrt(17)), the solution should not use
N[] in the first place. Here is what I came up with:

P /: N[P, n_:6] := N[23 - Sqrt[17], n];

	Less[a_. + b_. P, c_. + d_. P] := 
			LessZero[(a - c) + P (b - d)];
	Less[a_, b_. + c_. P] := LessZero[(a - b) - c P];
	Less[a_. + b_. P, c_] := LessZero[(a - c) + b P];

(* This can be simply N[] or something less trivial *)
LessZero[x_] := N[x, 200] < 0 

Unprotect[Min, Max];
	Min[x_List] := First[Sort[x, Less]];
	Max[x_List] := Last[Sort[x, Less]];
Protect[Min, Max];


  • Prev by Date: Help on solving simultaneous non-linear equations using FindRoot.
  • Next by Date: Re: ListPlot with row vectors
  • Previous by thread: Re: Algebraic Integers
  • Next by thread: Re: Algebraic Integers