Complete.Org: Mailing Lists: Archives: freeciv-dev: September 2002:
[Freeciv-Dev] Re: "division by zero" error during compilation (PR#1954)
Home

[Freeciv-Dev] Re: "division by zero" error during compilation (PR#1954)

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: "Ross W. Wetmore" <rwetmore@xxxxxxxxxxxx>
Cc: Jason Short <jdorje@xxxxxxxxxxxxxxxxxxxxx>, freeciv-dev@xxxxxxxxxxx, bugs@xxxxxxxxxxxxxxxxxxx
Subject: [Freeciv-Dev] Re: "division by zero" error during compilation (PR#1954)
From: Raimar Falke <rf13@xxxxxxxxxxxxxxxxx>
Date: Sat, 14 Sep 2002 18:38:57 +0200

On Sat, Sep 14, 2002 at 11:53:39AM -0400, Ross W. Wetmore wrote:
> At 04:41 PM 02/09/13 +0200, Raimar Falke wrote:
> >On Fri, Sep 13, 2002 at 10:34:15AM -0400, Ross W. Wetmore wrote:
> >> 
> >> Note, the poor interface and implementation for the macro is the problem,
> >> not anything fundamental.
> >
> >Yes the implementation was the problem.
> >
> >> The macro has a clean safe form in the corecleanups which use rotationally
> >> ordered directions. Here the interface defines any value which can be
> >> wrapped to a 2*pi range or the distinct circular subset of points denoting
> >> adjacent tiles in this implementation.
> >
> >No comment about the rotationally ordered directions.
> 
> It is too bad you never really mastered how they work and tune out
> at the buzzword stage. The above interface comments apply to the 
> array-ordered directions as well with the same benefits, just improving 
> the implementation along the same lines as in the corecleanups. 
> 
> >> The safe version is also much faster than the "iterate over all
> >> possibilities and choose one" approach which clearly has scalability
> >> problems extending itself to infinitely wrapped ranges.
> >
> >We are still talking about DIR_CW? There is no iteration. You may mean
> >base_get_direction_for_step?!
> 
> Just because you unrolled the DIR_CW iteration into a montrous hardcoded
> construct doesn't mean you avoided the "iterate and choose" approach 
> or don't have the scalability problems :-).

You know the callers of dir_cw? Which of these callers are
high-profile?

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx
 "Any sufficiently advanced technology is indistinguishable from magic."
    -- Arthur C. Clarke


[Prev in Thread] Current Thread [Next in Thread]