Writing programmes is easier than Mathematics.
I was confused whether I should post this thread in Mathematics section or Computer section.
Whatever,
Read this link : gambasdoc.org/help/doc/formula?view&en
Interesting stuff π
Whatever,
Read this link : gambasdoc.org/help/doc/formula?view&en
Interesting stuff π
Replies
-
rahul69I checked out this link, and I think that whoever wrote this was just having fun as a programmer π². Check out my reasoning and then tell me if I am wrong:
He wrote a small code to prove 1+2+3..= -1
and the result printed gave values -1,-1 etc..
Trick: He used two variables a and b to hold values and declared those as Integers.
Now the range of Unsigned Integers for 32 bit compiler:
-2147483648 to 2147483647.
Now to carry this out he doesnot used simple a=a+1, but a=a+b,so that when "a" printed 2147483647, b became -2147483648, and in next iteration when a+b is calculated, it gives 2147483647+(-2147483648)=-1.
Here since b's value went out of range, hence it rollbacked to least value (way by which most compilers handle out of range values)
Hence programmers rock!!ππ -
safiajen0055
Interesting to read but i have more knowledge about mathematics than programming , think math is easier tillπTroll_So_HardI was confused whether I should post this thread in Mathematics section or Computer section.
Whatever,
Read this link : gambasdoc.org/help/doc/formula?view&en
Interesting stuff π -
zaveriwriting programs and creating algorithms, does involve some analytical skills, and they can be pretty fun to do.
but i prefer solid mechanics and thermodynamics.
You are reading an archived discussion.
Related Posts
I am keen to know the programming language/languages is/are used in CE.
Yeah, I want to know all technical details, if possible then do share π
No one can give...
solar power generation with auto tracking system,how it is possible?
nano science in solar energy,is it correct?
Hey guys ,
I have decided to get a new system for Computer Graphics Rendering purposes . I would like to know your views about what processor and motherboard OR...
i want to connect java and oracle. i can create design in java and also create and insert table using sql in oracle. now i need to connect both of...
Codeproject had organized a world wide article competition to teach the App development fundamental. Here is the link for the competition.β
https://www.codeproject.com/competitions/611/Ultrabook-Article-competition
The good thing is that I finally managed...