Yeah, it happens. I usually just write some bullsh!t code for a simple function, so I don't have to call a library (saves cpu time). Usually it's my version of the
fabs(3)() function
Code:
# include <stdio.h>
double babs (double x)
{
double re = x;
if (re < 0)
re *= (-1);
return re;
}
and hope that my inspiration returns. I call that function '
babs', after a character in the old
Beneath a Steel Sky(pe) video game... Babs was a female singer, and she was really stupid, as is this function. The game works on Linux too, so maybe I'll write a port for it

. If I don't get any inspiration, I start
procrastinating, followed by
procrastinating some more, and
procrastinating EVEN more. Wow, look at the time :e, I better stop it! Okay, I promise this is
the last one! Ouffff, that was tough!
So, I mean, that function will come in handy, but I don't really need it, since calling
fabs from the library won't be the bottleneck of the algorithm.