FWNX- about the abs function -
来源:互联网 发布:mac如何显示包内容 编辑:程序博客网 时间:2024/06/01 07:43
http://blog.csdn.net/soloist/article/details/153123
This article elaborate the the bug in VC.NET
Today I want to address it again:
in the 32-bit computer;
all the Deductive statements are based on the following four facts:
1 ==> MIN_INT = 0x 8000 0000 = -2^31 =-2147483648
2==>max_int = 0x8fff ffff = 2^31 -1 = 2147483648;
3==>the abs(min_int) > abs(max_int)
4==>the max unsigned integer is 0x 7fff ffff = 2^32-1;
so when we use abs function to get a absolution of negative number
we must use unsigned int to get the return of the value;
becausethe absolute value of min_int of signed int is larger than the max_int of signed int;
but what is the value if we use int to receive the result ?
the result of -min_int is still min_int;
but for a max unsigned int it still works;
why
so we should use the unsigned int to recieve the return value;
- FWNX- about the abs function -
- about abs guide
- sth about the string function strdup
- About the return value of SetTimer function
- FWNX - find the same father - TREE
- implicit declaration of function abs
- The error “Pure Virtual Function Called” about C++
- fwnx - find the middle node in the linked list ~~~
- fwnx- find the common ancestor in a tree
- fwnx -- working bugs in the two week of osp
- Python built-in function - abs(x)
- about "callback" function
- about function test
- about "callback" function
- about function and sub
- About "Destructor Function"
- About Function addLoadEvent()
- some function about TIVOLI
- !!!Obj-c on Mac --- Chapter 10 - 12 Initialization Property Category
- DP16 Floyd Warshall Algorithm @geeksforgeeks
- djang框架学习中遇到的问题总结
- 活期储蓄账目管理系统(C++课程设计)
- 复数计算器
- FWNX- about the abs function -
- DP17 最少回文切割次数 Palindrome Partitioning @geeksforgeeks
- friendlyARM 2410/2440开发板 usb download 驱动无法安装问题
- DP18 分割区间问题 Partition problem @geeksforgeeks
- RSA算法
- ListView学习笔记(通过Toast显示ListView里面的内容)
- 2012谷歌校园招聘笔试
- Swap Nodes in Pairs
- C#中委托的理解和使用