Jump to content
Eternal Lands Official Forums
Sign in to follow this  
dragburn

2+2=5?

Recommended Posts

sadly i've forgotten the way to make 2+2=5. i remember it is a complex calculus equation though...

Share this post


Link to post
Share on other sites

there's an easy way if you're a computer programmer

 

print (int)2.6 + (int)2.6 = (int)(2.6 + 2.6)

 

what the (int) does is makes it only use the integer part of the number, ie (int)2.6 comes out as 2, and (int)5.2 comes out as 5

Share this post


Link to post
Share on other sites
are you like a genius or something

182356[/snapback]

erm... who?

Share this post


Link to post
Share on other sites

if you are asking me then about a year from now i will (unless some freak accident that turns me into a retard happens) be a member of Mensa. :)

Share this post


Link to post
Share on other sites
are you like a genius or something

182356[/snapback]

That just means he knows how to program :)

 

Integers (or int's) are numbers without a decimal place. Programming languages have integers, but because they cannot contain decimals, the use of casting ( (int)2.5 for example) is necessary for the code to compile; as 2.5 is not an integer :P

Share this post


Link to post
Share on other sites

btw is that BASIC? decided i should probably learn programing and the print command kinda has led me to believe it is.

Share this post


Link to post
Share on other sites
btw is that BASIC? decided i should probably learn programing and the print command kinda has led me to believe it is.

183029[/snapback]

 

casting from int = c/c++ =)

Share this post


Link to post
Share on other sites

Please note that not all languages allow you to assign what type of string/number/char they are...for example BASH shells cripting :P But..you can always strip otu everythign past .blablabla ...

 

Not being able to assign variable types can be both good and bad in programing/scripting :S It can simplify thigns, yet make them much harder in another way.

 

I'm curiouse about that calculus equation he mentioned...mmm

 

EDIT: Before someoen starts arguing with me...yes variables are one type or another in BASH and other languages that do variables like it, BUT you can't make it so that your variable will be an interger, char, string, etc no matter what like you can wiht C/C++ .

Edited by chatterbug89

Share this post


Link to post
Share on other sites

if i could remember that stupid equation i could quit work and hang out at the bar and make lots of money by betting them as they stagger out... :P

Share this post


Link to post
Share on other sites
Please note that not all languages allow you to assign what type of string/number/char they are...for example BASH shells cripting :mace:  But..you can always strip otu everythign past .blablabla ...

 

Not being able to assign variable types can be both good and bad in programing/scripting :S  It can simplify thigns, yet make them much harder in another way.

 

I'm curiouse about that calculus equation he mentioned...mmm

 

EDIT: Before someoen starts arguing with me...yes variables are one type or another in BASH and other languages that do variables like it, BUT you can't make it so that your variable will be an interger, char, string, etc no matter what like you can wiht C/C++ .

183077[/snapback]

Ummmm, thats because its a type-less SCRIPTING language....o,0

 

 

Zep: casting FROM an int? you mean from a double or float....:icon13: Also, that could have been Java, but I doubt tt would be brave enough :)

Share this post


Link to post
Share on other sites
:P Also, that could have been Java, but I doubt tt would be brave enough :P

183546[/snapback]

first year and a half at uni here... java. only now are we finally doing some C++ (w/ QT)

I know it's valid in any of those languages and possibly others though

Share this post


Link to post
Share on other sites
sadly i've forgotten the way to make 2+2=5. i remember it is a complex calculus equation though...

182291[/snapback]

So far I've only found this site, but the calculations don't get more complex than "when a 2-knot rope is put together with another 2-knot rope, a 5-knot rope results", and 2 + 2 is more like 5 than 4, because by "putting 2 male rabbits plus 2 female rabbits in the same cage, he ended up with considerably more than 4 rabbits". :P:)

Share this post


Link to post
Share on other sites

I have a friend who has taken Calc 2 and says that it is possible to make 1 = 2 but it requires dividing by 0. I don't understand much of anything when he talks about math...

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×