Skip to content
Back to formatted view

Raw Message

Message-ID: <493EACB7.6080601@uottawa.ca>
Date: 2008-12-09T17:36:55Z
From: John C Nash
Subject: Was Logical inconsistency - algorithm portability
In-Reply-To: <mailman.29.1228820405.5539.r-help@r-project.org>

The "logical inconsistency" thread has wandered a bit and discussion now veers towards portability of algorithms. On that subject, I have off-list been sharing ideas about the existence of functions to ensure optimizing compilers do not corrupt logical tests in numerical methods. Apparently the "volatile" adjective may have a role here (I am generally a "visiting programmer" in C, doing just enough to get things to work, and cribbing other folks' code). 

One need is for a function that ensures the stored representation of numbers is returned, call it "STORED", so that one can test if STORED(x) == STORED(y). Various hacks can do this. One time we used an array of length 2. But hacks are generally ugly and vulnerable to updates in compilers, so a properly written and documented function would be helpful. And, of course, may already exist. 

As this is not a short-term help request but a long term need, I suggest contacting me off list about this subject.

Cheers,JN