0
0
mirror of https://github.com/vim/vim.git synced 2025-07-26 11:04:33 -04:00

Fix for float values on VMS. (Zoltan Arpadffy)

This commit is contained in:
Bram Moolenaar 2010-08-09 22:07:08 +02:00
parent b61f95c31f
commit 314f11d44c

View File

@ -22,6 +22,10 @@
# include <time.h> /* for strftime() */ # include <time.h> /* for strftime() */
#endif #endif
#ifdef VMS
# include <float.h>
#endif
#ifdef MACOS #ifdef MACOS
# include <time.h> /* for time_t */ # include <time.h> /* for time_t */
#endif #endif
@ -4807,11 +4811,11 @@ eval6(arg, rettv, evaluate, want_string)
if (f2 == 0.0) if (f2 == 0.0)
{ {
if (f1 == 0) if (f1 == 0)
f1 = -0x7fffffffL - 1L; /* similar to NaN */ f1 = -1 * __F_FLT_MAX - 1L; /* similar to NaN */
else if (f1 < 0) else if (f1 < 0)
f1 = -0x7fffffffL; f1 = -1 * __F_FLT_MAX;
else else
f1 = 0x7fffffffL; f1 = __F_FLT_MAX;
} }
else else
f1 = f1 / f2; f1 = f1 / f2;