Since you report that -3.402823E+38
is accepted but -3.40282347E+38
is not, I speculate the problem is that some software is not rounding correctly.
The least finite IEEE-754 32-bit binary floating-point value is not –3.40282347E+38, since that is an approximation. The exact value is –340282346638528859811704183484516925440, which is slightly smaller in magnitude. For brevity, I will use M for –340282346638528859811704183484516925440.
–3.40282347E+38 is between the two representable values M and –infinity. According to the IEEE-754 rules for rounding to nearest, it ought to be rounded to M if it is closer to M than it is to the next value that would continue the finite pattern instead of jumping to infinity. Since –3.40282347E+38 is closer to M than it is to that next number, the result should be M.
However, people do not always write software that rounds correctly. It is conceivable that some software observes that –3.40282347E+38 exceeds M in magnitude and returns –infinity or a range error instead of rounding it correctly.
To work around the problem, I suggest trying -3.402823466E+38
. This is less than M in magnitude but is close enough that it should round to exactly M.