[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Tinycc-devel] An issue with literal floats
From: |
Sergey Korshunoff |
Subject: |
Re: [Tinycc-devel] An issue with literal floats |
Date: |
Wed, 4 Mar 2015 16:57:22 +0300 |
Is my commit wrong?
result of the gcc:
t2a=44100313 t2b=44100313
result of the current tcc with my commit:
t2a=44100313 t2b=44100312
result of the current tcc before my commit:
t2a=44100312 t2b=44100312
But if in a test program replace
- int t2b = (int)(t1 * (float)0.25f);
+ int t2b = (int)(t1 * (double)0.25f);
then
result of the gcc:
t2a=44100313 t2b=44100313
result of the current tcc with my commit:
t2a=44100313 t2b=44100313
result of the current tcc before my commit:
t2a=44100312 t2b=44100313