Ignore:
Timestamp:
Apr 13, 2016, 5:40:32 PM (9 years ago)
Author:
Aaron Moss <a3moss@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, ctor, deferred_resn, demangler, enum, forall-pointer-decay, gc_noraii, jacob/cs343-translation, jenkins-sandbox, master, memory, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, string, with_gc
Children:
02af22de
Parents:
02ad3f5 (diff), 45161b4d (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' of plg.uwaterloo.ca:software/cfa/cfa-cc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/libcfa/rational.c

    r02ad3f5 rb11fac4  
    1111// Created On       : Wed Apr  6 17:54:28 2016
    1212// Last Modified By : Peter A. Buhr
    13 // Last Modified On : Fri Apr  8 17:35:05 2016
    14 // Update Count     : 18
     13// Last Modified On : Tue Apr 12 21:26:42 2016
     14// Update Count     : 21
    1515//
    1616
     
    1919#include "stdlib"
    2020
    21 extern "C" {
    22 #include <stdlib.h>                                                                             // exit
    23 } // extern
    24 
    2521
    2622// constants
     
    3026
    3127
    32 // helper
     28// helper routines
    3329
    3430// Calculate greatest common denominator of two numbers, the first of which may be negative. Used to reduce rationals.
     31// alternative: https://en.wikipedia.org/wiki/Binary_GCD_algorithm
    3532static long int gcd( long int a, long int b ) {
    3633    for ( ;; ) {                                                                                // Euclid's algorithm
Note: See TracChangeset for help on using the changeset viewer.