lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Rob Kendrick wrote:
On Thu, 22 Jan 2009 18:12:54 +0000
Peter Cawley <lua@corsix.org> wrote:

It is the case under Windows when using MSVCRT:

Microsoft Windows [Version 6.0.6001]
Copyright (c) 2006 Microsoft Corporation.  All rights reserved.
C:\Users\Peter>lua Lua 5.1.4 Copyright (C) 1994-2008 Lua.org, PUC-Rio
=tostring(1/0)
1.#INF

I'm trying to work out what causes this, and if it's intentional, why
it is desirable.  So far, I've failed.

The specification for strtod in IEEE Std 1003.1, 2004 says, among other things:

  * One of INF or INFINITY, ignoring case

But MSVCRT is not entirely POSIX-compatible, so no big deal, we learn to live with its quirks.

--
Cheers,
Kein-Hong Man (esq.)
Kuala Lumpur, Malaysia