Monthly Archives: June 2008

I’ve mentioned speed improvements in a better addition algorithm that I’m writing. I’ve already finished the parts that actually improve on the original, so I thought I’d go ahead and outline the algorithm.

Originally, this is what was done:

Input:

123.021 + 1.1

Convert input to:

123021+001100

Then loop through and add each column, carrying as necessary. The result would be 124121, and then the output function would combine that with the exponent: 124.121.

The new algorithm is based on the fact that unless both numbers have the same number of digits and the same exponent, there will be some of this “overlap”, which is what the padding eliminated in the old algorithm. But why pad with 0’s? Aren’t I just adding? Don’t I know what a number + 0 is before I calculate it? Of course.

So the new algorithm identifies which parts of the numbers would just get added to insignificant zeros (as opposed to significant zeros, like the ones in “2002″) and copies them over verbatim to the result, no calculations necessary.

For example:

Input:

123.021 + 1.1

Intermediate steps:

(copy outliers)

Result = 120.021

(perform addition, the loop described above, but only for the middle two digits)

Result = 124.121

Make sense? In this example, I cut the number of times the addition loop runs from 6 to 2! This won’t save time in all cases, but in some it will greatly improve things.

In my last post I mentioned that I was fixing a heap overflow and making speed improvements to the + function in ipfloat. Memory in C++ is stored in an interesting way. There are two main sections of memory that a programmer must worry about – the heap and the stack. (There is a global region of memory as well, but this doesn’t usually create problems, unless the program is designed poorly and data is not well encapsulated.)

The heap is “dynamic memory” – any dynamic variables get allocated in the heap. Essentially, anything created using new or malloc will get stored here. The stack is for local variables, parameters, and temporary variables (created during assignments/operations that are never explicitly created).

What was my problem? Heap overflow/corruption. This is what was happening:
Heap:
|-man-||–thisMan–||–rhsMan–|
thisMan and rhsMan were normalized with zero’s, so they became a little larger. But man must be expanded to hold the result of both of the other two, so if the difference between sizes of man and rhsMan was too great, man would overflow and corrupt thisMan. And since man was calculated from thisMan, _bad things_ would happen.

So, while 3.14159 + 2.18281 would cause no problems (man wouldn’t need to expand at all), and even something like 2.323123222312341 + 123123123.12312 would be okay, something like 0.00000000000000000001 + 123123123.123123123 would _at least_ corrupt data, if not overflow the heap altogether.

This is because 0.00000000000000000001 is actually stored in memory as [1, -20, +] and 123123123.123123123 is stored as [123123123123123123, 8, +]. This makes man=1, thisMan = 000000000000000000001, and rhsMan=123123123123123123. Man is stored _before_ thisMan, so in order to expand to fit all of the digits, it must of necessity overflow into thisMan.

How did I fix this? By completely restructuring, of course :P

This is how it works now:
Heap:
|–man–||–rhs–||—-result—-|

Now instead of copying man into a temporary variable and expanding man to hold the result, I make the temporary variable hold the result and its space is allocated _after_ the original values. No corruption!

I also reworked the addition algorithm (haven’t finished yet), to save some time. I’ll save that for another post, I’m now out of time.

I just received my transcript and my schedule for next year, so I thought I’d share them. This is going out on a limb for me, because I don’t like sharing which classes I made B’s in. I figured since this blog is supposed to be about LSMSA life, I’d go ahead with it.

8th
Algebra 1 – P (apparently this was P/F? I had no idea)

9th
Algebra 2 – B
Biology 1 – A
English 1 – A
Geometry – A
Health – A
Band – A
PE – A
Physical Science – A
World Geography – A

10th
Band – A
Advanced Math – A
American History – A
Calculus 1 – A
Chemistry 1 – A
Civics – A
Computer Science – A
English 2 – A
Free Enterprise – A

11th (LSMSA)
Adv. Progr. in C++ – A
Composition/Literature – A
German 1 – A
Chaos Theory – A
Calculus II – B
Calculus III – B
Vector Calculus – A
Fund. of Music – A
Physics III – A
Modern Algebra – A
Intro to Music Theory – B
Weight Training – A
Classical Mechanics – A

Schedule for Next Year:
Semester 1
MWF
10:00 – Weight Training
11:00 – German II
12:00 – Advanced Music Theory 1
(Monday) 6:30-9:00 – Computer Hardware

TR
8:00 – American Lit
9:25 – Kultur Tag (German II)
10:50 – Programming in Java

