Saturday, January 10, 2009

One sad fact, with the limitations of my education: I always find myself backtracking through the "Eh, what does that mean" 'ing of things, until eventually I figure it out, or my brains stack overflows; especially a problem, since once I start I often end up exploring further. (I still remember looking up something from the 1800s for school, and ending my quest around the 1960s in Vietnam War...)


In one of my many side steps from topic matter, to trying to make heads or tails of things I see, I finally saw something that made sense:



rewritten as:



I saw something like the above earlier today, and scratched my head. Seeing the decompiled form of it, the really strange thing? I see an iterative loop much like a line of code, haha! I remember seeing a symbol like the one in the center somewhere, in reference to summation; so considering that possibility (and noting to look try and look it up later); the n above and the i=1 below the symbol, it became clear. The ci xi made sense the instant I saw it, I'm not that numb lol; it was the stuff in the center that didn't fit my comprehension.


So, if the n was the length of vectors c and x, with i so obviously being an index value >0 and < n; i=1 would have to be the first index value to use for iteration over c and x; intended to make it clear what element the slice begins at (helpful to me, since I often count from 0 to n, thank you C lol); and having already written off the funky-E as an operator meaning the find the total value of each element added together. The middle of the image became in my minds eye like some what like this:


for (i=1, n=length(c); i <= n; i++) { do a sum += c[i]; ... }
only, written sideways with lovable horizontal terseness ;-) I am reminded of a something I once read:
Mathematicians are [like] a sort of Frenchmen; if you talk to them, they translate it into their own language, and then it is immediately something quite different.
-- Johann Wolfgang von Goethe
but in this case, you could say a programmer is trying to translate math notation, into concepts he already knows as second nature lol. You know, it really would've be nice if school had thought me this stuff.

No comments:

Post a Comment