Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!yale!cmcl2!kramden.acf.nyu.edu!brnstnd From: brnstnd@kramden.acf.nyu.edu (Dan Bernstein) Newsgroups: comp.lang.c Subject: Re: Message-ID: <3589:Oct2320:56:1590@kramden.acf.nyu.edu> Date: 23 Oct 90 20:56:15 GMT References: <1990Oct20.215718.15519@athena.mit.edu> <4035@goanna.cs.rmit.oz.au> Organization: IR Lines: 16 In article <4035@goanna.cs.rmit.oz.au> ok@goanna.cs.rmit.oz.au (Richard A. O'Keefe) writes: [ on controlling round-off errors ] > double degrees(int Degrees, int Minutes, int Seconds) > return ((Degrees*60.0 + Minutes)*60.0 + Seconds)/3600.0; Some machines (e.g., Convex) have a 64-bit integer, the ``long long'' type. It's better to do the base conversion in that than in 48-bit floating point. > It's best to read them as > integers. It's best to stick to integers entirely, if there's no worry of overflow. ---Dan