[Bug libfortran/19032] modulo generates wrong result for divisor -1
Thomas dot Koenig at online dot de
gcc-bugzilla@gcc.gnu.org
Thu Dec 16 22:40:00 GMT 2004
------- Additional Comments From Thomas dot Koenig at online dot de 2004-12-16 22:40 -------
Reals are also broken:
$ cat mod-real.f90
program main
real :: a,b
a = 2.0
b = -1.0
print *,modulo(a,b)
end program main
$ gfortran mod-real.f90
$ ./a.out
-1.000000
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19032
More information about the Gcc-bugs
mailing list