For my very first homework in C++ (about half a year ago) I was asked to write a program that computes the exponential function. Up till now I was never fully satisfied by my former solution. So here is the ultimate version. A little late, but anyhow.
WeiredExponent is a program that combines a maximum of system incompatibility and user frustration potential with a minimum of calculation speed and reliability. It is a little C++ program that computes the exponential function from a number passed to it as a command line argument. However, none of the calculation steps is actually preformed by C++ code. Instead, it forks children that use Java, Fortran, Pascal and Python to carry out small pieces of work. — Each in a very inefficient way. Nevertheless, the program gets the correct results and there is no code that isn’t used. (Such like
a += 0;.)
To run it, you’ll need:
- a C++ compiler
- the JDK
- the Fortran 90 compiler from the GCC
- the Pascal compiler from the GCC
- a Python interpreter
WeiredExponent is of course Free Software. This means, that if you open the window and — as loud as you can — shout out: “Hello world!” then you can freely use it for any purpose you want. It is not very recommended to use WeiredExponent in important exams or as dog food. The author of this software is not responsible for bad marks, neither he is for sick dogs.