| From | Sent On | Attachments |
|---|---|---|
| luigi.rensinghoff | Jun 25, 2004 5:25 am | |
| Frank Barknecht | Jun 25, 2004 5:57 am | |
| Krzysztof Czaja | Jun 25, 2004 6:18 am | |
| guenter geiger | Jun 25, 2004 6:26 am | |
| Frank Barknecht | Jun 25, 2004 7:26 am | |
| guenter geiger | Jun 25, 2004 9:31 am | |
| guenter geiger | Jun 25, 2004 1:13 pm | |
| Krzysztof Czaja | Jun 26, 2004 8:14 am | |
| Frank Barknecht | Jun 26, 2004 10:04 am | |
| Thomas Grill | Jun 26, 2004 10:17 am | |
| Tim Blechmann | Jun 26, 2004 11:37 am | |
| Tim Blechmann | Jun 26, 2004 12:59 pm | |
| Thomas Grill | Jun 27, 2004 4:11 am |
| Subject: | Re: [PD] Lost at compilig cyclone ;-(((( | |
|---|---|---|
| From: | Thomas Grill (gr...@grrrr.org) | |
| Date: | Jun 26, 2004 10:17:26 am | |
| List: | at.iem.pd-list | |
Hi all,
am i right suspecting that only the first half of the PD_BADFLOAT macro is optimized away? (because otherwise the optimizer were buggy, weren't it?) Then, there's another possibility to test for almost denormals, suggested on the musicdsp site:
#define IS_ALMOST_DENORMAL(f) (fabs(f) < 3.e-34)
probably that's not much slower on modern cpus... should be profiled though
best, Thomas
----- Original Message ----- From: "Krzysztof Czaja" <cza...@chopin.edu.pl> To: "guenter geiger" <gei...@xdv.org> Cc: <pd-l...@iem.at> Sent: Saturday, June 26, 2004 5:14 PM Subject: Re: [PD] Lost at compilig cyclone ;-((((
hi Guenter,
this fails, though:
int result[25];
void pass1(void) { int i; float f = 0.0001, *fp = &f;
for (i=0;i<25;i++) { *fp*=0.0001; if (PD_BADFLOAT(*fp)) result[i] = 1; else result[i] = 0; } }
void pass2(void) { int i; float f = 0.0001; for (i=0;i<25;i++) { f*=0.0001; if (result[i]) printf("%d badfloat %g %08x\n",i,f,*(int*)&f); else printf("%d goodfloat %g %08x\n",i,f,*(int*)&f); } }
If compiled with "gcc-3.3 -O6...", you will get:
... 8 goodfloat 9.99995e-41 000116c2 9 goodfloat 9.80909e-45 00000007 ...
while without "-O6" it works ok. The bottom line is, that I do not know the rules (if there are any).
Krzysztof
guenter geiger wrote: ...
I just tested this with gcc 3.3.4 from Debian and it seems to work.
_______________________________________________ PD-list mailing list PD-l...@iem.at to manage your subscription (including un-subscription) see http://iem.at/cgi-bin/mailman/listinfo/pd-list





