Changeset 10a9479d for libcfa/prelude


Ignore:
Timestamp:
Nov 23, 2024, 8:28:37 PM (2 months ago)
Author:
JiadaL <j82liang@…>
Branches:
master
Children:
956b389
Parents:
b006c51e (diff), de7b7a5 (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
  • libcfa/prelude/builtins.c

    rb006c51e r10a9479d  
    1010// Created On       : Fri Jul 21 16:21:03 2017
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu Feb  2 11:33:56 2023
    13 // Update Count     : 135
     12// Last Modified On : Fri Nov  8 17:07:15 2024
     13// Update Count     : 144
    1414//
    1515
     
    140140        ) \
    141141        typeof(x) op = 1;                                                                       /* accumulate odd product */ \
     142        typeof(x) w = x; /* FIX-ME: possible bug in the box pass changing value argument through parameter */ \
    142143        for ( ; y > 1; y >>= 1 ) {                                                      /* squaring exponentiation, O(log2 y) */ \
    143                 if ( (y & 1) == 1 ) op = op * x;                                /* odd ? */ \
    144                 x = x * x; \
     144                if ( (y & 1) == 1 ) op = op * w;                                /* odd ? */ \
     145                w = w * w; \
    145146        } \
    146         return x * op
     147        return w * op
    147148#define __CFA_EXP_INT__(...) __VA_ARGS__
    148149
Note: See TracChangeset for help on using the changeset viewer.