This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: Generating Modulo and Remainder Operations


Hi Rohit,

> is there an "C" statement to generate Remainder operation.

Yes, you can use the Standard C Library routine modf (and it's companions modfl and modff).

Alternatively, for integers you can use the % operator with unsigned numbers.  (If you need to work with signed numbers, convert the signed numbers to unsigned numbers and adjust the result's sign accordingly.)

Sincerely,
--Eljay


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]