s-news
[Top] [All Lists]

Summary: logical operations & double precision

To: s-news@lists.biostat.wustl.edu
Subject: Summary: logical operations & double precision
From: Yuelin Li <yuelin@mail.med.upenn.edu>
Date: Wed, 19 Sep 2001 10:34:39 -0400
Sorry about my earlier summary. It got garbled somehow. Thanks to Jerry W. Lewis, James Holtman, Alan Zaslavsky, Luciano Molinari, Andy Liaw, David L Lorenz, Frank Harrell. Frank Harrel points out that this is an IFAQ (incredibly frequently asked question). A search of the S-news archive or a google.com search should provide useful help.

The solutions include incorporating roundoff tolerance, e.g, if(abs(x-1) <= 1e-7), which I did and was hoping to avoid; or use the function round(x, digits=14) to handle the precision before comparisons.

Yuelin Li.


<Prev in Thread] Current Thread [Next in Thread>
  • Summary: logical operations & double precision, Yuelin Li <=