> Stuart Brorson wrote: > > 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:
[ snip! ] > > It turns out that *verilog* does not support % on reals. So > the bug in 0.8 is to not give an error message here. This is > worthy of a bug report. > > BTW, C doesn't support % of doubles either. OK, thanks. To close out this thread (and assist future Googlers), I found that the following works as a "modulo" operator for reals: phase = pos/6300 - $rtoi(pos/6300); Stuart _______________________________________________ geda-user mailing list geda-user@moria.seul.org http://www.seul.org/cgi-bin/mailman/listinfo/geda-user