digitalmars.D.bugs - Compile-time floating point division
- David Friedman (15/15) May 03 2005 The following code fails for on Linux, but not Windows. Probable cause:...
- Thomas Kuehne (16/31) May 11 2005 -----BEGIN PGP SIGNED MESSAGE-----
The following code fails for on Linux, but not Windows. Probable cause:
DMD's complex_t::operator/ does not handle special cases as in
Phobos/DMC/GNU runtime libraries.
-----------
import std.math;
double f = -1.0/0.0;
double f1 = -1.0;
double f2 = 0;
int main() {
assert(isinf(f1/f2)); // passes
assert(isinf(f)); // fails
return 0;
}
----------
David
May 03 2005
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
David Friedman schrieb am Tue, 03 May 2005 20:39:02 -0400:
The following code fails for on Linux, but not Windows. Probable cause:
DMD's complex_t::operator/ does not handle special cases as in
Phobos/DMC/GNU runtime libraries.
-----------
import std.math;
double f = -1.0/0.0;
double f1 = -1.0;
double f2 = 0;
int main() {
assert(isinf(f1/f2)); // passes
assert(isinf(f)); // fails
return 0;
}
----------
David
Added to DStress as
http://dstress.kuehne.cn/run/o/opDiv_07_A.d
http://dstress.kuehne.cn/run/o/opDiv_07_B.d
http://dstress.kuehne.cn/run/o/opDiv_08_A.d
http://dstress.kuehne.cn/run/o/opDiv_08_B.d
http://dstress.kuehne.cn/run/o/opDiv_09_A.d
http://dstress.kuehne.cn/run/o/opDiv_09_B.d
Thomas
-----BEGIN PGP SIGNATURE-----
iD8DBQFCglm83w+/yD4P9tIRAo2/AJ9z40wVKHx1LfxhvrYwLyHYcVohUQCdFosB
cwjvIlUaq6h/0qQ4e3vlgIk=
=d2OR
-----END PGP SIGNATURE-----
May 11 2005








Thomas Kuehne <thomas-dloop kuehne.thisisspam.cn>