Moment, macht mich nicht wirre:
Function prototype (z.B):
double tan( double zahl );Gibt's nur eine Erklärung:hmmm,
aber
x = (double) tan( ( double ) 1.0 );
gibt er auch 0 aus....
Er hat ( double ) 1.0 gecastet, d.h. 8 Byte
d.s. im Intel-Format (Low sign. first)
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x3f
das gibt nur NULL, wenn er jetzt nur das single (float) davon liest, also die ersten 4
0x00, 0x00, 0x00, 0x00
und das entspricht single 0.0
und dann ist der tangens auch null
also ---> function prototype <nix passt> library
edit : mit gewohnheit hatt das nix zu tun
Lesezeichen