[Fwd] Re: arithmetic surprise?

From: <edaorg_at_.....>
Date: Mon Jan 30 2006 - 01:18:53 PST
From: Jonathan David <jb_david@yahoo.com>

I put the issue up on the white board with one of my
systems engineers and asked him what the answer was..
His first question was "whats the type of "ii"? On
answering "integer" he replied "zero".. so it may not
be intuitive to all but its intuitive to many. (he
writes a lot more Matlab than Verilog-A)..
Jonathan


--- "Geoffrey.Coram" <Geoffrey.Coram@analog.com>
wrote:

> I agree it's probably not useful; it probably arises
> because the
> C compiler does "integer division" and we can't
> change that.
> 
> Would certainly be worth adding to a "lint" checker
> for Verilog-A.
> 
> -Geoffrey
> 
> 
> "Muranyi, Arpad" wrote:
> > 
> > Sorry for asking this question, but is this
> > "integer division" really a useful thing?
> > It seems that it causes a lot of confusion
> > and headache for many people...  One can
> > always use the expression floor(1/2) to get
> > the desired result, if that is what is
> > expected instead of the normal math result
> > that most everyone would intuitively expect.
> > 
> > Arpad
> 



----- End Included Message -----
Received on Mon Jan 30 01:19:47 2006

This archive was generated by hypermail 2.1.8 : Mon Jan 30 2006 - 01:21:02 PST