gEDA-user: Iverilog-0.8.2 -- does it support % for reals?
Stuart Brorson
sdb at cloud9.net
Mon Jul 24 13:41:53 EDT 2006
As the subject line says -- I am using Icarus Verilog 0.8.2. I am
getting bad results using the modulo operator for reals. Here's an
example:
// declaration of variables
real pos;
real foo;
// other stuff occurs before here. . .
foo = pos % 6300;
$display(pos, " ", foo);
For me, foo is consistently zero. Here's some output:
2449.200000 0.000000
2480.600000 0.000000
2512.200000 0.000000
2544.000000 0.000000
Can somebody confirm that Icarus supports/doesn't support the modulo
operator for reals? I'm very willing to believe that my problem has
to do with my head being wedged, but I just want to make sure that
Icarus supports the operation I want to perform.
Stuart
More information about the geda-user
mailing list