[MITgcm-devel] testreports broken on SunOS

Ed Hill ed at eh3.com
Mon Jan 31 09:56:13 EST 2005


On Mon, 2005-01-31 at 09:48 -0500, chris hill wrote:
> The way to do this portably in C is to create a function called nint() 
> that uses a combination of ceil() and floor()!


Or just add 0.5 so that:

  ans = INT(log10(relerr) + 0.5)

and I'll check this in since its very portable.

Ed

-- 
Edward H. Hill III, PhD
office:  MIT Dept. of EAPS;  Rm 54-1424;  77 Massachusetts Ave.
             Cambridge, MA 02139-4307
emails:  eh3 at mit.edu                ed at eh3.com
URLs:    http://web.mit.edu/eh3/    http://eh3.com/
phone:   617-253-0098
fax:     617-253-4464




More information about the MITgcm-devel mailing list