Semester 2
MWF
11:00 – German II
4:00 – Linear Algebra

TR
8:00 – Graph Theory
9:25 – Kultur Tag (German II)
10:50 – Brit Lit (Hall)
1:40 – Data Structures

They scheduled me for 6 and 5 classes, I signed up for 7 and 8. So I need to go get my schedule changed…

In other news, I’m rewriting the + function again. Fixed heap corruption and making speed improvements.

It’s been a while since I’ve posted because I really wanted to have something to show for myself. I finally have a completely working += function (for non-programmer types, a+=b is equivalent to a = a+b). It took longer than I expected because I kept rewriting it – I started from scratch 3 times. I kept seeing better ways to structure it to get better performance, better readability, and be able to handle all cases. In the end, it’s not perfect, I still have some optimizing to do, but that comes last. The important thing is that it’s finished and does exactly what it’s supposed to.

Also, I compiled this not only with wxDev-C++, which is the shmancy graphical IDE that I’m using for this project, but also with gnu g++ running on Cygwin. If you’ve never heard of Cygwin, you’re missing out – it’s a complete bash shell that will run in windows. I’ve successfully compiled my program in linux! (Technically unix, but it doesn’t matter in this case). I did have to write an itoa() function, which is built in on my other compiler but undefined with g++, but it was worth it.

I’m tacking the code onto the end of my post so you can look at it if you care, but I think the output is what’s important right now. To test it, I added the first 1000 digits of pi to the first 1000 digits of e. What better to test a program? Here’s the output (the beginning bits are the compilation, if you’re not familiar):


Evan@EvanLaptop ~
$ cd ipfloat
Evan@EvanLaptop ~/ipfloat
$ g++ -o iptest -O ipfloat.cpp main.cpp
Evan@EvanLaptop ~/ipfloat
$ ./iptest
ipfloat addition test program
Enter the first floating point decimal:
3.141592653589793238462643383279502884197169399375105820974944592307816406286208 99862803482534211706798214808651328230664709384460955058223172535940812848111745 02841027019385211055596446229489549303819644288109756659334461284756482337867831 65271201909145648566923460348610454326648213393607260249141273724587006606315588 17488152092096282925409171536436789259036001133053054882046652138414695194151160 94330572703657595919530921861173819326117931051185480744623799627495673518857527 24891227938183011949129833673362440656643086021394946395224737190702179860943702 77053921717629317675238467481846766940513200056812714526356082778577134275778960 91736371787214684409012249534301465495853710507922796892589235420199561121290219 60864034418159813629774771309960518707211349999998372978049951059731732816096318 59502445945534690830264252230825334468503526193118817101000313783875288658753320 83814206171776691473035982534904287554687311595628638823537875937519577818577805 321712268066130019278766111959092164201989
Enter the second floating point decimal: 2.718281828459045235360287471352662497757247093699959574966967627724076630353547 59457138217852516642742746639193200305992181741359662904357290033429526059563073 81323286279434907632338298807531952510190115738341879307021540891499348841675092 44761460668082264800168477411853742345442437107539077744992069551702761838606261 33138458300075204493382656029760673711320070932870912744374704723069697720931014 16928368190255151086574637721112523897844250569536967707854499699679468644549059 87931636889230098793127736178215424999229576351482208269895193668033182528869398 49646510582093923982948879332036250944311730123819706841614039701983767932068328 23764648042953118023287825098194558153017567173613320698112509961818815930416903 51598888519345807273866738589422879228499892086805825749279610484198444363463244 96848756023362482704197862320900216099023530436994184914631409343173814364054625 31520961836908887070167683964243781405927145635490613031072085103837505101157477 041718986106873969655212671546889570350354
The resulting number is: 5.859874482048838473822930854632165381954416493075065395941912220031893036639756 59319941700386728349540961447844528536656891125820617962580462569370338907674818 84164313298820118687934745037021501814009760026451635966356002176255831179542924 10032662577227913367091937760464196672090650501146337994133343276289768444921849 50626610392171487418791827566197462970356072065923967626421356861484392915082175 11258940893912747006105559582286343223962181620722448452478299327175142163406587 12822864827413110742257569851577865655872662372877154665119930858735362389813101 26700432299723241658187346813883017884824930180632421367970122480560902207847289 15501019830167802432300074632496023648871277681536117590701745382018377051707123 12462922937505620903641509899383397935711242086804198727329561543930177179559563 56351201968897173534462114551725550567527056630113002015631723127049103022807946 15335168008685578543203666499148068960614457231119251854609961041357082919735282 363431254173003988933978783505981734552343

Nifty, eh? I’m proud. I’ll be working on multiplication next. I think I’ll start with a schoolboy approach, O(N^2) and then try my hand at Fast Fouriers to try and get O(Nlog(N)). Actually, I’ve read that optimized approaches can get O(Nlog(log(N))), but of course that doesn’t necessarily mean a performance improvement.

In other news, I’m working out every morning now. I’ve only been to the gym three times and I’m already seeing some good strength improvements. I’ll be in amazing shape by the end of summer (and I have an exercise buddy to make sure I’m up at 6 every morning!)

Here’s the code for interested parties. I’m sorry it’s not formatted well, sooner or later I’ll get some css to work here to try and make it more readable.


ipfloat &ipfloat::operator +=(const ipfloat &rhs){
int c = 0, carry = 0, i;
char* thisMan = new char[strlen(getMan())+1];
char* rhsMan = new char[strlen(rhs.getMan()) + 1];
strcpy(thisMan, getMan());
strcpy(rhsMan, rhs.getMan());
//following code "aligns" decimals for addition.
int thisBefore, thisAfter, rhsBefore, rhsAfter;
thisBefore = (exp>=0) ? exp + 1 : 1;
thisAfter = strlen(man) - exp - 1;
rhsBefore = (rhs.getExp()>=0) ? rhs.getExp() + 1 : 1;
rhsAfter = strlen(rhs.getMan()) - rhs.getExp() - 1;
if(getExp()<0)
{
free(thisMan);
thisMan = (char*)malloc(sizeof(char)*(strlen(getMan()) - getExp() +1));
for(c = 0; c<-getExp(); c++)
thisMan[c] = '0';
thisMan[c] = '';
strcat(thisMan, getMan());
}
if(rhs.getExp()<0)
{
free(rhsMan);
rhsMan = (char*)malloc(sizeof(char)*(strlen(rhs.getMan()) - rhs.getExp()+1));
for(c = 0; c<-rhs.getExp(); c++)
rhsMan[c] = '0';
rhsMan[c] = '';
strcat(rhsMan, rhs.getMan());
}
if(thisBefore>rhsBefore)
{
char* tmp = new char[strlen(rhsMan) + 1];
strcpy(tmp, rhsMan);
free(rhsMan);
rhsMan = (char*)malloc(sizeof(char)*(strlen(rhs.getMan()) + (thisBefore - rhsBefore) + 1));
for(c = 0; c<(thisBefore-rhsBefore); c++)
rhsMan[c] = '0';
rhsMan[c] = '';
strcat(rhsMan, tmp);
}
else if(rhsBefore>thisBefore)
{
char* tmp = new char[strlen(thisMan) + 1];
strcpy(tmp, thisMan);
free(thisMan);
thisMan = (char*)malloc(sizeof(char)*(strlen(getMan()) + (rhsBefore - thisBefore) + 1));
for(c = 0; c<(rhsBefore-thisBefore); c++)
thisMan[c] = '0';
thisMan[c] = '';
strcat(thisMan, tmp);
}
if(thisAfter>rhsAfter)
{
char* tmp = new char[strlen(rhsMan) + 1];
strcpy(tmp, rhsMan);
free(rhsMan);
rhsMan = (char*)malloc(sizeof(char)*(strlen(tmp) + (thisAfter-rhsAfter) + 1));
strcpy(rhsMan, tmp);
for(c=strlen(tmp); c<strlen(tmp) + (thisAfter-rhsAfter); c++)
rhsMan[c] = '0';
rhsMan[c] = '';
}
else if(rhsAfter>thisAfter)
{
char* tmp = new char[strlen(thisMan) + 1];
strcpy(tmp, thisMan);
free(thisMan);
thisMan = (char*)malloc(sizeof(char)*(strlen(tmp) + (rhsAfter-thisAfter) + 1));
strcpy(thisMan, tmp);
for(c=strlen(tmp); c<strlen(tmp) + (rhsAfter-thisAfter); c++)
thisMan[c] = '0';
thisMan[c] = '';
}
//actually add
free(man);
man = (char*)malloc(sizeof(char)*(strlen(thisMan) + 1));
for(i = strlen(thisMan); i>=0; i--)
{
man[i] = (char)((((int)(thisMan[i] + rhsMan[i] - 2*'0')) + carry)%10) + '0';
carry = (thisMan[i] + rhsMan[i] - 2*'0' + carry >9)?1:0;
}
man[strlen(thisMan)] = '';
exp = (exp>rhs.getExp())? exp : rhs.getExp();
if(carry==1)
{
char* tmp = new char[strlen(man) + 1];
strcpy(tmp, man);
man = (char*)malloc(sizeof(char)*(strlen(tmp)+2));
man[0] = '1';
man[1] = '';
strcat(man, tmp);
exp++;
}
return *this;
}

