IsOdd: Bug?
Torsten Anders
torsten.anders at plymouth.ac.uk
Mon Mar 17 20:03:20 CET 2008
Dear all,
the function IsOdd currently always returns false for negative
numbers. Is there some reason for this? Otherwise I would change the
current implementation
fun {IsOdd X} X mod 2 == 1 end
into
fun {IsOdd X} {Abs X mod 2} == 1 end
Thanks!
Best
Torsten
PS: thanks to Wolfgang for his code navigator: finding the source of
IsOdd only took a single key stroke :)
More information about the mozart-hackers
mailing list