Re: result type of power operator...

From: Paul Graham (pgraham@cadence.com)
Date: Fri Mar 01 2002 - 12:01:39 PST


Precedence: bulk

> 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



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