Skip to content

Redundant mods ? #89

Description

@mogando668

From the file Math-Prime-Util/blob/master/congruent_numbers.c- quote :

 /* The ACK conjecture (Alter, Curtz, and Kubota 1972):
   *     n = {5,6,7} mod 8   =>  n is a congruent number
   * also follows from the weak BSD conjecture.
   */
  if (n % 8 == 5 || n % 8 == 6 || n % 8 == 7)  return 1;

Wouldn't it be the same with

    if ((n & 7) >= 5) {
        return 1
    }

or if you prefer to do away with the >= altogether, then a very weird way to express that would be

    if ((n & 4) * (n & 3)) {
        return 1
    }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions