[fpc-devel] [patch] ucomplex cln() bug
jimis at gmx.net
Fri Jul 28 20:38:52 CEST 2006
as my fractal-drawing program was not working for a long time, after digging
deeper and deeper I discovered a bug in ucomplex.h. Actually the cln()
implementation is wrong, which I noticed after comparing to other source code
available on the web. I attach the patch fixing it.
Given the chance, I would like also to ask some things about this unit. It is
not documented or even mentioned anywhere, so it was pretty hard to find it
in the first place. So is this unit considered an official part of fpc?
Moreover, why are functions named in a C-like manner (cpow, cmod, csin)? Since
we have function overloading, wouldn't it be nicer if they were named after
math's unit functions (power, abs, sin)?
Finally, after reading the fpc sources for the first time, I noticed a lot of
preprocessor stuff inside the implementation part, which reminds of ugly C
code! In particular the following construct is seen all over the place,
making the code harder to read:
I understand the importance of these constructs, but it would be nice if
somehow they were not there. Could they be moved to other files? Could they
be only in the interface part? Any other ideas?
Thanks in advance,
P.S. Ofcourse I can send patches fixing some of the stuff I mentioned. My
purpose is only to raise discussion to see if such changes are desirable.
Sorry if I'm being offensive.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 555 bytes
Desc: not available
More information about the fpc-devel