Recent content by Lord Anoobis

  1. L

    Comp Sci C++, float and double having different effects on an if statement?

    Is this to do with the way the numbers are stored in memory? Also, how would I go about avoiding this in future?
  2. L

    Comp Sci C++, float and double having different effects on an if statement?

    I noted it for 1.59, 3.59, 5.59 and 6.59 where the given range in the problem is from 0 to 6.59.
  3. L

    Comp Sci C++, float and double having different effects on an if statement?

    So I used this statement, if (call_time > 0 && call_time <= 6.59) where the variable was declared as float. What is strange is that it didn't execute for call_time = 6.59, but for some other values, like if (call_time > 0 && call_time <= 2.59) the end value of the range does not cause any...
  4. L

    Ergonomics and success at gaming

    Speaking only for myself when it comes to chess, this is what I've found. With Chessmaster I've always used the 2D layout and these days I can take anyone up to about Elo 1900. Provided I'm looking at a 2D layout. I find that looking at an actual board or 3D depiction nowadays, my ability to see...
  5. L

    Comp Sci C++ random number generation

    On another note, when I was testing it earlier today multiple times, an even number of tosses always gave 2s and an uneven number 1s, from 1 all the way to 20 and on more than one attempt. It was only when I used say, 10, a number of times in succession that it eventually broke formation. If...
  6. L

    Comp Sci C++ random number generation

    Yeah, I can see now what you meant in the first post. Valuable lesson learned and thanks.
  7. L

    Comp Sci C++ random number generation

    I just had it generate randoms only. I was under the impression that in the case of it being in the loop it would generate a different number on each pass regardless.
  8. L

    Comp Sci C++ random number generation

    I'm not quite sure why the two cases behave so differently if the value of time(0) does not change for each repetition of the loop in both cases.
  9. L

    Comp Sci C++ random number generation

    Tried that just now. The value of time(0) stays the same in both cases but with different results. As long as seeder and its accomplices are part of the function its always 1s or 2s. Weird.
  10. L

    Comp Sci C++ random number generation

    The program works as intended. #include <iostream> #include <ctime> #include <cstdlib> int coinToss ();int main () { int tosses, result; std::cout << "How many coin tosses? "; std::cin >> tosses; size_t seeder = time(0); srand(seeder); for (int i = 0; i < tosses...
  11. L

    Series solution of a second order ordinary DE

    So it is. One tends to forget such things when extremely tired. It's approaching midnight here so it's time to say thank you and goodnight.
  12. L

    Series solution of a second order ordinary DE

    Actually, it appears to be correct. I thought it a bit odd that every term after that is zero. A bit of a sneaky question, I guess.
  13. L

    Series solution of a second order ordinary DE

    For a solution centred about the ordinary point , Then and Substitute into the equation: After extracting the first two terms from the second series, the first term from the third and the first two terms from the fourth in the equation above we have: Now for each...
  14. L

    Series solution of a second order ordinary DE

    Let me try that. Also, the reply button under Kuruman's response was giving an error message earlier for some reason.
  15. L

    Series solution of a second order ordinary DE

    They would not look any different, but is it not necessary in order to express the whole works as a single summation?
Back
Top