+infinity and -infinity?

Hi all,
I'm new to Arduino and was wondering how to set a variable to +infinity or -infinity or get something along the same lines. Using this for alpha beta pruning. Thanks a lot!

was wondering how to set a variable to +infinity or -infinity

char *variable = "+infinity";

is one way.

Some context might even provide an answer that made sense.

Using this for alpha beta pruning.

Say what?

aaronjohnsonx:
Hi all,
I'm new to Arduino and was wondering how to set a variable to +infinity or -infinity or get something along the same lines. Using this for alpha beta pruning. Thanks a lot!

What type of variable did you have in mind ? :slight_smile:

What type of variable did you have in mind ?

signed long long long long long long long long long long long long long long long long long long long long long longaleph

If this is an integer, infinity is not very infinite! You can use the defines in limits.h, for example:

INT_MAX

(For negative infinity you have INT_MIN)

FLT_MAX

and so on

AWOL:

What type of variable did you have in mind ?

signed long long long long long long long long long long long long long long long long long long long long long longaleph

Now we have the type sorted out we need a name for the variable. buzzLightyear, perhaps.

@Keith: Helpful. The rest of you: The poor guy's first post and you probably sent him running scared into some cave and we'll never see him again. Perhaps we should let someone's first post pass unscathed. After that, especially if it's clear the poster hasn't read the stickies, then they are fair game.

Alpha beta pruning suggests a passing acquaintance with computing terms.

@AWOL: Don't see how that affects the way he's treated here on his first post. Knowing computer terms doesn't make one bullet proof. Paul, especially, has a gift for making comments that I really enjoy reading. However, people who are new to this forum need to know that, if they play by the Rules, they can get valuable insight on whatever problems they face. I just don't want to discourage the OP from returning here when they need help.