Ich bin sehr begeistert diesen Abend!
I am very excited this evening! (Google: I am very enthusiastic about this evening!)

If you’re reading this and are considering/will be going to LSMSA, you’ll soon learn that it’s your civic duty to alert others when someone is wrong. (I may be exaggerating slightly).

Anyway, if you’ve never come across Archer Quinn’s free energy project, allow me to assist you: http://www.engadget.com/tag/archerquinn

Visiting his website is almost unbearable to read – be warned if you click on any of the links from endgadget. To help protect your eyes, I’ll just be taking small clippings and explaining the fallacies therein. Indeed, a complete rebuttal is nigh impossible due to his disorganization and terribly broken English.

Conservation of Energy Myth

Science believes that work in equal work out. The siphon itself proves this false.

If the weight of the pressure of the 5 kilos/litres of water falling its own height as it lowers was only equal to gravity of the weight falling and the pressure it took to fill it I would agree that Newton was correct, but I can fill the bucket with only the pressure required to get it just over the lip of the bucket pumped from I inch below the bucket, when I siphon it out, the pressure of the falling water is equal to the lift, standard Newtonian physics, yet I can raise the siphon to a far greater height over the lip of the bucket and still get it to run. So I have more power required to raise the water higher to empty the bucket than to fill it in the first place, and this is not provided yet it still happens, against the Newtonian laws of conservation of energy.

You cannot beat that or explain it in math.

Wanna bet? ;) I’m not even going to bother trying to translate this muddled “proof” into coherent thought. He’s making some point about the energy in a siphon not being conserved, and it’s obvious it’s just because of how he defined his system. If you take a pendulum and set it in motion, the law of conservation of energy would say that it will continue indefinitely. But this is not the case for a physical pendulum, it clearly slows and stops after a time. Aha! Energy was not conserved! Newton was wrong!

Or we simply defined our system so that we ignore the energy that went elsewhere (such as friction). Defining a system consisting only of a pendulum would make it seem that energy is not conserved, if it existed physically. If you pour water in a “kitchen sink system”, the water goes down the drain and energy is not conserved in this narrow view of the system. Of course, the water went somewhere, you just excluded the place where it went in your model of the system. If you can’t recognize the difference between a theoretical model and a physical incarnation of that model, you probably aren’t ready to tout the solution to the energy crisis.

Luckily for us, we’re provided with a handy example to aid us in understanding these new phyiscs concepts. I spent a few minutest trying to read this. It is utterly incomprehensible to me. If someone can explain what “You see whilst a suspended fulcrum still has all it weight in the same place, it can move way before a beam trying to go over the top.” means, I think I could make some more headway.

I think I’ve gained further insight into his amazing brilliance by reading his “Truth” page, which I recommend avoiding. On this page he states, “The math for vertical lift and fall is false as being equal.” Heehee. Anyway, the rest goes like this:

Is this scientifically true, yes, This is seen where two equal weights are placed on a fulcrum or wheel (try it at home with your push bike upside down), the first one sitting at 7 o’clock and the second one placed on at one o’clock and let fall, not pushed!!!, the second weight will always go past the point of balance because of momentum, it will eventually rock until it balances, but it will never slowly fall until it becomes level. If there was only M G math it would fall until both balanced, but it has enough to lift the opposing weight past the centre of the wheel and balance point. Now surely the weight of gravity acting upon the 7 o’clock weight should have as much power as that on the right ? But it does not And momentum from fall has always been the true source of free energy.

Is this scientifically true? No. I can assume that “mg math” means Newtonian Classical mechanics, and what he is saying is nothing new. A weight at 1 o’clock and 7 o’clock do not oppose each other until one is on each side of the center of the wheel, so it makes sense that the second weight would go past the center line. None of this is physically surprising. As for equal/unequal power…he didn’t back it up at all! And he mentions nothing of torque and angular momentum (for those unfamiliar, Power = Torque * Angular Momentum). Power depends on torque, torque = rxF, and with r and F the same the only difference would be the sin(theta) introduced in the cross product, which of course is different because of their different positions (remember this is the angle between r, a radius to the point of applied force, and F, which in this case is mg). No equal power for us! In no way is this unpredicted by Newtonian mechanics.

