lukebhan / numlib

A completely self-dependent aribitrary precision numerical library.
0 stars 1 forks source link

Switch from vector form of BigInt to a binary representation #10

Open lukebhan opened 4 years ago

ayazhafiz commented 4 years ago

How do you want to do this?

lukebhan commented 4 years ago

I have no idea lol. See if you can read anything on it. That's what I would do. Maybe something like a bitboard in chess programming would be my first guess but not sure.

ayazhafiz commented 4 years ago

What do you think of the idea I had in the other issue, where we encode digits in a larger integer? Like 18 -> 1 << 3 + 8. Might not be the best idea but maybe fine to start with?

lukebhan commented 4 years ago

Started looking into the source code of rug for this one. They use gmp numbers for storage which would be a dependency. Thoughts @timothycobrien @ayazhafiz

ayazhafiz commented 4 years ago

I feel like that’s fine (and easier) but you will probably run into the same limitations as rug? not sure

ayazhafiz commented 4 years ago

for bigint it’s probably good enough bc the ints are arbitrary precision right

lukebhan commented 4 years ago

I think so, maybe more exploration is needed. Also, where can I find the code for cc on your website. I'm building a website and want my to have a blog and I found your cc to be sexy

ayazhafiz commented 4 years ago

yeah i think so too. i have one impl i’ll add it later today.

It’s closed source but I’ll add you as a collaborator

timothycobrien commented 4 years ago

Closed source 🤢

ayazhafiz commented 4 years ago

I mean it’s a personal website I don’t really want the public to edit it haha