%description: Test double-to-long conversions: - fraction part gets truncated - if doesn't fit into a long, result is zero %activity: #define PRINT(x) {d=x; l=d; ul=d; ev << "d=" << d << ", l=" << l << ", ul=" << ul << endl;} double d; long l; unsigned long ul; PRINT(3.01) PRINT(3.99) PRINT(-3.01) PRINT(-3.99) /// overflows seemingly produce inconsistent results on linux/gcc and msvc :( // PRINT(1e100) // PRINT(-1e100) %contains: stdout d=3.01, l=3, ul=3 d=3.99, l=3, ul=3 d=-3.01, l=-3, ul=4294967293 d=-3.99, l=-3, ul=4294967293