Follow-up Comment #1, bug #11751 (project wormux):

I'm the NetBSD original porter mentioned.
The original reason of the problems is that there is an asin()
calculated from an argument >1.
At that point Linux and NetBSD differ: Linux returns NaN,
while NetBSD returns 0. (OpenBSD is similar to NetBSD.)
This seems to be somewhat a grey area as far as standards
are concerned: C99 says that an implementation defined
value should be returned. POSIX says that NaN should be
returned, but also that differences to C99 are unintentional.
Anyway, even in the Linux NaN case the following code
only survives by massive luck, so it should be fixed.
I've just reworked my original patch to follow what I think
was the intention of the code: render a black border of
constant thickness around the explosion crater. I've given
it some testing, but it might be a good idea to review all
the rounding cases so that no +/- 1 problem remains.
All the asin/cos stuff could be replaced by pythagoras/sqrt
calculations as I see it, which would have the additional
advantage that on modern CPUs everything could be handled
by the SSE unit rather that the inefficient i387.

(file #4388)
    _______________________________________________________

Additional Item Attachment:

File name: patch-aa                       Size:2 KB


    _______________________________________________________

Reply to this item at:

  <http://gna.org/bugs/?11751>

_______________________________________________
  Message sent via/by Gna!
  http://gna.org/


_______________________________________________
Wormux-gna mailing list
[email protected]
https://mail.gna.org/listinfo/wormux-gna

Reply via email to