Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
 MacRumors Forums C: Arbitrary-precision can't correctly subtract

 Oct 6, 2011, 10:05 PM #1 jsmwoolf macrumors regular   Join Date: Aug 2011 C: Arbitrary-precision can't correctly subtract I finally got a basic Arbitrary-precision system up and running only on addition. I'm now doing one in subtract and the problem is that when doing the "subtracting one from the top number next to you on the left and adding ten to the top digit that is below in value of the bottom digit"(I honestly can't describe it very well, but I think you can interoperate that), it doesn't change the digit that was borrowed from even though I'm using pointers. It does, however, properly add ten if the top digit is too small. I posted my code for subtraction: Code: ```void subtractNumbers(int space,int number[], int number2[], int *toStore) { int goUp=0; int *p; int *q; int *r; r=toStore; for(int digit = (space-1); digit >= 0; digit--) { p = &number[digit]; //Grabs the digit q = &number2[digit]; //Grabs the digit while(*p < *q) //If the bottom digit is higher than the top digit { goUp++; //Checks one digit ahead p = &number[digit+goUp]; //Goes to the next digit if(*p!=0) //If the next digit isn't a zero { *p-=1; //It'll then subtract one while(goUp>0) //While there are possibly more digits { goUp--; //We'll go down one digit p = &number[digit+goUp]; if((*p==0) && (goUp > 0)) //If the digit is zero and there are more than one digit to carry over { *p=9; } if(goUp==0) //Otherwise, add ten. { *p+=10; break; } } break; } } goUp=0; *r = *p - *q; //Then subtract the number the number *(toStore + digit) = *r; //Now store the value. } }``` What's wrong? 0
Oct 7, 2011, 04:35 AM   #2
gnasher729
macrumors G4

Join Date: Nov 2005
Quote:
 Originally Posted by jsmwoolf I finally got a basic Arbitrary-precision system up and running only on addition. I'm now doing one in subtract and the problem is that when doing the "subtracting one from the top number next to you on the left and adding ten to the top digit that is below in value of the bottom digit"(I honestly can't describe it very well, but I think you can interoperate that), it doesn't change the digit that was borrowed from even though I'm using pointers. It does, however, properly add ten if the top digit is too small. I posted my code for subtraction: Code: ```void subtractNumbers(int space,int number[], int number2[], int *toStore) { int goUp=0; int *p; int *q; int *r; r=toStore; for(int digit = (space-1); digit >= 0; digit--) { p = &number[digit]; //Grabs the digit q = &number2[digit]; //Grabs the digit while(*p < *q) //If the bottom digit is higher than the top digit { goUp++; //Checks one digit ahead p = &number[digit+goUp]; //Goes to the next digit if(*p!=0) //If the next digit isn't a zero { *p-=1; //It'll then subtract one while(goUp>0) //While there are possibly more digits { goUp--; //We'll go down one digit p = &number[digit+goUp]; if((*p==0) && (goUp > 0)) //If the digit is zero and there are more than one digit to carry over { *p=9; } if(goUp==0) //Otherwise, add ten. { *p+=10; break; } } break; } } goUp=0; *r = *p - *q; //Then subtract the number the number *(toStore + digit) = *r; //Now store the value. } }``` What's wrong?
I don't understand the code, and I wouldn't even try to understand it. It is just much, much, much too complicated. I've got six lines of code to do this, and one of them is a variable initialisation, and one just a closing brace. Write down a few subtractions by hand and see how you do it by hand. (I tend to write a little zero or one besides every number at the bottom, except that I'm old and brave enough to do it just mentally, not with a pen. )

