chicken-hackers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Chicken-hackers] Is this rewrite rule for fxmod correct in C5?


From: megane
Subject: [Chicken-hackers] Is this rewrite rule for fxmod correct in C5?
Date: Fri, 17 Aug 2018 14:08:26 +0300
User-agent: mu4e 1.0; emacs 25.1.1

Hi,

I just found out that fxmod has been changed to work like 'modulo' in
C5. (Well actually I found out that fxmod doesn't work like modulo in C4)

However, in C5, there's this rule in c-backend.scm:

(rewrite 'chicken.fixnum#fxmod 17 2 "C_fixnum_modulo"
"C_u_fixnum_modulo")

Here's the definition:
#define C_u_fixnum_modulo(n1, n2)       (C_fix(C_unfix(n1) %
C_unfix(n2)))

The two functions work differently.

Is this correct?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]