From 0ecb7146e450726415d81d1e04be3be7082ffe13 Mon Sep 17 00:00:00 2001 From: Neil Brown Date: Wed, 27 Feb 2008 20:56:13 +0000 Subject: [PATCH] Fixed the implementation of REM for floating point types --- tock_support.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tock_support.h b/tock_support.h index 2a52fdd..e11a617 100644 --- a/tock_support.h +++ b/tock_support.h @@ -176,7 +176,7 @@ static inline int occam_check_retype (int src, int dest, const char *pos) { if (b == 0) { \ occam_stop (pos, "modulo by zero"); \ } \ - type i = trunc (a / b); \ + type i = round (a / b); \ return a - (i * b); \ }