[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
gEDA-user: Iverilog-0.8.2 -- does it support % for reals?
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
_______________________________________________
geda-user mailing list
geda-user@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user