MAGIC Magic Mailing List
 
 

From: R. Timothy Edwards (tim AT stravinsky DOT jhuapl.edu)
Date: Mon Jun 24 2002 - 15:29:21 EDT

  • Next message: DR. OZI YAKUBU: "BUSINESS PROPOSAL"

    Dear Conrad,
    
       The rigorous solution should be:
    
    -----------------------------------------------------
    
    int
    FindGCF(a, b)
        int a, b;
    {
        register int a_mod_b, bp;
    
        bp = abs(b);
        if ((a_mod_b = (abs(a)) % bp) == 0) return (bp);
        else return (FindGCF(bp, a_mod_b));
    }
    
    -----------------------------------------------------
    
    Thanks for pointing out the bug.  I've never run into that problem before,
    but I guess it comes from running the greatest-common-factor routine on
    negative coordinates or something.
    
    For anyone else tuning in to the xcircuit-dev mailing list, this fix
    is to utils/fraction.c and applies only to the "magic-7.1.5" version
    found only on my website.  I made promises sometime ago to fold this
    stuff into the regular distribution sometime this month, but it's probably
    going to be a few more weeks (plus, I've got another related bug to look
    into).
    
    						Regards,
    						Tim
    


  •  
     
    Questions? Contact Rajit Manohar
    cornell logo