JamesCobras

Members
  • Content count

    130
  • Joined

  • Last visited

Community Reputation

112 Neutral

About JamesCobras

  • Rank
    Member
  1. Yeah I was thinking about an integer... So will it optimize for an integer? I can understand the float not. James
  2. Hi guys, just out of interest, I'm implementing an algoithm in which I'm using a mask on pixels (I'm doing a canny edge filter). The mask has a column where the contents are multiplied by 0. I could just skip the column, by deleting the code for this column, but I want it to be clear. If I times by a constant of zero will the compiler ignore that part of the code? Or will it perform the calculation? Cheers Guys James
  3. Checking Large Primes

    just for the record i'm talking about the number (2^243,112,609) − 1. This has as many DIGITS as i said in the first post. secondly this method tests every number up to 1/2 of the original to see if it is a factor. @dmatter are you thinking of a different algorithm? just out of interest which one? JamesCobras
  4. Checking Large Primes

    high guys, just as a technical exercise. I want to see how fast i can check a prime deterministically. I have a HUGE prime. 12,978,189 DIGITS. The biggest and i'm trying to see how far i can get the checking time down. Obviously i started with a basic divide by every number. (to set a bench mark). Which returned a truly hilarious time. Just curious how fast is the % operation compared to the / operation. I've used % but i want the most efficient / version in my brute force benchmark one. Cheers JamesCobras P.S. i'm using c++ [Edited by - JamesCobras on September 11, 2010 4:47:34 PM]
  5. Really Really Really Long Numbers C++

    The application is going to be an array of functions, the first part will be finding large primes and other large number calculations.
  6. Really Really Really Long Numbers C++

    Cheers, i think that's exactly what i wanted. I want to use C++ as opposed to python or others as it feels faster, which is really important in the application i have in mind. Cheers JamesCobras
  7. Hi guys, i want to do some maths on a computer using massive numbers like 2^1000000. I know this will fit into ram. But how should i go about creating this value in ram so i can X / + - with it. I also need perfect accuracy so short-cuts won't work. Do i have to define my own type? Is there a lib. for it? Where do i start? Any help/comments welcome. JamesCobras
  8. One Time Pad

    Guys i've been looking at the one time pad. I know that the downside is that it can only be used once, or it can be cracked (or i think this is the case). And it must be as large as the message it's encrypting. However is it really as unbreakable as i've heard, or have things moved on? JamesCobras
  9. Checking all collisions

    To be honest, i managed to pick up c++ with C++ for beginners (hope it doesn't show to often). However, create a few console applications before jumping into games. YOU MUST UNDERSTAND COMPUTER LOGIC, this is the key, if this is your first language take it slow, i suggest sticking to console programs for at least 40hrs of programming time till you get the hand of syntax and basic libraries. vectors are set up like this: std::vector<int> wall; or std::vector<TypeofVariable> VariableName; accessed like: VariableName[elementnumber] = i ;//(i is a variable of type TypeofVariable) can also access member of VariableName by: VariableName.whatever e.g. VariableName.pushback(i); //expands vector by 1 and adds varibale i to the new "row" created. Hope that gets you going. JamesCobras
  10. Using Camera as Input

    Cheers, guys, ,i can't believe i couldn't find that, turns out i was searching for a slightly different thing in google. I'll check the stuff out that you pointed me towards and let you know how my project progresses. Cheers JamesCobras
  11. Using Camera as Input

    C'mon, i can't believe that some one here hasn't used a camera as an input, google searches still aren't giving me any joy. Please help. JamesCobras
  12. Using Camera as Input

    Hi guys, using c++ how can i get images directly off a camera into a computer and into a buffer for processing in real time? is there a free library i can use? are there windows api commands i should be using? I'm planning on using a camera like Lumix DMZ TZ5, or do i have to use a specialised/webcam like camera? Any help would be great. Cheers guys! James
  13. Licensing (Comercial)

    hi guys, i'm trying to develop a program with i would like the possibility to sell. But the following things i don't want to do: Be forced to produce source code on demand. Be forced to distribute binaries with source. I'm using OpenGl, SDL and RakNet. SDL is fine, i just have to use .dll and i don't have to distribute source (i think). I think OpenGL have no licensing rules so i can do what i want. BUT if i use a library or code from a GNU licensed project is there anyway i can use it with out breaking the GNU and being forced to release source? JamesCobras
  14. OpenGl Matrices?!

    Yep, sorry when i said Directx i meant Direct3D. I thought the matrix functions were included in that... sounds like they were not so sorry for the original post looking like comparing two different things. Cheers for the help and clearing things up. Better start building up my code and start work with matrices. JamesCobras
  15. OpenGl Matrices?!

    multimatrix() and the other matrix function that i found is the exact kind of function that i was looking for, cheers! However i believe this is only in OpenGL 3.0 and below. I had a look at the specification of OpenGL 3.2 and found no way of transforming anything. as i'm new to opengl is there anything i'm missing, how are you supposed to deal with transforms with no functions to do it? JamesCobras