Hello.
I've found this in vim code (compiled with -m32):
# if !defined(INFINITY)
# if defined(DBL_MAX)
# ifdef VMS
# define INFINITY DBL_MAX
# else
# define INFINITY (DBL_MAX+DBL_MAX)
# endif
# else
# define INFINITY (1.0 / 0.0)
# endif
# endif
# if !defined(NAN)
# define NAN (INFINITY-INFINITY)
# endif
This essentially defines INFINITY to DBL_MAX+DBL_MAX and
NAN as INFINITY-INFINITY.
We have #define DBL_MAX 1.7976931348623157081452E+308
And if I try to do
printf ("%f\n",NAN);
I receive "0.000000" with '-m32' and -INF wiht '-m64'.
Who is wrong here?
vim assuming that DBL_MAX + DBL_MAX is infinity? Compiler? Our headers?
--
Best regards,
Alexander Pyhalov,
system administrator of Southern Federal University IT department
-------------------------------------------
illumos-discuss
Archives: https://www.listbox.com/member/archive/182180/=now
RSS Feed: https://www.listbox.com/member/archive/rss/182180/21175430-2e6923be
Modify Your Subscription:
https://www.listbox.com/member/?member_id=21175430&id_secret=21175430-6a77cda4
Powered by Listbox: http://www.listbox.com