Re: result type of power operator...

From: Shalom.Bresticker@motorola.com
Date: Sat Mar 02 2002 - 11:59:02 PST


Precedence: bulk

I don't have the standard with me at the moment, but I remind all of us that
what is permitted and forbidden is only partly specified by the BNF.

In many cases, the text of the standard specifies additional restrictions.

Shalom

On Fri, 1 Mar 2002, Paul Graham wrote:

> Date: Fri, 1 Mar 2002 12:01:39 -0800 (PST)
> From: Paul Graham <pgraham@cadence.com>
> To: drm@xilinx.com
> Cc: mac@verisity.com, kurt@wsfdb.wsfdb.com, btf@boyd.com,
     Shalom Bresticker <Shalom.Bresticker@motorola.com>
> Subject: Re: result type of power operator...
>
> > At least two major simulators (XL and MTI) forbid using reals in range
> > specifications. But, the standard, as written, does seem allow it.
>
> Then the standard is wrong.
>
> I do not like the idea of always evaluating the ** operator using floating
> point arithmetic. Doesn't everyone agree that an expression like 2**N
> should be evaluated exactly the same as (1<<N), provided N is non-negative?
> Floating point exponentiation is a much more complex process, typically
> involving tables of logarithms, etc. There's no point in invoking all that
> machinery just for the sake of combining several distinct cases into one.
>
> Paul
>

-- 
Shalom Bresticker                           Shalom.Bresticker@motorola.com
Principal Staff Engineer                               Tel: +972 9 9522268
Motorola Semiconductor Israel, Ltd.                    Fax: +972 9 9522890
POB 2208, Herzlia 46120, ISRAEL                       Cell: +972 50 441478


This archive was generated by hypermail 2.1.4 : Mon Jul 08 2002 - 12:55:35 PDT and
sponsored by Boyd Technology, Inc.