Search:

Type: Posts; User: Zaphod_b

Search: Search took 0.11 seconds.

  1. [SOLVED] Re: A linearithmic (at most) complexity algorithm to generate Pythagorean triples

    From the wikipedia article:



    You don't really need a separate explicit parameter for k; you can just let m and n get suitably large and test


    if ((((m - n) % 2) == 1) &&...
  2. [SOLVED] Re: A linearithmic (at most) complexity algorithm to generate Pythagorean triples

    An approach that worked for me: A couple of comments from my Java source:



    //
    // To generate all triples of interest up to a given number:
    //
    // Generate all primitive triples and their...
Results 1 to 2 of 2