What is a platform-independent way of specifying the largest representable negative floating-point number?
We found an algorithm that broke when run on a PS3's SPU, but worked fine when compiled for the PPU:
float x = -FLT_MAX;
/* stuff */
if (x > 0.0f) {
// If x is unchanged, code is executed on SPU
}
Essentially, is there a well-defined negative equivalent of FLT_MAX
?