Suchergebnisse für Anfrage "constantfolding"

1 die antwort

Warum implementiert GCC isnan () effizienter für C ++ <cmath> als C <math.h>?

Hier ist mein Code: int f(double x) { return isnan(x); }Wenn ich#include <cmath> Ich bekomme diese Assembly: xorl %eax, %eax ucomisd %xmm0, %xmm0 setp %alDas ist einigermaßen schlau: ...

2 die antwort

Gibt es ein Konzept namens "Constant Folding" in Java?

2 die antwort

log (10.0) kann kompilieren, log (0.0) nicht?

Für den folgendenC Quellcode: #include <math.h> int main(void) { double x; x = log(0.0); return 0; }Wenn ich mit kompilieregcc -lm, Ich habe: /tmp/ccxxANVH.o: In function `main': a.c:(.text+0xd): undefined reference to `log' collect2: error: ld ...

TOP-Veröffentlichungen

4 die antwort

gcc komplexe konstante Faltung