Git Product home page Git Product logo

divrep's People

Contributors

hvds avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Forkers

aenbleidd demis-1

divrep's Issues

pcoul and pcaul: bugs in walk_1_set

walk_1_set is called when preparation for applying p^e to the value v_i would fully use up the remaining tau available at that position. For example if the number of divisors is 12, and v_1 already has an allocation of 2^1.3^1, preparation for applying p^2 at that position would short-circuit by calling walk_1_set.

This function was introduced in release 20230208.

Bug 1: if a minimum prime is required (eg by running with -p50:100), a flag have_min is stored at each level of allocations to track whether we have already satisfied that requirement. walk_1_set checks that flag to decide whether primes less than the minimum should be checked or not, but have_min has not at that point been propagated from the previous level. As a result, it could think that it should check them when it shouldn't (which is suboptimal), or it could think that it should not check them when it should (which could risk missing a result).

If you have been running tests with a minimum prime, the results may not be correct.

Bug 2: when classifying the requirements of the other values for the walk, it wrongly classifies those requiring a square result as requiring a prime result. As a result it could claim an invalidate result, or miss a valid result.

Note that in most cases, if a square result is required we do not need further allocations (and if more than one square result is required we never do), so this bug would not be hit. It can occur only if we attempt further allocations after a square result is already required.

I'm not sure if there's an easy way to determine whether a given run will hit this case. If anyone using the program contacts me with a couple of examples of runs they have been performing, I will attempt to analyse those cases to determine if they could have been affected.

Both of these bugs have 1-line fixes, which will be released shortly.

(Note that I spotted these problems while trying to extend the code to handle A309981; I have not encountered any problems myself with pcoul or pcaul.)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.