Suchergebnisse für Anfrage "constantfolding"
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: ...
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 ...