lua-users home
lua-l archive

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


I use mingw gcc 4.8.1. using print format %f:

#include <stdio.h>
#include <stdlib.h>

int main()
{
    float a = 1;
    while(1)
    {
        a = a*10;
        printf("a is %f\n",a);
    }
    return 0;
}


On Tue, May 12, 2015 at 11:32 PM, Dirk Laurie <dirk.laurie@gmail.com> wrote:
2015-05-13 2:55 GMT+02:00 Milind Gupta <milind.gupta@gmail.com>:
> On Tue, May 12, 2015 at 5:51 PM, Coda Highland <chighland@gmail.com> wrote:
>>
>> Lua stores floats in their native format. There is no difference
>> between a C 1.#INF00 and a Lua inf.
>>
> Yes I was already assuming that. I meant was that printf displays 1.#INF00
> while lua print displays inf.

My C version (gcc version 4.8.2) displays inf with print format "%.e".
What compiler and print format do you use?