#47973: relaxed ADV_WANT_EQ Open Date: 2023-05-01 16:10 Last Update: 2023-05-09 06:43 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-09 06:43 Updated by: cazfi * Status Update from Open to Closed * Resolution Update from Accepted to Fixed --------------------------------------------------------------------- Ticket Status: Reporter: (Anonymous) Owner: cazfi Type: Patches Status: Closed Priority: 5 - Medium MileStone: 3.0.8 Component: AI Severity: 5 - Medium Resolution: Fixed --------------------------------------------------------------------- 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