tinycc-devel
[Top][All Lists]
Advanced

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

[Tinycc-devel] Question on Stack Overflow about weird rounding with tcc


From: David Mertens
Subject: [Tinycc-devel] Question on Stack Overflow about weird rounding with tcc
Date: Tue, 27 Aug 2013 17:06:34 -0400

Hey everyone -

I found this question from somebody use tcc v0.9.24:

http://stackoverflow.com/questions/18417788/pow-cast-to-integer-unexpected-result

The basic question is, "Why does tcc's compilation output (100, 99) whereas other compilers output (100, 100)?"

#include <stdio.h>
#include <math.h>

int main(void)
{
    printf("%d, ", (int) pow(10, 2));
    printf("%d", (int) pow(10, 2));
    return 0;
}


reply via email to

[Prev in Thread] Current Thread [Next in Thread]