what's the max value for a real ??

Quote:

>> I am writing a filter in Verilog with real variables.

>> In Verilog, aren't real variables 64 bits, giving them

>> a range of like +/- 1.0E32 or something ??

>> A few of my filter coefficients have values like 1.8E+22.

>> Thanks very much.

>> Sent via Deja.com http://www.deja.com/

>> Before you buy.

>Real numbers in Verilog are exactly the IEEE 754 (I think) standard,

>and hence are the same things you get in FORTRAN or C for double

>precision or double, respectively; and hence your range is from

>1.7976E+308 to 2.2250E-308, assuming you stick with normaized numbers.

Correct me if I'm wrong, but I don't think the LRM has anything to say

about real numbers. The closest it gets is specifying that arithmetic

operators should treat reals as "signed, floating point", which

doesn't mean much. I can't see anywhere where the minimum range of a

real is given. The bibliography references 754, but I don't know why.

In practice, the compiler vendor will code up reals in the format used

by the processor, which will be IEEE754 in all the cases I know of, so

you can probably assume you've got single-precision 754 if nothing

else.

Evan