And square brackets make array code just so much more readable.
0
 Oct 7, 2011, 05:08 AM #3 jiminaus macrumors 65816   Join Date: Dec 2010 Location: Sydney Doing decimal math on a computer like we do on paper is really not the most efficient way to do this. The typically way to do it is with multibyte binary. You might want to study how we use add with carry and subtract with carry assembly instructions to do this at the assembler level. Once you understand these principles, it's easy to do it in C. The exact details are different from one CPU to another, but here's an example explaination. http://www.pic-projects.net/index.ph...etic&Itemid=57 0
 Oct 7, 2011, 08:26 AM #4 ghellquist macrumors regular   Join Date: Aug 2011 Location: Stockholm Sweden Well, half the point of writing this kind of stuff is to learn how debug programs and rethink the way things are done. I must admit that I find the code very difficult to follow and hence difficult to comment on. One thing that looks wrong on a quick look is one of the last lines where you do *r = *p -*q -- do check what r points at. Other things that I cannot really understand are things like: - if the two numbers has different number of "numbers", ie 1234 - 123 ? - if the result turns negative, ie 123 - 1234 ? - if one of the numbers is negative to start with ? Personally, I would scrap all of the code and restart from the beginning. Start with how you represent different size numbers and how you represent negative numbers. // gunnar ---------- This line looks wrong to me, not really understanding things. p = &number[digit+goUp]; //Goes to the next digit Should it not be [digit - goUp] as digit starts out pointing to the last in the array ? //Gunnar 0
Oct 7, 2011, 04:36 PM   #5
jsmwoolf
macrumors regular

Join Date: Aug 2011
Quote:
 Doing decimal math on a computer like we do on paper is really not the most efficient way to do this. The typically way to do it is with multibyte binary. You might want to study how we use add with carry and subtract with carry assembly instructions to do this at the assembler level. Once you understand these principles, it's easy to do it in C.
Where's the flaw in what I'm doing? Speed? Writing? Readability? All three if not more? I honestly don't know any assembly, so grasping the concept will take a while.

Code:
`*r = *p -*q`
My intention was to store the value of *r using the difference of *p and *q so that I can take it and store into the array. However, I think now it's redundant to have that section.

EDIT: Finally solved subtraction, but my question is how come you can't multiply pointers?

Last edited by jsmwoolf; Oct 7, 2011 at 09:37 PM.
0
Oct 7, 2011, 10:38 PM   #6
kakusan
macrumors newbie

Join Date: Jan 2010
Quote:
 EDIT: Finally solved subtraction, but my question is how come you can't multiply pointers?
My question is: why would you want to? The only two operations you can perform on a pair of pointers is to compare them or subtract them, with the further restriction that they must point to members of the same array. What meaning would multiplication have?

A pointer has the value of an address in memory. Using street addresses as an analogy, you could for example subtract your address from a neighbor's to get some idea of how far apart your houses are on the same street. However if you live on Maple and I live across town on Davis, such a comparison quickly loses meaning.

Now try multiplying your address with your neighbor's address. Could you perhaps get a value equal to another address on your street? Perhaps in rare cases. More likely than not you'll get a number that couldn't possibly be in the range of addresses on your street.

There are many restrictions on pointer arithmetic. But they are not restrictions for restrictions' sake if you think about what each individual operation means.
0
Oct 7, 2011, 11:05 PM   #7
jsmwoolf
macrumors regular

Join Date: Aug 2011
Quote:
 My question is: why would you want to? The only two operations you can perform on a pair of pointers is to compare them or subtract them, with the further restriction that they must point to members of the same array. What meaning would multiplication have?
I was actually referring to grabbing values from an array using pointers, not manipulating addresses. For example:
I store a value in array[1] which has a value of 1.
Code:
`array[1]=1;`
I then use a pointer *p and grab the address of array[1] with *p.
Code:
```int *p;
p = &array[1];```
Then repeating the process again with another index in the array and another pointer.
Code:
```int *q;
array[2]=2;
p = &array[2];```
Then declare a third pointer and then using the values of what's being held in the first two pointers and adding,subtracting, multiply,etc. them and store them in the third.
Code:
```int *r;
array[3]=0;
r=&array[3];
*r=*p+*q;```
Then put the value in the third index of the array using *r.
Code:
```array[3]=*r;
//or
int n =3;
*(array+n) = *r;```
That's why I asked why you can't multiply pointers. Of course, I could have missed the entire point.
0
 Oct 7, 2011, 11:15 PM #8 subsonix macrumors 68000   Join Date: Feb 2008 You can absolutely multiply dereferenced pointers as long as the destination points somewhere. Edit: Having quickly looked at the first post I have to ask why you use pointers at all? It's not necessary, and will only obfuscate what you are trying to achieve and add potential for unnoticed errors. Last edited by subsonix; Oct 7, 2011 at 11:21 PM. 0
 Oct 7, 2011, 11:38 PM #9 jsmwoolf Thread Starter macrumors regular   Join Date: Aug 2011 Well, now I can't remove them for subtract because it's dependent on those pointers and if I remove them, I'll get the wrong result. For addition, I removed all reference of pointers and therefore the result is left unchanged. I was using pointers because I was grabbing digits one by one in an array that was being passed into a function. 0
Oct 7, 2011, 11:51 PM   #10
subsonix
macrumors 68000

Join Date: Feb 2008
Quote:
 Originally Posted by jsmwoolf I was using pointers because I was grabbing digits one by one in an array that was being passed into a function.
Sure but you could just as well have used a temporary variable. But never mind you do as you see fit, hope you get it working.

Edit: actually *p, *q, *r all point to the very parameters you pass to the function, you might as well use them directly.

Last edited by subsonix; Oct 8, 2011 at 12:03 AM.
0
Oct 8, 2011, 02:17 AM   #11
Sydde
macrumors 68000

Join Date: Aug 2009
Quote:
 Originally Posted by subsonix Sure but you could just as well have used a temporary variable. But never mind you do as you see fit, hope you get it working. Edit: actually *p, *q, *r all point to the very parameters you pass to the function, you might as well use them directly.
You are suggesting using array syntax on pointers? Where, say, *p is equivalent to p[0] ? But that would be too simple. The arguments could be passed as pointers and just indexed directly.
__________________
Mr. Paul, sir, I thought you should be advised, there seems to be a zombie tribble clinging to your head, for it is scarfing your brain
0
Oct 8, 2011, 02:39 AM   #12
subsonix
macrumors 68000

Join Date: Feb 2008
Quote:
 Originally Posted by Sydde You are suggesting using array syntax on pointers? Where, say, *p is equivalent to p[0] ? But that would be too simple. The arguments could be passed as pointers and just indexed directly.
What do you mean too simple? It's not simple to the point of not working, to quote Einstein: "everything should be made as simple as possible, but not simpler"

The arguments are passed as pointers, whether they are used as arrays or not does not matter. My point was that there is not reason to have an extra set of pointers inside the function. But the question came up about multiplying pointers and while the following works, it's just ugly.

Code:
`*a = *b * *c;`
0
Oct 8, 2011, 06:30 AM   #13
gnasher729
macrumors G4

Join Date: Nov 2005
Quote:
 Originally Posted by jsmwoolf Where's the flaw in what I'm doing? Speed? Writing? Readability? All three if not more? I honestly don't know any assembly, so grasping the concept will take a while.
The x86 processors have two instructions for adding:

"adc" = "add with carry" takes two numbers and the carry bit, which is either 0 or 1, and adds them. If the result is too large, it produces the partial result and sets the carry flag to 1, otherwise it sets the carry flag to 0.

The x86 processors also have two instructions for subtracting:

"sub" takes two numbers and calculates the difference.
"sbb" = "subtract with borrow" takes two numbers and the "borrow" bit, which is either 0 or 1. It calculates the first number minus the second number minus the borrow bit. If the result is >= 0, it then sets the borrow bit to 0, otherwise it sets the borrow bit to 1.

Now an example: 612 - 129.
Start with borrow bit = 0. 2 - 9 - borrow 0 = -7, add 10 makes 3, borrow = 1.
1 - 2 - borrow 1 = -2, add 10 makes 8, borrow = 1.
6 minus 1 minus borrow 1 = 4, makes 4, borrow = 0.

Result = 612 - 129 = 483.
0
Oct 8, 2011, 11:44 AM   #14
jiminaus
macrumors 65816

Join Date: Dec 2010
Location: Sydney
Quote:
 Originally Posted by jsmwoolf Where's the flaw in what I'm doing? Speed? Writing? Readability? All three if not more?
Speed and memory. You'll need many more bits to store a number in unpacked decimal than in binary. You'll need many more CPU cycles to calculate in decimal than in binary (assuming your target architecture doesn't directly support decimal arithmetic).

Quote:
 Originally Posted by jsmwoolf I honestly don't know any assembly, so grasping the concept will take a while.
You don't need to know an assembly language, you just need to be able to understand how it works. The link I posted steps through the assembly line by line with plenty of explanation.
0
 Oct 8, 2011, 01:52 PM #15 SidBala macrumors 6502a   Join Date: Jun 2010 What you need is basically a ripple-carry adder, but in software. This will allow you to perform addition and subtraction for arbitrary length numbers byte-by-byte. If you do that then subtraction is as simple as making one of the numbers negative by 2's complement and feeding that into the adder. 0
Oct 8, 2011, 02:00 PM   #16
chown33
macrumors 601

Join Date: Aug 2009
Quote:
 Originally Posted by SidBala If you do that then subtraction is as simple as making one of the numbers negative by 2's complement and feeding that into the adder.
I compliment your mention of 2's complement, and wish to complement it by mentioning 9's-complement and 10's-complement, which are complementary to the Method of complements.

I think it's also worth linking to Subtraction algorithms. I don't know how the OP learned to do subtraction in elementary school, but I would bet that the algorithm coded wasn't it.
0
Oct 8, 2011, 07:25 PM   #17
jsmwoolf
macrumors regular

Join Date: Aug 2011
Quote:
 Originally Posted by jiminaus Speed and memory. You'll need many more bits to store a number in unpacked decimal than in binary. You'll need many more CPU cycles to calculate in decimal than in binary (assuming your target architecture doesn't directly support decimal arithmetic). You don't need to know an assembly language, you just need to be able to understand how it works. The link I posted steps through the assembly line by line with plenty of explanation.
The format tends to be a command, the type of byte that your dealing with, and something else I don't know how it works
Code:
`movf A0 W`
As a question, what does W and F mean in the example? I was thinking of write and final, but I bet I'm not correct. Is Ax and Rx,where x = 0,1,2,etc., a type of byte? Is byte A and R defined or do you have to know what those specifically do?

Code:
```       movf    A0,W
movf    A1,W
btfsc   STATUS,C
incfsz  A1,W
Can the top code do any length of numbers or only three/four?

Also, if I do understand the example, do I need to go to the low-level of C and actually use binary(<<(left binary shift), >>(right binary shift), ~(switch or something), &(and), |(or), ^(XOR))?

Quote:
 I think it's also worth linking to Subtraction algorithms. I don't know how the OP learned to do subtraction in elementary school, but I would bet that the algorithm coded wasn't it.
You questioning my math skills? It's simple for a human to subtract ,as long as they still remember how and was able to grasp it, and letting the computer subtract for you using predefined basic variables(int, char, double, long, etc.). However, trying to code a computer to do arithmetic math like a human is very complex whether it is to overcome limitations of exactness or just coding such to learn on how it works as you must set your conditions on when certain things happen. Otherwise, you'll get the wrong results. Besides, I was good at math when I was in elementary school anyway so I learned it very quickly.

EDIT: MOVF moves the data into another bit and resets the value to zero in the template bit(the Ax), ADDWF then takes two of the argument and then stores the final value into the second argument, INCFSZ increments the value in loops. But what's btfsc? Is it your "If..." statement?

Last edited by jsmwoolf; Oct 8, 2011 at 10:03 PM.
0
Oct 9, 2011, 04:21 AM   #18
gnasher729
macrumors G4

Join Date: Nov 2005
Quote:
 Originally Posted by jsmwoolf You questioning my math skills? It's simple for a human to subtract ,as long as they still remember how and was able to grasp it, and letting the computer subtract for you using predefined basic variables(int, char, double, long, etc.). However, trying to code a computer to do arithmetic math like a human is very complex whether it is to overcome limitations of exactness or just coding such to learn on how it works as you must set your conditions on when certain things happen. Otherwise, you'll get the wrong results.
If you read my very first reply: No, it is _not_ difficult. _You_ made it difficult. Read the description of the "subtract with borrow" instruction that I posted. For subtracting numbers with four components, the code is: borrow = 0, subtract with borrow digit 0 from digit 0, subtract with borrow digit 1 from digit 1, subtract with borrow digit 2 from digit 2, subtract with borrow digit 3 from digit 3.

My code was three lines to implement the loop and initialize "borrow", and three lines for implementing the "subtract with borrow" operation. Code for adding would very much look the same.
0
Oct 9, 2011, 10:57 AM   #19
chown33
macrumors 601

Join Date: Aug 2009
Quote:
 Originally Posted by jsmwoolf You questioning my math skills? It's simple for a human to subtract ,as long as they still remember how and was able to grasp it, and letting the computer subtract for you using predefined basic variables(int, char, double, long, etc.). However, trying to code a computer to do arithmetic math like a human is very complex whether it is to overcome limitations of exactness or just coding such to learn on how it works as you must set your conditions on when certain things happen. Otherwise, you'll get the wrong results. Besides, I was good at math when I was in elementary school anyway so I learned it very quickly.

Did you read the description of "Method of complements" I linked to?

Neither of them are difficult or complex.

If I'm questioning anything, it's your design skills. You seem to frequently leap to conclusions, overcomplicate things, and not do basic research, such as searching for Subtraction Algorithms. Instead of doing the basics, and getting a firm grounding in them, you seem to start coding whatever you first think of, even if you don't know the basics. This pattern has occurred over and over, with almost every problem you've posted to the list. In short, the lack of basic research and basic design is the main cause of your coding difficulties.

And again, I would like to know what subtraction algorithm you learned in elementary school. I will bet it wasn't the algorithm in the code you wrote. If you can't describe the algorithm you learned, I suggest spending some time to do so. The ability to dissect procedures and express algorithms is a fundamental skill to all of programming. Equally, the ability to read and understand algorithms, then code them correctly, is another fundamental skill.

I would also like to see your code that results from implementing the basic grade-school algorithm described in the link already provided. If you do it, you should find that it's essentially subtract-with-borrow.

Many manual arithmetic algorithms have been refined over centuries or even millenia. If you understand the algorithm, you will often find that coding it produces simple, effective code. There's a reason for this: manual calculation is expensive, so anything that can improve it effectively will be a benefit.

Last edited by chown33; Oct 9, 2011 at 11:16 AM.
0
Oct 9, 2011, 03:25 PM   #20
jsmwoolf
macrumors regular

Join Date: Aug 2011
Quote:
 And again, I would like to know what subtraction algorithm you learned in elementary school. I will bet it wasn't the algorithm in the code you wrote. If you can't describe the algorithm you learned, I suggest spending some time to do so. The ability to dissect procedures and express algorithms is a fundamental skill to all of programming. Equally, the ability to read and understand algorithms, then code them correctly, is another fundamental skill.
I think that was the algorithm that I learned in grade school. Now that I actually took a real close look at the method of complements, you take the complement of the subtrahend, for example, 873 and 281 which 281 is the subtrahend number and complement that to 782 but take one away which yields 781. Then add 873 and 781 which makes 1654. Then subtract the (y + nines' complement of y) + 1 or (y + tens' complement of y), which in our case is 1000 which gets us 654. Then add one and you get 655.

In binary sense, you would have to use ~ in order to get the complement. However, would you have to grab a decimal complement by converting to binary and use ~?

However, will I need to still use an array because I need to do a certain number of times in the problems that I'm doing? If I don't use an array, then how can I still follow arbitrary precision without one and manipulate data?

Last edited by jsmwoolf; Oct 9, 2011 at 03:35 PM.
0
Oct 9, 2011, 03:51 PM   #21
chown33
macrumors 601

Join Date: Aug 2009
Quote:
 Originally Posted by jsmwoolf I think that was the algorithm that I learned in grade school.
Then it shouldn't be hard to translate it into an English description of the procedure, which should be comprehensible to a 2nd-grader. I encourage you to try doing this, as gnasher729 did with the subtract-with-borrow algorithm. To make it easy, use exactly the same operands as gnasher729 did in his example.

Quote:
 Now that I actually took a real close look at the method of complements, you take the complement of the subtrahend, for example, 873 and 281 which 281 is the subtrahend number and complement that to 782 but take one away which yields 781.
The 9's-complement of 281 is not 782.

The operand in the Wikipedia example is 218. Quoting the article: "The nines' complement of y (218) is 781." It's not 782. 782 would be the 10's complement of 218. Because the 10's complement of any number is the 9's-complement + 1. For comparison, look up 2's-complement and 1's-complement in binary (base-2).

I think you need to reread the wikipedia article more carefully. Much more carefully.

Quote:
 However, will I need to still use an array because I need to do a certain number of times in the problems that I'm doing? If I don't use an array, then how can I still follow arbitrary precision without one and manipulate data?
Do you understand what a pointer is? Do you understand the close relationship between arrays and pointers in C? Do you know that an array parameter passed to a function is really a pointer? Do you know why it's really a pointer?
0
Oct 9, 2011, 04:01 PM   #22
gnasher729
macrumors G4

Join Date: Nov 2005
Quote:
 Originally Posted by jsmwoolf However, will I need to still use an array because I need to do a certain number of times in the problems that I'm doing? If I don't use an array, then how can I still follow arbitrary precision without one and manipulate data?
The first thing you'd need to do is to define a data structure. How would you represent the number 123,456? Or the number 123,456,789? How do you represent the number -123,456? Or don't you represent negative numbers at all? You can be more or less flexible depending on your goals, but you need to make some decision.

Next you define what exactly a function like subtractNumbers is to do, and what its limitations are. Is it capable of subtracting 123 - 124? If yes, is it capable of subtracting -1 - 124? Or -1 - (-124)?
0
Oct 9, 2011, 04:08 PM   #23
jsmwoolf
macrumors regular

Join Date: Aug 2011
Quote:
 The operand in the Wikipedia example is 218. Quoting the article: "The nines' complement of y (218) is 781." It's not 782. 782 would be the 10's complement of 218. Because the 10's complement of any number is the 9's-complement + 1. For comparison, look up 2's-complement and 1's-complement in binary (base-2).
Quote:
 The 9's-complement of 281 is not 782.
That was a typo. Besides, isn't finding the 9's complement finding the 10's complement and subtracting by 1? According to the example, it looks a lot like it compared to a 9's and 10's complement.

Quote:
 Do you understand what a pointer is?
A pointer is a type of variable that stores an address of another variable.

Quote:
 Do you understand the close relationship between arrays and pointers in C?
It technically allows the pointer to access one section of an array and make changes to it. However, I find it more useful when looking at strings rather than numbers.

Quote:
 Do you know that an array parameter passed to a function is really a pointer?
It's handled by the compiler, I believe.

Quote:
 Do you know why it's really a pointer?
Practically, no I don't.

Quote:
 The first thing you'd need to do is to define a data structure.
I was originally using an array, but since you said that you can write a subtraction algorithm in six lines, I might have to scrap the idea and use something else.

EDIT: Using the method of complement, I was able to shorten the subtract algorithm and avoid using all of those comparisons. Yet, I still didn't shorten it to six lines.

Last edited by jsmwoolf; Oct 9, 2011 at 04:51 PM.
0
Oct 9, 2011, 04:57 PM   #24
chown33
macrumors 601

Join Date: Aug 2009
Quote:
 Originally Posted by jsmwoolf That was a typo. Besides, isn't finding the 9's complement finding the 10's complement and subtracting by 1? According to the example, it looks a lot like it compared to a 9's and 10's complement.
The example used 9's-complement. So why would you calculate the 10's-complement?

Consider the description you gave earlier (with typos fixed):
Quote:
 Now that I actually took a real close look at the method of complements, you take the complement of the subtrahend, for example, 873 and 218 which 218 is the subtrahend number and complement that to 782 but take one away which yields 781. Then add 873 and 781 which makes 1654. Then subtract the (y + nines' complement of y) + 1 or (y + tens' complement of y), which in our case is 1000 which gets us 654. Then add one and you get 655.
Where you say "complement that to 782", you're taking the 10's-complement. But why? The wikipedia example uses 9's-complement.

You then take one away to get 781, the 9's-complement. But why didn't you just calculate the 9's-complement directly, like the example shows? It's as if you read a simple example and can't simply follow it as given. You add complexity that simply isn't there in the original.

If you're going to do the subtraction using 10's-complement, then you can eliminate the "take one away" after the first complementation, and the "add one" at the end, and calculate directly with the 10's-complement:
873 + 782 = 1655
1655 - 1000 = 655
Basic algebra should prove how that works.
0
Oct 9, 2011, 04:59 PM   #25
gnasher729
macrumors G4

Join Date: Nov 2005
Quote:
 Originally Posted by jsmwoolf EDIT: Using the method of complement, I was able to shorten the subtract algorithm and avoid using all of those comparisons. Yet, I still didn't shorten it to six lines.
Code:
```int borrow = 0;
for (int i = space - 1; i >= 0; --i) {
int difference = number [i] - number2 [i] - borrow;
toStore [i] = (difference >= 0 ? difference : difference + 10);
borrow = (difference >= 0 ? 0 : 1);
}```
0

MacRumors Forums

 Posting Rules You may not post new threads You may not post replies You may not post attachments You may not edit your posts BB code is On Smilies are On [IMG] code is On HTML code is Off Forum Rules
 Forum Jump User Control Panel Private Messages Subscriptions Who's Online Search Forums Forums Home News and Article Discussion     MacRumors.com News Discussion     Mac Blog Discussion     iOS Blog Discussion iPhone, iPod and iPad     iOS         iOS 7         iOS 6         iOS 5 and earlier         Jailbreaks and iOS Hacks     iPhone         iPhone Tips, Help and Troubleshooting         iPhone Accessories         iPhone Launch Meetups         iPhone Wallpapers etc.     iPad         iPad Tips, Help and Troubleshooting         iPad Accessories         iPad Launch Meetups         iPad Wallpapers etc.         iPad Apps     iPod touch         iPod touch Accessories     iPod     Alternatives to iOS and iOS Devices Apple Applications     iPhone and iPod touch Apps     iPad Apps     Mac Applications and Mac App Store Apple Hardware     Desktops         iMac         Mac Pro         Mac mini     Notebooks         MacBook         MacBook Pro         MacBook Air     PowerPC Macs     Apple TV and Home Theater     Mac Peripherals     Buying Tips and Advice Apple Systems and Services     Mac Basics and Help     Mac OS X         OS X 10.8 Mountain Lion         Mac OS X 10.7 Lion         Mac OS X Server, Xserve, and Networking     iCloud and Apple services     Windows, Linux & others on the Mac     Programming         iPhone/iPad Programming         Mac Programming         App Store Business, Legal and Marketıng Special Interests     Mac and PC Games         Console Games     Digital Audio     Visual Media         Design and Graphics         Digital Photography         Digital Video         Web Design and Development     Apple Collectors     Distributed Computing Mac Community     Community Discussion         Apple, Industry and Internet Discussion         Current Events         Politics, Religion, Social Issues     Picture Gallery         UI Customization     Site and Forum Feedback         Mac Guides Private Forums Archive     Wasteland     Archives of Old Posts         MacRumors News Discussion (archive)         MacBytes.com News Discussion         Buying Tips, Advice and Discussion (archive)         Community         Daily Tunes Site Discussion and Feedback         Event Archives             Macworld San Francisco 2008         Games         General Mac Discussion         Hardware Rumors         iPhone Purchaser Meetups         Leopard Event Meetups         Mac Help/Tips         Mac OS X 10.3 (Panther) Discussion         Mac Scene         Macintosh Computers         MacRumors Old Skool         Marketplace Archive 1 (Posts count)         Marketplace Archive 2             iPhone Marketplace Archive         Music Discussion         New Mac Application Announcements         Product Recommendations/Reviews         Site News         Switch Stories         Web Design and Development (archive)         Past Contests             1,000,000 Post Contest             2,000,000 Post Contest             3,000,000 Post Contest             4,000,000 Post Contest             5,000,000 Post Contest             Ten Million Post Contest

 Similar Threads thread Thread Starter Forum Replies Last Post Clancycoop Mac OS X 10.7 Lion 4 Aug 12, 2011 05:05 PM Wung Mac OS X 2 Aug 9, 2011 11:08 PM TheE3Guy iPhone 0 Jul 23, 2011 03:41 AM aaronhead14 Windows, Linux & others on the Mac 13 Jan 1, 2011 02:38 AM martymcfly1885 MacBook 0 Nov 20, 2010 11:46 AM

All times are GMT -5. The time now is 10:12 AM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps
 Contact Us - MacRumors Forums - Archive - Privacy Statement / DMCA Agent - Top

Mobile Version | Fixed | Fluid | Fluid HD