Q: Union and precision.
- To: mathgroup at smc.vnet.net
- Subject: [mg8529] Q: Union and precision.
- From: Gadi Oron <oron at manet.pmmh.espci.fr>
- Date: Thu, 4 Sep 1997 02:20:33 -0400
- Organization: Acces regional Ile-de-France (Univ. Paris VI/VII) - France
- Sender: owner-wri-mathgroup at wolfram.com
Hello again, How can I force Union to consider numbers equal in the current precision as equal? Explanation: In:= a=SetPrecision[1.234567,2] Out:= 1.2 In:= b=SetPrecision[1.234561,2] (* Notice difference *) Out:= 1.2 In:= a==b Out:= True In:= Union[{a,b}] Out:= {1.2,1.2} (* !!! *) How does Union evaluates equalities? How can I force it to do it the right way?? Thanx. /\/\/\/\/\/\/\/\/\/\/\/>> Gadi ORON <<\/\/\/\/\/\/\/\/\/\/\/\/\ | EMAIL : oron at pmmh.espci.fr :::: oron at clipper.ens.fr | | Homepage : http://pmmh.espci.fr/~oron/personal.html | | fido : 2:325/302.8 | | Soyez braves - be brave. | /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/