RE: Definition of integer division

From: Bresticker, Shalom <shalom.bresticker_at_.....>
Date: Wed Dec 14 2005 - 01:31:38 PST
Note that integer division performs truncation, not rounding.

 

Shalom

 

________________________________

From: owner-verilog-ams@eda.org [mailto:owner-verilog-ams@eda.org] On
Behalf Of Marq Kole
Sent: Wednesday, December 14, 2005 11:01 AM
To: verilog-ams@eda.org
Subject: Re: Definition of integer division

 


Arpad, 

My guess would be #1; in case of a non-exact division the correct (and
consistent) rounding should be defined, assuming the result will also be
an integer. Both others are more straightforward in that the result does
not have to be an integer, so simply promoting the integer operand to a
real will solve those cases. 

Regards, 
Marq 


Marq Kole
Competence Leader Analog Simulation, Philips ED&T










"Muranyi, Arpad" <arpad.muranyi@intel.com> 

Sent by: 
owner-verilog-ams@eda.org 

14-12-2005 08:32 

To

<verilog-ams@eda.org> 

cc

 

Subject

Definition of integer division 

Classification

 

 

 

 




I am trying to figure out from the v2.2 LRM what the
definition of "integer division" is.  This appears
three times in the LRM, but it really doesn't say what
it is.

Which one of these is/are considered integer division:

1)   integer / integer
2)   real / integer
3)   integer / real

Thanks,

Arpad
=====================================================
Received on Wed Dec 14 01:31:48 2005

This archive was generated by hypermail 2.1.8 : Wed Dec 14 2005 - 01:31:52 PST