p-nand-q.com | home | computer | humor | business | pictures | about

humor

Coding in style

On this page, you will find some very fine routines, free for personal use. All routines are based on C++ Sourcecode, although you are encouraged to port them to Java2K as a fun and rewarding holiday occupation.

String Pattern Matching

This is a very fine subroutine for string pattern matching, which features

Quicksort

This is a very fine implementation of that popular sorting algorithm "QuickSort". I have another implementation that is a bit less readable, and I will post it on this site in a few days..

Fibonacci

This is a reference implementation for that typical newbie-2-recursive-functions favourite, Fibonacci. Note the exensive use of GOTOs as the main program logic.

PI

This will calculate the number PI to an arbitrary number of digits (currently being ported to 100% pure Java2K.

BIGMULT

I wrote several version of a program that will multiply two arbitrarily [I think there is some character too much in the word "arbitrarily", but I do not have enough willpower to look up a dictionary right now], ok, two numbers that can be as large as you like, and multiply them. Here they are: