Omgili - forum search, search forums  
  

Discussions about unsigned int

Displaying 1 - 10 out of 7,998 discussions.  
RSS Feed Options
Time Frame: (Any time)   Minimum number of replies: (2)   Minimum number of discussing users: (0)
  |  

Page: 1   2   3   4   5   6   7   8   9   10  
Keep this page open to be updated with the newest discussions automatically.
In case of integer overflows what is the result of (unsigned int) * (int) ? unsigned or int? I was auditing the following function, and suddenly I came out with that question. In the below function, it is vulnerable at line 17. 1. // Create a character...
Started by on , 12 posts by 12 people.  
Return (NULL); On int , unsigned int mixed operations, int is elevated to unsigned int....
In any case, i*w is guaranteed; 4096) 10.
Why not just declare i as unsigned int? Then the problem goes away.
Suppose I have one long long int and want to take its bits and construct four unsigned short ints out of it. Particular order doesn't matter much here. I generally know that I need to shift bits and truncate to the size of unsigned short int. But I think...
Started by on , 4 posts by 4 people.  
(unsigned short)((((unsigned long long int)value)>>(x))&(0xFFFF)) where....
Long long int long_long_int; unsigned short int short_ints[sizeof(long long int) / sizeof(short int.
What requires the most CPU: int foo = 3; or typecasting it to an unsigned int? unsigned int foo = 3;
Started by on , 10 posts by 10 people.  
However assembly in MS VC 2005: ; 9 : int foo = 3; mov DWORD PTR _foo$[ebp], 3 ; 10 : unsigned int bar = 3 processors (although....
Here is the link about the fast types.
So there is no difference in speed.
Into unsigned int.
Ask your Facebook Friends
The code is return min + static_cast<int>(static_cast<double>(max - min + 1.0) * (number / (UINT_MAX + 1.0))); number is a random number obtained by rand_s. min and max are ints and represent minimum and maximum values (inclusive). If you ...
Started by on , 6 posts by 6 people.  
You could do the arithmetic in an unsigned long long instead of a double, but only.
You should always do it by using high-order bits, as in j = 1 + (int) (10.0 * (rand() / (RAND_MAX to double anyway.
I have an application where part of the inner loop was basically: double sum = 0; for (int i = 0; i != N; ++i, ++data, ++x) sum += *data * x; If x is an unsigned int, then the code takes 3 times as long as with int! This was part of a larger code-base...
Started by on , 3 posts by 3 people.  
int to doubles, but do not have a hardware conversion from unsigned to double, so the compiler software conversion from unsigned int to double may very well be suboptimal (it almost certainly [ebp-4] 0040E6E2 fstp qword ptr....
Or to reformulate the question: is there a performance penalty in using unsigned values? And in general: what is the most performant type (16bit signed?, 32bit signed? etc.) on the IPhone ARM processor?
Started by on , 6 posts by 6 people.  
Consider this: You have a loop with an unsigned loop counter like this: void function (unsigned int first, unsigned int last) { unsigned int i; for (i=first; i!=last; i++) { // do something here an 8-....
Is there a method that converts string to unsigned int? _ultoa exists but couldn't find the vise verse version...
Started by on , 5 posts by 5 people.  
#include <boost/lexical_cast.hpp> [...] unsigned int x = boost::lexical_cast<unsigned does under the covers): #include <sstream> [...] std::stringstream s(strVal); unsigned int x; s >> x; ....
#include <stdio.h> int main() { unsigned long long int num = 285212672; //FYI: fits in 29 bits int normalInt = 5; printf("My number is %d bytes wide and its value is %ul. A normal number is %d.\n", sizeof(num), num, normalInt); return 0; } Output...
Started by on , 13 posts by 12 people.  
It's the %d => normal int which isn't working, which is to compile....
#include <stdio.h> int main() { unsigned long long int num and printing your unsigned long long int just fine.
Instead of 5 as it should.
I am trying to convert a unsigned char* to int * on in Objective-C on the iPhone. Is there any API that can help with the conversion? Here's my best attempt: -(BOOL)MyFunc:Version:(int *)nVer { unsigned char * uszVerSize; //trying to assign string to ...
Started by on , 3 posts by 3 people.  
Const char *asciiCString = [@"abc-zABC-Z" cString]; int.
Return [[NSNumber numberWithUnsignedChar:uszVerSize] intValue]; You a pointer to a char to a pointer to an int.
The chars to an int and return that.
I got a problem with ip2long in PHP5. It appears, that in 32bit OS ip2long returns signed int, and in 64bit OS unsigned int is returned. My application is working on 10 servers, and some are 32bit and some are 64bit, so I need all them to work same way...
Started by on , 4 posts by 4 people.  
Of ip2long into an unsigned int string by having sprintf interpret the value as unsigned with %u : $ip_int; } On a 64 bit system, printing this value ($ip_int) will display an 'unsigned' integer since with ip....
Page: 1   2   3   4   5   6   7   8   9   10  
More Information


Forum Search About Omgili Help Plugins Forum/Board Owners Privacy

i
In Title
In Topic
In Reply
Exclude
Boost