GithubHelp home page GithubHelp logo

Integer utilities module about swift-numerics HOT 12 OPEN

apple avatar apple commented on May 29, 2024
Integer utilities module

from swift-numerics.

Comments (12)

lemire avatar lemire commented on May 29, 2024 2

@NevinBR I'll be happy to help if that's helpful.

from swift-numerics.

stephentyrone avatar stephentyrone commented on May 29, 2024 1

Actually, I'll go ahead and do the basic module setup for you on main and drop a rotate implementation in to seed it, since I already have a pretty good idea what a first cut of that should look like, and then folks can put smaller PRs up adding individual features.

from swift-numerics.

SusanDoggie avatar SusanDoggie commented on May 29, 2024

Is bit reverse fit on this?

The FFT algorithm required bit reversal
https://en.wikipedia.org/wiki/Bit-reversal_permutation
https://github.com/apple/swift-numerics/blob/796a0dc3f74a60f102937f61cc363644513671d1/Sources/Accelerate/bit_reverse.swift

from swift-numerics.

stephentyrone avatar stephentyrone commented on May 29, 2024

Definitely!

from swift-numerics.

NevinBR avatar NevinBR commented on May 29, 2024

Would basic number-theory functions be in scope for this module?

  • gcd
  • lcm
  • Bézout coefficients
  • Modular inverse

from swift-numerics.

stephentyrone avatar stephentyrone commented on May 29, 2024

Yes, absolutely.

from swift-numerics.

NevinBR avatar NevinBR commented on May 29, 2024

I’d like to start working on this. What’s the recommended process?

Should there be a dedicate branch for work on this module?

from swift-numerics.

stephentyrone avatar stephentyrone commented on May 29, 2024

The first step is just to make a branch in your own clone of the repo. Once you have some initial work, we can either merge it to main or create a branch if it's going to be a longer term project to get a coherent API.

from swift-numerics.

stephentyrone avatar stephentyrone commented on May 29, 2024

#188

from swift-numerics.

NevinBR avatar NevinBR commented on May 29, 2024

What’s our file-naming strategy?

I see you’ve created “Rotated.swift”. Do we want all files to be that small and single-purpose, or should we rename it something like “BitwiseOperations.swift”?

The first function I’d like to add to this module is gcd (using the binary GCD algorithm), and I’m wondering if the filename should be “GCD.swift” or something broader like “ModularArithmetic.swift”?

from swift-numerics.

stephentyrone avatar stephentyrone commented on May 29, 2024

I'm not too worried about that; file naming is not public API so we can move them around. If it's only going to contain a GCD initially, let's name it "GCD.swift".

(Also, a GCD is useful outside of modular arithmetic contexts, so it feels misleading to stuff it in a ModularArithmetic.swift).

from swift-numerics.

stephentyrone avatar stephentyrone commented on May 29, 2024

Integer division and shifts with rounding: #203

from swift-numerics.

Related Issues (20)

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.