Macaulay2 / Macaulay2/M2

memoize GF

Open
#1,993 3 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Core seeking a volunteer
Dominant language
Macaulay2
Stars
435
Forks
297
Avg merge
4d 20h
Merged PRs (30d)
11

Description

Hi! I saw this in the documentation which I guess is not the desired behavior.

i3 : tally for i to 100 list random GF 11

o3 = Tally{-1 => 1}
           -1 => 1
           -1 => 1
           -1 => 1
           -1 => 1
           -1 => 1
           -1 => 1
           -1 => 1
           -1 => 1
           -2 => 1
           -2 => 1
           -2 => 1
           -2 => 1
           -2 => 1
           -2 => 1
           -2 => 1
           -2 => 1
           -2 => 1
           -2 => 1
           -2 => 1
           -2 => 1
           -2 => 1
           -2 => 1
           -2 => 1
           -3 => 1
...

This could be fixed by making GF memoized. I saw this trick in the package "Cyclotomic", where the same number would always give the exact same cyclotomic field.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the documented random GF 11 example and compare it with the memoization behavior described for the Cyclotomic package. Trace the implementation of GF and its tests, then verify that repeated construction of the same field produces consistent values and that the regression is covered by a test.

Written by the indexing model from the issue text.

Assessment

Domain
tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.