I’m running out of time now, so I’m going to do something lame. Can YOU figure out what’s wrong with the rest of his arguments on his page? I leave you with this link: http://www.surphzup.com/index.html.

What about good physics? Well, check out this abstract I just found. Does antimatter fall up or down?

Meine hässliche Schwester hat mir deines Orangensaft nicht gegeben!

My ugly sister hasn’t given me your orange juice! (Google: My ugly sister gave me your orange juice is not!)

Well I naively forgot that 0’s exist in decimal digits when writing my last incarnation of the char* constructor, so this morning I wrote a new one entirely. Yesterday I had tried to just tack things on to it to check for 0’s and make changes…but there was still one problem with it and in order to fix it would’ve required unpleasant code; the function would’ve probably been made almost completely unreadable. Unintentional obfuscation ;)

The new function has two more loops, which worries me for performance reasons, but it’s a constructor, after all, and it shouldn’t be called inside of another loop, so I should be fine. This code is pretty straightforward, I named things pretty well so most of what’s happening should be generally obvious.


ipfloat::ipfloat(char* ch)
{
int len = strlen(ch);
int i = 0, j = 0;               //i keeps place in ch, j keeps place in man
sign = (ch[0]=='-')?'-':'+';    //assign the sign :P
int startZeros = 0, trailZeros = 0, manLen, decPos, decOffset;
while(ch[i]!='' && ch[i]!='.')
i++;
decPos = i;
i=0;
while(ch[i]=='0' || ch[i]=='.')
{
startZeros++;  //this now contains 1 more than sz if theres a dec
i++;
}
i=0;
while(ch[len-1-i]=='0')
{
trailZeros++;
i++;
}
manLen = len - startZeros - trailZeros - 1;
man = (char*)malloc(sizeof(char)*(manLen+1));
for(i=startZeros; i<(startZeros+manLen+1); i++, j++)
{
if(ch[i]!='.')
man[j] = ch[i];
else
j--;
}
man[j] = '';
decOffset = (startZeros>=decPos)?0:1;
exp = decPos - startZeros - decOffset;
}

This is only 6 lines more than my old one, and a good 12 lines less than the bloated one I was trying to modify. Although floats in general didn’t break my += operator, floats with leading zeros or large fractional parts do, so I have to fix that. Should be fairly easy, since it’s just identifying what needs to change in loop bounds.

In other news, I stopped by LSMSA last night to visit. I kind of miss summer school…it would be cool to meet all the new Juniors, but I suppose I can still do that. Also, I’m going running with some guys over there at 9 tonight; I’m out of shape.

Also, for coffee drinkers: http://itcinterhome.com/mokka-not-mocha/

It’s amazing, I promise. (I’m drinking it right now.)

Springen Sie nicht über der Integralrechnung, es ist sehr schmutzig.

Do not jump over the integral calculus, it is very dirty. (Google: Goto you do not have the integral calculus, it is very dirty.)

Incidentally, it seems there’s no word just for “Calculus”, you must specify either differential or integral (Differential is Differentialrechnung). Intuitively, die Rechnung would be Calculus, but alas, it means invoice. As for Google’s weird “Goto”, I can only assume that there’s a seperable verb überspringen that means “goto”. (Nope – just checked. überspringen means “skip”, and Google is weird.)

I just finished my char* constructor, the most important one! All that’s left are double and float, but they’re just a convenience anyway, now that I have a char* constructor. They can wait. I should mention that this really wasn’t very difficult or complicated, just terribly handy. For your pleasure:

ipfloat::ipfloat(char* ch){
int i = 0, expstop, len;
len = strlen(ch);
if(ch[0] == '-')
{
sign = '-';
len -= 1; //allocate less space
i++;      //skip negative sign
}
man = (char*)malloc(sizeof(char)*len);
while(ch[i]!='.')
{
man[i] = ch[i];
i++;
}
expstop = i;
while(ch[i]!='')
{
man[i] = ch[i+1];
i++;
}
exp = expstop - 1;
}

To celebrate, I uploaded an avatar! You’ll note that a friend of mine, Steven, is rubbing my hair. This may seem strange to you, but I have very soft hair, and everyone rubs it at some point. It’s as inevitable as something that is analogously inevitable.

