My name is Steffen Nissen and I am developer of the fann library
(http://sourceforge.net/projects/fann/) used for this project. After
looking at the training data today, I finaly found the problem.
A mixup in the training data caused some of the inputs to be regarded as
outputs, making the training algorithm try to train for targets like 73,
which of course was impossible. This forced very high weights, making
the exp function overflow.
I plan to rewrite the sigmoid activation function to a stepwise linear
function which will solve the problem of overflow of the exp function in
the future.
I thank all the people making suggestions on how to fix the problem.