thanks a lot for the help, the union finally worked. However i couldn't get it to work with your syntax, it kept giving me 'x' undeclared, first use in this function errors, but I found another...
Type: Posts; User: 0xa4
thanks a lot for the help, the union finally worked. However i couldn't get it to work with your syntax, it kept giving me 'x' undeclared, first use in this function errors, but I found another...
I'm sorry, I didn't clearly explain what I want to achieve. I want to want to manipulate the bit representation of a double, not cast the actual value to a long integer. I will now look into this...
I'm a beginner to C. Is it correct to just cross out the extern?
to brewbuck:
long is 64 bits, could you please help me to improve this piece of code?
I've written this little sample program to illustrate the problem:
1 #include <stdio.h>
2 #include <stdlib.h>
3
4 int main()
5 {
6 double a = 2.3492e8,b;
7 extern...
thanks for clarifying the thing with the optimization, the information on pow also helps a lot
btw. I also think that people got cleverer in the last 300 years but apparently Newton's method (or...
that's complicated...
could you please tell me whether the basic algorithm behind it is the newton method or whether it is something else, which means that the C developers are cleverer than Newton,...
I'd like to know what algorithms are used for the C implementations of these functions (sqrt and pow (actually I'm only interested in pow to calculate nth roots, i.e. with exponents 1/n)). I tried to...