oscartheduckin’ around

September 15, 2007

sometimes you burn

Filed under: C — oscartheduck @ 2:23 am

So, I’m accomplishing a long time dream and learning C.

Unfortunately, I’m learning it for an employer. Who has a pressing need for it.

I learned the first portion of what they need, how to use the mpi libraries to implement parallel programming. I thought that was tough, but it seems simple right now.  Because the second task is discovering the minimum of a graph.

This might be easy for some people out there, but I’m a sys admin, not a programmer. I’ve got no idea where to go for this.

My first idea was to say okay, let’s have a test function, say, f(x)=x^2. Simple, no problems.

Now, I start with an interval I am given.  It is abitrary, could be -100 to 7000.

I’ve tried many things. Many many things. I’m having a tough time.

My current idea was to set the lower bound and the upper bound to variables, then to change what those variables contain depending upon whether a generated f(x) was closer to one or the other. But that doesn’t work if we start off with with a lowest generated value that’s way too high.

I just cracked open Numerical Recipes in C to see what help that can give me.

Wish me luck…

Advertisements

Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Blog at WordPress.com.

%d bloggers like this: