| New Reply |
How does one become proficient in programming? |
Share Thread | Thread Tools |
| Jul17-11, 02:29 AM | #18 |
|
|
How does one become proficient in programming?Incidentally, despite what you think, whether a number is irrational or not is independent of whatever number system you use to represent said number. It doesn't matter whether you represent the number in decimal, hexadecimal or binary, a rational number is rational and an irrational number is irrational... |
| Jul17-11, 06:31 AM | #19 |
|
|
|
| Jul17-11, 09:02 AM | #20 |
|
Recognitions:
|
A bit off topic, maybe this should be split off into a separate thread.
|
| Jul17-11, 09:56 AM | #21 |
|
|
My belief, and I have not yet verified this, is that when you convert some numbers from decimal to binary and then do the division in binary, you do can get an infiinite non-repeating binary real number. I doesn't SOUND logical, now that I think about it and perhaps when I did 16/10 as 10000/1010 I didn't carry it out far enough (or it might have been 14/10 as 1110/1010, I can't remember whether both of them seemed irrational in binary or just one of them. Guess I'm now going to have to do the math. GADS I HATE doing long division in binary, but in this case, I KNOW you can't get the computer to do it for you because it doesn't have enough bits, so it gets to a rounding error which is the point I was making in the post I referred to. LATER: OK, I didn't go very far w/ the long division in binary (horrible stuff) but I'm convinced you are correct, as you logically MUST be. The problem of 1.4+2.6 not being equal to 4.0 in computers has nothing to do with the rationality of the number in one system or the other, it just has to do with the fact that when you do the division in binary you have to truncate before adding so you get a rounding error. As I pointed out in the other thread, the decimal-based computer's equivalent of this is that 1/3 + 2/3 is not equal to 1.0 because when you put them into floating point representation you get (I'm going to assume a 10-digit memory) .3333333333 + .6666666666 which comes out to .9999999999 so the equality doesn't work. Thanks for pointing out my mistake about the rationality. |
| Jul17-11, 01:54 PM | #22 |
|
|
Given that, I know for a fact that there are numbers which can be represented accurately in a finite string of digits in one number system, while requiring a representation with repeating digits in another. (I just can't think of any examples in binary right now) |
| Jul17-11, 02:12 PM | #23 |
|
|
|
| Jul17-11, 03:46 PM | #24 |
|
Recognitions:
|
This is a niche part of programming, still thinking it belongs in another thread.
|
| Jul17-11, 10:28 PM | #25 |
|
|
The way you put this makes you sound like you're so sure of yourself, which is exacerbated by how wrong you are. Honestly, it's pretty insulting... |
| Jul17-11, 10:40 PM | #26 |
|
|
First, please read your claim of knowledge above. Can you see how it's irrelevant? According to your quote, irrational numbers "cannot be represented as terminating or repeating decimals," emphasis being mine. While a number may be represented with a finite number of digits in one system and a repeating set of digits in another, this doesn't change whether that number is irrational or not... Secondly, please take care to quote in context: It seems to me that you're referring to an "informal" definition. While these informal descriptions can aid in understanding, I wouldn't rely on them as evidence as much as you do... |
| Jul17-11, 11:42 PM | #27 |
|
Recognitions:
|
http://en.wikipedia.org/wiki/IEEE_754-2008 For most computers integers are stored as 32 bit or 64 bit signed binary numbers, although some computers support larger integers. How the data is stored isn't that important for programming proficiency. There a lot of different types of programming, business, scientific, operating systems, data base, web site design, embedded code for peripherals or consumer devices that have computers in them, ... . Many students and engineers find MatLab to be helpful, although it's more like a mathematical tool as opposed to a programming language. There's still a large amount of legacy like scientific code still being written in Fortran. C and C++ are popular for a lot of types of programming. You didn't mention what aspect of programming you like. As mentioned in prevoius posts, most jobs involve specializing in one type of programming. The main issue for learning programming is finding a good set of tasks to implement for the learning experience. Even if you don't take a class, getting the assignments from a class to implement programs yourself can be useful, but you made need help if you run into issues. I'm not sure what book to recommend these days. |
| Jul18-11, 12:45 AM | #28 |
|
|
The mathematical reason floating point numbers behave as they do on computers has nothing to do with binary; instead, it is due to the inability of processors to work with fractions. So when you ask the computer to store 1/3, it does the calculation as 1 divided by 3 in decimal notation. So the computer winds up with .33333333-> and is truncated to a certain precision. If an operation such as 3 * (1/3) is performed, the computer takes .333333333 and times it by 3 to arrive at .9999999999. But its still a rational number because it repeats. For example.... the .333333333 can be expressed as a fraction by taking 33 (the pattern) and dividing by 99. The .999999999 can be expressed as fraction with 99/99. Irrational numbers, like PI, are always irrational. There are no patterns. |
| New Reply |
| Thread Tools | |
Similar Threads for: How does one become proficient in programming?
|
||||
| Thread | Forum | Replies | ||
| Recommended programming language (and texts) for middle-school beginner programming | Programming & Comp Sci | 9 | ||
| physics proficient? | Academic Guidance | 2 | ||
| Doing OO programming the right way | Programming & Comp Sci | 17 | ||
| Programming a PIC | Programming & Comp Sci | 21 | ||
| programming language to make a forum | Computing & Technology | 10 | ||