Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - AngelFish

Pages: 1 ... 18 19 [20] 21 22 ... 215
286
Lua / Re: TNS and ZIP file differences
« on: October 19, 2011, 02:23:06 am »
Is the tns file 512 byte aligned? That might be your error right there.

287
Humour and Jokes / Re: Dilbert: "We could only program with 0s"
« on: October 18, 2011, 05:07:31 pm »
This comic is funny, because any program with nothing but 0s does absolutely nothing

Hehe, maybe on z80. SuperH will throw an exception and run an error handler if you feed it nothing but 0's. The error handler will then beam you into the Tron world (using the Organic Virtualization module available as standard on SuperH's) and proceed to torture you mercilessly until you apologize for feeding the processor bad opcodes.

288
Math and Science / Re: Algorithmic differentiation for dummies
« on: October 17, 2011, 10:25:30 pm »
The trigonometric functions are actually exponential functions hiding behind fancy symbols. Also, thanks for pointing that error in Case 9 out. Typo :P

289
ASM / Re: Unknown problem with add two numbers program
« on: October 17, 2011, 09:29:44 pm »
One thing I notice is that _DispHL is called just before _ClrLCDFull. Are you sure _getkey is blocking?

290
Introduce Yourself! / Re: Hello, Omnimaga!
« on: October 17, 2011, 08:56:50 pm »
That's the gist of it. Anything else you'd like to know?

Do you like Lobster Buttered or plain?

291
Math and Science / Algorithmic differentiation for dummies
« on: October 17, 2011, 08:52:31 pm »
The following is incomplete. I'll finish it later when I'm not so busy. This was posted so that I wouldn't lose the entire thing midway through due to a freak accident

Spoiler For Spoiler:
Welcome to what I hope to be the first of several tutorials on Algorithms for Computer Algebra. I've seen several people express an interest in the subject for the purposes of learning how to write a CAS, so I thought I'd share one of the most commonly desired algorithms: Symbolic Differentiation. As we all learn in Calculus, Differentiation is the operation of finding the function describing the slope of a curve at any point along that curve. There are many different ways of doing this, all of which are equivalent. Some involve heuristic rules, such as those taught in standard Calculus, while others might involve insane projections onto new spaces, simplifying the differentiation operation dramatically. However, Diffferentiation is almost always done in what is called the Euclidean plane (the XY plane we all hate know and love), so that's where this tutorial will focus.

Symbolic math in Computer Programming often relies quite heavily on String manipulations. Differentiation is no different. Keep in mind while reading this that familiar operations such as Addition may not be as simple as using the available CPU addition instructions.

Differentiation is an excellent example of a difficult problem to implement in software. When one first tackles it, the immediate problem one encounters is how to represent functions so that the operation can be written and tested. This is precisely the wrong way to go about solving it. Let us first go back to class and see how we learned how to differentiate on paper.

If you took the same classes I did, then you learned to differentiate through the use of limits. The derivation probably went something like this:

Let the derivative be the slope of the curve at a point (X,Y). We will denote the change in x at (X,Y) as Δx and the change in y at (X,Y) as Δy. If the curve is linear, then the slope at (X,Y) is



Next, let us observe that many functions are approximately linear in the neighborhood near a point. If we substitute h for Δx and g for Δy, then for a curve f(x)=y, the slope at a point is approximately


As we make h and g smaller and smaller, the approximation becomes closer and closer to the true tangent. To do this, we take the limit as h goes to 0 (meaning g also goes to 0).



Thus, we have arrived at the geometric definition of a derivative. However, it's completely useless for computers. Finding limits is hard; harder than finding a derivative in fact (particularly for multivariate functions, where limits become extremely difficult to determine). We need a new method to try.

Another method is more algorithmic and algebraic in nature. It's typically taught in the middle of the first semester of Calculus and involves the use of rules. Rules such as the Product rule (d/dx f(x)g(x) = f(x)g'(x)+f'(x)g(x) ) as used to break functions down into simpler components. These methods were the basis of the original Symbolic Differentiation programs and remain important today. For our algorithm, we'll be using several rules: the Product Rule, the Chain Rule, the Power Rule, the Logarithmic Differentiation method, the Constant Rule, and the Addition Rule.  These will be used to break the function down into simpler parts.

Rules table:

