|
From: | grischka |
Subject: | Re: [Tinycc-devel] Question on Stack Overflow about weird rounding with tcc |
Date: | Wed, 28 Aug 2013 23:05:52 +0200 |
User-agent: | Thunderbird 2.0.0.23 (Windows/20090812) |
David Mertens wrote:
Hey everyone - I found this question from somebody use tcc v0.9.24: http://stackoverflow.com/questions/18417788/pow-cast-to-integer-unexpected-resultThe 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; }|
I found a patch on my tinycc git. http://repo.or.cz/w/tinycc.git/commitdiff/73faaea227a53e365dd75f1dba7a5071c7b5e541 --- grischka
[Prev in Thread] | Current Thread | [Next in Thread] |