码迷,mamicode.com
首页 > 其他好文 > 详细

宏ut_2pow_round

时间:2015-11-26 15:18:57      阅读:207      评论:0      收藏:0      [点我收藏+]

标签:

计算 m的整数倍 不大于n

#define ut_2pow_round(n, m) ((n) & ~((m) - 1))

 

#include <stdio.h>
#include <stdlib.h>

#define ut_2pow_round(n, m) ((n) & ~((m) - 1))

int main(){
int n=31;
int m=8;
int a;
a=ut_2pow_round(n,m);
printf("%d",a);
return 0;
}

 

24

宏ut_2pow_round

标签:

原文地址:http://www.cnblogs.com/taek/p/4997608.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!