Jump to content

Shadow

Senior Members
  • Posts

    615
  • Joined

  • Last visited

Everything posted by Shadow

  1. Why would so many people be using it if it were truly such a terrible language? I mean no disrespect, but you're the first person I know to say something like that, although the truth is I don't know that many people. Could you specify the reasons on which you base your opinions? What's the reason? Growing as in more people aren't using it, or growing as in updates to the language? If the latter, you've got C++0x which is supposed to be released in a couple of years. If the former... I'm not sure how accurate or reliable tiobe is, but it clearly shows that C++ has been the third most used language on the internet, and while its use has gone down, so has the use of other major languages. Please understand, I'm not trying to prove you wrong, I'm just trying to understand your reasoning, since as I said, you're the first I've heard this from. PS.: Mods, feel free to split this to a separate thread, I'm kinda going off topic here
  2. On the other hand C++ is usually the language people choose when doing something serious, and unlike C it supports OOP and generic programing, something which makes my life a WHOLE lot easier. So I don't know if it's fair to completely shunt C++. Anyway, since I only program in C++ (and C) those are the only two languages to which I can provide some links: C Tutorial, one of the most thorough I found on the web back in my time: Beej's Guide to C Programming C++ Tutorial, the only tutorial I found on the web that seemed worth it, and IMHO it couldn't get much better. Also has a forum, although last time I checked (about half a year ago) it wasn't all that active. That maybe changed. LearnC++ A C, C++, C# Windows, game and network programming board. Probably one of the best out there (not sure though, don't take my word for it), I usually get my answers withing a couple of minutes at most. Cboard Those are just tutorials to the languages themselves, but there's still lots to learn after that. Wish you luck
  3. Well, one solution is [hide]b = 8, c = 5, d = 1, e = 5, f = 2, g = 1, h = 4, i = 9[/hide]but there are around 450 more solutions. Cheers, Gabe
  4. Shadow

    N equations

    Thanks Atheist. Just for clarification, [math]\prod_{j\neq i} \frac{x-x_j}{x_i-x_j} [/math] means that it runs while j is smaller than i, from j=0?
  5. Shadow

    N equations

    Hey all, say we have N points in Cartesian space, and we are to find a nth degree polynomial that goes through all those points. How would you symbolically describe the solutions for the coefficients? Just to make my question clear, here's an example: N=2: we have two points, W and Z. So in this case we're looking for a linear equation in the form [math]y=ax+b[/math]. We get two equations, and solve for a and b. If we had three points, we would be looking for a quadratic function in the form [math]y=ax^2+bx+c[/math]. We get three equations, solve for a, b and c. Now what I'm looking for is a way to tell a computer how to get the coefficients given N points. Cheers, Gabe
  6. Yeah, that was also my thinking, although I only had the idea in my head for integers. Unfortunately, that would yield incredibly long numbers, which is something I was trying to avoid. Thankfully, I've found a way to bypass this step completely, so it doesn't really matter anymore. Thanks for the help.
  7. You misunderstood me. I meant an operation that would return one number, or word, or anything. And yes, let's assume that they consist of a finite number of digits. The reason for this is that I was wondering whether the formula of an nth degree function can be represented by one number. Or in less than n numbers, since I could just keep applying the process over and over again. It sounds more impossible the more I'm writing about it, but I'd still like someone else's opinion.
  8. Hey all, this will sound like a pretty stupid questions, but given a set of N real numbers numbers, is there any operation that can be performed on them that would output a result unique only to that set of numbers, in that specific order? This question has been bugging me for some time, so I was wondering if there was some kind of proof or something that makes this impossible. If there is nothing to dispute the possibility of there being such an operation, can you think of one? Cheers, Gabe
  9. 7YwLQSTo_ow 701NiTGsvHA&NR
  10. Thanks
  11. ...yeah, I know that's Pangloss's line, so God forgive me. The same as the other topic, only with videos. Here's my all time favorite depiction of the average (and oh so cute) person: FOAR EVERYWUN FRUM BOXXY Yavx9yxTrsw PS.: Is there any way to embed videos on SF?
  12. Shadow

    Sub-Unit MkII

    Congrats YT! You get to experience puberty all over again
  13. Incidentally, I'm using them to simulate star movement, so I'm not sure that would help.
  14. I'm in a tight spot guys; is there any way to exact vengeance on pointers?
  15. By your reasoning, shouldn't archeologists be using timecubes instead of timelines?
  16. Thanks DH...just to confirm, all I need to do now is replace [math]k[/math] with [math]z[/math] and, well, that's it, right?
  17. Using the algorithm on wikipedia, you just have to take Pi in decimal to the number of digits you want, and then convert to binary. That, or fit in powers of two. Eg 3, 14... -> [math]2^1 + 2 ^ 0[/math], a you get left with 0.14... in decimal and 11 in binary. Now you just go on: [math]0.1415926... = 0 \cdot 2^{-1} + 0 \cdot 2^{-2} + 1 \cdot 2^{-3} +....[/math] Hope this helps, G
  18. The "zooming in" part refers to what I'll be needing this for. If you have say circles in 2D space, and you zoom in on one of them (the one that is represented by [math]S[/math] in this case). The one you zoom in on gets "bigger" (or looks bigger to be more precise, because you get closer) and the distance between the point you're zooming in on and all the other points (or circles or whatever) increases (or seems to increase, because you're closer). The second equation is the equation for the ray. We know that the new point (X) must be z times as far as the original (P), hence the first equation. And we know it has to be on a line connecting the center (S, the point we're zooming in on) and the original point (P). That's the second equation in the form y=ax+b. The letters refer to the points, and the subscripts to the coordinates. I though that obvious so I didn't include it, sorry about that. Hope this helps clear things up. EDIT: Now that I'm rereading the post, I can see there's a parenthesis missing that messes things up quite a lot. Edited.
  19. Hey all, I have two 2D vectors, [math]\vec{s}[/math] and [math]\vec{p}[/math], both starting at [math][0, 0][/math] and ending in the points [math]S[/math] and [math]P[/math] respectively. I'm looking for a vector [math]\vec{x}[/math](starting at [math][0, 0][/math] and ending in the point [math]X[/math]) that satisfies the equation [math]|\vec{s}-\vec{x}| = z \cdot |\vec{s} - \vec{p}|[/math], and that [math]X \in \; \rightarrow SP[/math] (I hope that's the proper syntax for a ray begining in S and going through P). In layman's terms, I'm trying to "zoom in" on [math]S[/math]. Now, the obvious way to solve the problem is find the equation for the ray (or line to be percise, and then just check if you're on the right side of [math]S[/math]) and then solve the two equations, which should look like this: [math]z \cdot \sqrt{(p_x-s_x)^2+(p_y-s_y)^2} = \sqrt{(x-s_x)^2+(y-s_y)^2}[/math] [math]y={\frac {x \left( s_{{y}}-p_{{y}} \right) }{s_{{x}}-p_{{x}}}}+{\frac {p_{{x}}s_{{y}}-p_{{y}}s_{{x}}}{p_{{x}}-s_{{x}}}} [/math] Unfortunately, the length of these solutions approach the length of the US Constitution...well, maybe not quite, but still long enough. So I was wondering if maybe there was a simpler way. Thanks in advance, Gabe
  20. I'm sure Transdecimal knows what irrational numbers are. And in any case, he didn't say "write down with a finite number of digits", he said "convert from decimal to binary". Which is very possible, unless there's a catch in that sentence I'm missing.
  21. That's my view as well. Although I admit it does get frustrating at times, I'm still impressed.
  22. Sure...while I'm not absolutely positive, I think it's the same as converting any number with a fractional part. Just keep fitting in powers of two. When you get to [math]2^0[/math], you just go on with [math]2^{-1}, 2^{-2}[/math] etc...but since it's irrational you'll just keep going on for ever. Here are the first few digits of Pi in binary (source: Wiki) 11.00100100001111110110... Here's [math]\sqrt {2}[/math](wiki again): 1.0110101000001001111... An algorithm for converting fractional numbers into binary is described in the wiki article on the binary numeral system. You should also have a look at representing real numbers. Hope this helps, Gabe
  23. It never said it would predict the answers, it said it would compute them from the data at hand. Although it would be nice to be able to ask it "What is the probability of bin Laden being in Paris at 1650 tomorow?" In other words, it'd be nice to have Spock on a web page...
  24. It's happening! Check it out: http://www.wolframalpha.com My feelings would best be described at surprised, meant in both the positive and negative way. While there are a lot of things that are infinitely cool, such as when you type in a mathematical problem, say [math] \frac{d}{dx} sin(x) + cos(x)[/math] you can ask it to show you the steps it took to arrive at the result, not just the result, although I'm not sure it works for every single computation. Another is the extent of data available in certain areas. For example, I was astounded to find out that it had weather records dating back nearly 70 years for the town I live in (Pisek; population of 30k, in the middle of nowhere, South Czech Republic). And it certainly doesn't end there. However, I was also disappointed by the lack of information in certain areas. For example, if you type in complex plane, or ferrofluid, it hasn't got a clue what you're talking about. Another one, if you type in "life expectancy male age 17 in Czech Republic", it gives you result, but add "smoker", and it's speachless. If you type in "smoker male age 17" it gives you lots of graphs, LDL cholesterol ammount, systolic BP and whatnot. But replace "smoker" with "heroin addict", or "drug user", or just "drug", and it just doesn't know. Same with "heroin addicts in USA" or "drug users in USA". Another one, if you type in "distance from Pisek to Sacramento", it gives you a result. But if you type in "distance from Pisek to Sacramento / 5 mph" it gives you a fraction with empty spaces (no result). If you type in "distance from Pisek to Sacramento at 5 mph" it won't give you a result. But if you type "pisek to sacramento at 5 mph", it will give you a result. Another example, if you type in "number of males", it gives you a result, with plots and everything, but if you type in "number of females", it will interpret "female" as a physical quantity and give you nothing. To get the result, you need to type in "female population in all countries", or a suitable variation of that. And for that last one, I'm just waiting for some hardcore feminists to make an issue out of it (no offense intended). You'll also experience a lot of server overload errors if you try it out now, but that's to be expected, and I'm actually pretty impressed at how well it's holding up under the strain. They say they'll have the whole cluster up and running at the end of the weekend, and we should experience any problems after that. Anyway, as S. Wolfram said, this is just the beginning, and I'm confident that its repository of knowledge is going to grow fast. And even if it won't, I'll still consider May 15th 2009 a pivotal day in human history. So much data, and all of it is just a couple of keystrokes away. As a PS, a Wolfram Alpha Toolbar is available for FF and IE, along with other gadgets. Check the download section on the site, and ENJOY!!
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.