[Freeciv-tickets] [freeciv] #47973: relaxed ADV_WANT_EQ

アーカイブの一覧に戻る
OSDN Ticket System norep****@osdn*****
Sun May 7 11:15:11 JST 2023


#47973: relaxed ADV_WANT_EQ

  Open Date: 2023-05-01 16:10
Last Update: 2023-05-07 05:15

URL for this Ticket:
    https://osdn.net//projects/freeciv/ticket/47973
RSS feed for this Ticket:
    https://osdn.net/ticket/ticket_rss.php?group_id=12505&tid=47973

---------------------------------------------------------------------

Last Changes/Comment on this Ticket:
2023-05-07 05:15 Updated by: cazfi
 * Owner Update from (None) to cazfi
 * Resolution Update from None to Accepted
 * Component Update from Server to AI

Comment:

Patch didn't apply cleanly to S3_0. Attached version that does.

---------------------------------------------------------------------
Ticket Status:

      Reporter: (Anonymous)
         Owner: cazfi
          Type: Patches
        Status: Open [Owner assigned]
      Priority: 5 - Medium
     MileStone: 3.0.8
     Component: AI
      Severity: 5 - Medium
    Resolution: Accepted
---------------------------------------------------------------------

Ticket details:

The ADV_WANT_EQ may be too strict by comparing diff to 0.000001  (remember there are int overflows, so values may be huge)
This patch implement relative comparison  |x-y| < epsilon * (|x| + |y|)  , with epsilon =0.001 which is enough , and works also for big numbers.

-- 
Ticket information of Freeciv project
Freeciv Project is hosted on OSDN

Project URL: https://osdn.net/projects/freeciv/
OSDN: https://osdn.net

URL for this Ticket:
    https://osdn.net/projects/freeciv/ticket/47973
RSS feed for this Ticket:
    https://osdn.net/ticket/ticket_rss.php?group_id=12505&tid=47973



More information about the Freeciv-tickets mailing list
アーカイブの一覧に戻る