I thought I’d take this chance to outline my ipfloat class. I had to make a lot of tough decisions along the way, and I’m not entirely sure that I chose the best way to set up my class – but I can’t really know ahead of time what the performance will be (unfortunately).

To start with, numbers are stored in the computer as binary. They consist of a certain number of bytes, which is determined by different things like processor, operating system, and compiler. Each byte is 8 bits, which is a 0 or 1 (although, depending on the system, these can be different. Some might be 9 bits, 8 data bits and a carry bit, or 7 data bits and a carry bit – it all depends. Negatives are stored differently sometimes, too). Not all numbers can be represented exactly in binary, however, just like not all numbers can be represented as decimals (.333…). For this reason I chose to store my mantissa in decimal, and I don’t know the consequences of that yet, good or bad.

Floating point numbers are stored in parts – sign, mantissa, and exponent. Think of a floating point number in terms of scientific notation: -2.3×10^-6. In this example, the sign is ‘-’, the mantissa is 23, and the exponent is -6. For this reason, if you were to look at the code in ipfloat, some things appear strange or contradictory to what I am trying to accomplish in a function, but if you remember how everything is stored it should be fairly clear.

My addition algorithm has an asymptotic complexity of O(N). For a better explanation of what this means I would check Wiki, but broadly this gives a representation of how long the computation takes. Think of the worst case scenario in a basic search function – where the Nth term is the one you’re looking for. I use a schoolboy approach, but it may not be implemented obviously. I think I’ll need to comment it thoroughly so as not to forget myself…

Ah! I’ve just remembered that my += function does not loop. I should go fix that now. After that it’s on to multiplication! Expect a post soon of Fast Fouriers.

Der Kaffee habe ich gerade getrunken.

I have just drunk the coffee. (Google: The coffee, I have just drunk.)

First off, some praise for LSMSA, especially Mr. Jamil. I was in Barnes and Noble and while browsing the Science section, I spotted “Advanced Calculus.” It was one of those cliff-notes style, sum up the whole topic in 100 pages type things, so I picked it up and flipped through it. I knew it! It was very exciting. I skimmed the pages, and glanced through topics concerning gradients and vector operations and multiple integrals and Green’s and Stoke’s Theorem…It just makes you feel like 4 semesters of calculus was worth it. I should admit that at the end it mentioned a “Gauss’s Theorem” which I hadn’t learned…but that’s what Wiki is for, right?

I was going to talk about FFT’s and Infinite Precision here…but I choose sleep instead. And remember, I end with German…

Warum hat dein dickes Auto meine Katze gefressen?

Why has your fat car eaten my cat? (Google: Why did your big car my cat eaten? )

I started my new job today, at the National Center for Preservation Technology and Training – NCPTT. I’m helping migrate their whole website to WordPress, reformatting old content, prepping release content, and integrating with social media networks. Today I uploaded and tagged about 20 videos to Viddler, which is a service like Youtube but they allow higher quality videos and they can be much longer. I also tagged a fair number of flickr photos on ncptt’s flickr album so that they can be easily found (or, rather, found by accident).

Later on I think I’ll be doing a lot of converting of pdf’s to html, which promises to be tedius. Not much of my job isn’t tedious, but I still kind of like having something to do. LSMSA keeps you so busy all the time that summer almost feels horrible – a huge vat of empty, stress-free time. Nice at first, yes, but after a while it feels irresponsible to not be doing anything.

$0.50 an hour? Well, in a way. It’s actually volunteer work, but they reimburse my lunches ;)

Still working on my distinction. I’ve been prematurely researching Fast Fourier Transforms for my multiplication algorithm…I still have a bit of addition work to do. Well, frankly, I have to write a constructor for my ipfloat class that takes a char* array. That way I can say ipfloat var(“123.31231231234151″) and it’ll construct a nice ipfloat for me. I’ll make a post later about the details of my class.

In any case, FFT’s are really cool. I also skimmed a few articles on Discrete Fourier Transforms, the Fourier Operator, and Fourier Expansions. Fourier expansions seemed especially interesting, and from my skim they look to be the periodic-function-based equivalents to a Taylor expansion…

I think I shall need to write a very long math/computer science post soon.

Also, to keep up my German over the summer, I decided to end each post with a sentence that I make up. For fun, I’ll translate it and compare it to Google’s translation. Here goes:

Wer hat meinen schwarzen Hund genommen?

Who has taken my black dog? (Google: Who has my black dog?)