9fans archive / 1997 / 09 / 33 / prev next
From: Jan Hubicka hubicka@hor...
Subject: [9fans] porting XaoS3.0 to plan9 (problems)
Date: Mon, 8 Sep 1997 11:47:12 +0200
Hi
yesterday I got first version of XaoS of plan9 vorking but it still has
following serious problems:
XaoS sometimes calcualtes thinks like 1.0/0.0 and expect that result will
be Inf or any other garbage. It still produces correct results. I decided
for this way because it avoids many if (x<epsilon) statements in code and
makes sources more readable and program faster.
Problem is that plan9 (unlike UNIXes) generates floating point exception
in this cases. It is possible to ignore this exception (I know that plan9
has notes instead of signals, is there any note for SIGFPE?)
Best case is of course to set coprocesor into ignoring mode, if there is
any way to do that, it should be much faster, since it avoids unnecesary
SIGFPES.
Another problem is with compiler. XaoS became really fatware(tm) at least
from plan9 point of view (it is approx. 400 kb long and acid thinks that
it is X source :( I will try to make it smaller. But main XaoS loops are
generated by large coprocessor construction, where I always define FORMULA
to formula I want and then include another file that generates custom
internal loop code for this formula. I know that it is not plan9 way to
do thinks, but speed is really significant for XaoS, so I sometimes vote
for speed instead of simplicity/elegancy when required. At this file
8c crases with message that starts with <eof>. (I can send you full
text of this message tommorow). When I uncoment last 5 formulas everything
works, so problem don't seems to be in included file source nor in
formulas (since they compiles well at all other platform). So do you have
any idea what caused this problem?
BTW how does typedefs in plan9 works? Why code
#ifndef AAA
#define AAA
typedef double test;
#endif
won't work when included twice?
BTW is there any users of XaoS for plan9? or I am making this port just
for my own fun? :)
Honza
--
------------------------------------------------------------------------------
Have you browsed my www pages? Look at:
http://www.paru.cas.cz/~hubicka
Koules-the game for Svgalib,X11 and OS/2, Xonix-the game for X11
czech documentation for linux index, original 2D computer art and
funny 100 years old photos and articles are there!