Fixed the implementation of REM for floating point types
This commit is contained in:
parent
8da136a3b6
commit
0ecb7146e4
|
@ -176,7 +176,7 @@ static inline int occam_check_retype (int src, int dest, const char *pos) {
|
||||||
if (b == 0) { \
|
if (b == 0) { \
|
||||||
occam_stop (pos, "modulo by zero"); \
|
occam_stop (pos, "modulo by zero"); \
|
||||||
} \
|
} \
|
||||||
type i = trunc (a / b); \
|
type i = round (a / b); \
|
||||||
return a - (i * b); \
|
return a - (i * b); \
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user