From: Lawrence D'O. <ld...@ge...> - 2014-08-26 09:04:13
|
On Mon, 25 Aug 2014 21:13:01 +0200, Elio Blanca wrote: > Checking errno at first is not my preferred way to go. Who said anything about checking errno? > Of course, the value into `rmn' is small enough to be ok into a > signed int but the issue lies in intermediate calculation, > overflowing very fast (the multiplication comes from the `rmn' > formula). The answer is to use floating point for the calculation. While we’re at it, get rid of the unwieldy use of times(2) and substitute time(2) instead. Whole-second accuracy is all we need. |