d/dx h(x) = ?

Case 1: h(x) = C*f(x)
d/dx h(x) = C * d/dx f(x)

Case 2: h(x) = xn
d/dx h(x) = nxn-1 except when n=0

Case 3: h(x) = f(x)+g(x)
d/dx h(x) = d/dx f(x) + d/dx g(x)

Case 4:  h(x) = f(x)g(x)
d/dx h(x) = f(x)g'(x)+f'(x)g(x)

Case 5:  h(x) = f(x)/g(x)
d/dx h(x) = h(x)( f'(x)/f(x) - g'(x)/g(x) )

Case 6:  h(x) = f(x)g(x)
d/dx h(x) = ( f(x)g(x)-1 )g(x)f'(x)+f(x)g(x)Loge(f(x))g'(x)

Case 7: h(x) = Loge(f(x))
d/dx h(x) = f'(x)/f(x)

Case 8: h(x) = C
d/dx h(x) = 0

This covers all elementary functions, so any function that can be input can be differentiated using these rules.

Let's try an example:

h(x) = xLoge(x)
h(x) = f(x)g(x) where f(x) = x and g(x) = Loge(x).
d/dx h(x) = f(x)g'(x)+f'(x)g(x)
d/dx h(x) = x(1/x)+1*(Loge(x))
d/dx h(x) = 1+Loge(x)



292
Computer Usage and Setup Help / Re: Windows 8! Problems....
« on: October 17, 2011, 03:41:27 pm »
I've already tried and uninstalled Windows 8 ;)

I'll wait for it to be stabilized before I try again.

293
General Calculator Help / Re: TIMER for TI-nspire HELP !!!
« on: October 17, 2011, 03:02:05 pm »
Just as a side note, would you both mind cutting down on the size of your sigs by putting the pictures in spoiler tags or something? They're very large in proportion to the size of your posts.

294
Computer Usage and Setup Help / Re: Windows 8! Problems....
« on: October 17, 2011, 02:28:28 pm »
When I saw this topic title I seriously thought of Windows 40320 O.O

Can I haz downloadz 4 windoz 8! plz?

295
Miscellaneous / Re: Math Apps
« on: October 17, 2011, 02:24:05 pm »


It's actually impossible to prove irrationality using only the data provided by the calculator since it can't represent irrational numbers with the OS supported data types. You're going to have to solve the problems yourself. Luckily, it's very easy.

Irrational numbers are those numbers that can't be represented as a/b, where a and b are integers. Rational numbers are everything else. Every square root of a number that is not a perfect square is irrational, along with pi and e. Integers are those numbers that have 0's after the decimal point. Negative integers are integers that have a negative sign (I seriously hope you can identify a negative sign). Everything that isn't irrational or an integer can be considered Rational, which for your purposes means it has a decimal component.

296
Miscellaneous / Re: So what is everyone up to?
« on: October 16, 2011, 11:57:15 pm »
I'm working on homework, school projects, Minecraft, and sleep. Mostly the projects part. I've also been planning a tutorial that I may decide to write when my schedule clears up.

297
Miscellaneous / Re: how to improve my crysis 2 speeds?
« on: October 16, 2011, 06:37:21 pm »
Yeah Crysis is definitively extremely demanding on memory. My i7 computer with 8 GB of RAM and 1.5 GB of video memory can't even run it at playable speed if I set shading above medium quality.
That's messed up D:
games of those kind of quality should stay in console, not computer.

Computers tend to have higher specs than consoles. I'm not aware of any popular consoles with the CPU power for Crysis at high res.

298
Miscellaneous / Re: Which language should I use?
« on: October 16, 2011, 04:47:01 pm »
Given that, Java seems like the way to go, since it really is a universal standard on almost all devices with any sort of CPU.

299
Miscellaneous / Re: Which language should I use?
« on: October 16, 2011, 04:44:51 pm »
How much speed do you actually need? Java can produce somewhat fast games like Minecraft if you're willing to devote enough CPU to it and you can obfuscate the compiled bytecode to prevent [simple] reverse engineering to make it closed source.

300
Miscellaneous / Re: Let's hack some votes
« on: October 15, 2011, 10:22:02 pm »
Unfortunately, yes.

Pages: 1 ... 18 19 [20] 21 22 ... 215