Announcement

Collapse
No announcement yet.

Program to factor a given number

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Program to factor a given number

    A New Way to Factor a Number
    Last edited by Mark Hunter; 7 Aug 2017, 01:58 PM.
    Politically incorrect signatures about immigration patriots are forbidden. Googling “immigration patriots” is forbidden. Thinking about Googling ... well, don’t even think about it.

  • #2
    "Invalid page URL" by clicking on your link, Mark.
    Rod
    "To every unsung hero in the universe
    To those who roam the skies and those who roam the earth
    To all good men of reason may they never thirst " - from "Heaven Help the Devil" by G. Lightfoot

    Comment


    • #3
      Had to change your link to get the (or a) page.

      http://ariwatch.com/VS/Algorithms/Ne...ctorNumber.htm
      Dale

      Comment


      • #4
        Okay Mark, what about that code???????????

        You wrote it???

        You want to know what a "factor" is???
        Dale

        Comment


        • #5
          The program below is written for PowerBasic PBCC. A Windows executable is provided above if you just want to run the program.
          We have a "source code forum" here.
          What we put in there are things like "PowerBASIC source code for factoring."

          Quite a few postings in that forum include an executable, attached as a ZIP file or bundled into same with the source. ( Source Code Bundler v 3 handles PBWIN v 7/8/9/10 and PBCC v 3/4/5/6 source code )

          Just sayin', you know?


          MCM

          ADDED:
          Sheesh, 'cut and paste' does some strange and wondrous things vis-a-vis formatting!
          Michael Mattias
          Tal Systems Inc.
          Racine WI USA
          mmattias@talsystems.com
          http://www.talsystems.com

          Comment


          • #6
            Dale, I doubt that you really think I don’t know what a factor is. He manufactures a line of make up products for women, right?

            About knowing how to post, the new version of the forum software threw me for a loop by automatically inserting the PB domain name into the link I provided, now fixed.

            I’ve sort of jumped the gun putting up the webpage because I haven’t written a word / conceptual description of the algorithm. I don’t completely understand it at this point. It works though, I’ve tested it on zillions of numbers. A zillion means I got tired of seeing “correct” at the end of the output.

            At least the output is amusing. Enter a number then press M for the movie. This isn’t your usual factorization method.

            Note that in the program all binary numbers are written the way nature intended, from low bit to high. The unenlightened call that writing in reverse but unless you’re an Arab it’s as forwards as written text. In grade school they taught you to write numbers “sdrawkcab”.
            Last edited by Mark Hunter; Yesterday, 04:27 PM.
            Politically incorrect signatures about immigration patriots are forbidden. Googling “immigration patriots” is forbidden. Thinking about Googling ... well, don’t even think about it.

            Comment


            • #7
              Thanxx a lot Mark those are good algos

              Comment


              • #8
                Dale, I doubt that you really think I don’t know what a factor is.
                Never assume anyone has any certain skill.

                But in this case, as per...
                ..what about that code? ..
                .. I think we may safely assume OP forgot something. (Either forgot to ask something or forgot we have a better place for source code submissions).

                MCM
                Michael Mattias
                Tal Systems Inc.
                Racine WI USA
                mmattias@talsystems.com
                http://www.talsystems.com

                Comment


                • #9
                  About MCM’s last post, like the Bourbons I have forgotten nothing and learned nothing.

                  I upgraded the code a little (see post #1). Prettier display mainly.
                  Politically incorrect signatures about immigration patriots are forbidden. Googling “immigration patriots” is forbidden. Thinking about Googling ... well, don’t even think about it.

                  Comment

                  Working...
                  X