chummersone / chummersone.github.io

MIT License
11 stars 1 forks source link

support for 64bit fixed values #5

Closed hinxx closed 8 hours ago

hinxx commented 18 hours ago

I've forked your repo and tried to make it handle 64bit word sizes by editing couple of lines of code as seen here https://github.com/hinxx/fixedint.

Do you think this is correct way of doing it?

chummersone commented 16 hours ago

Hey. Looks fine to me. Some time ago I changed the internals to use BigInt, so it should be relatively agnostic to word size. I noticed the changes to the _wordMask method, but I think the current implementation is a hangover from the pre-BigInt implementation. You need only keep the if branch.

chummersone commented 16 hours ago

FWIW, I made the change to _wordMask, and added 64-bit as an option.

hinxx commented 8 hours ago

Thanks for update !!