function reference

C

Chris Chiasson

Hello, I'm a newbie here so I apologize for any lameness in advance.

I was reading

http://www.library.cornell.edu/nr/bookcpdf/c10-2.pdf

while trying to implement Brent's method in another language
(Mathematica).

However, I have no idea what the SHFT function does.

Will someone point me to a good online function reference for C,
preferably one that documents this SHFT function?

Thank you for your time,
 
T

Thomas J. Gritzan

Chris said:
Hello, I'm a newbie here so I apologize for any lameness in advance.

I was reading

http://www.library.cornell.edu/nr/bookcpdf/c10-2.pdf

while trying to implement Brent's method in another language
(Mathematica).

However, I have no idea what the SHFT function does.

Will someone point me to a good online function reference for C,
preferably one that documents this SHFT function?

There is not SHFT function in C. It is a macro defined on page 404 of the pdf.
 
M

Michael

Chris said:
Hello, I'm a newbie here so I apologize for any lameness in advance.

I was reading

http://www.library.cornell.edu/nr/bookcpdf/c10-2.pdf

while trying to implement Brent's method in another language
(Mathematica).

However, I have no idea what the SHFT function does.

Will someone point me to a good online function reference for C,
preferably one that documents this SHFT function?

Thank you for your time,

Good reference: The C Programming Language, by Kernighan and Ritchie.
Actually, make that great reference.

SHFT is not standard. It's defined as a macro in the program you
reference by the line:
#define SHFT(a,b,c,d) (a)=(b);(b)=(c);(c)=(d);

So in other words, SHFT(a, b, c, d) does:
a = b;
b = c;
c = d;

The extra parentheses (in the #define) are needed for macros. You can
read all about it elsewhere.

Hope this helps.

Michael
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,074
Latest member
StanleyFra

Latest Threads

Top