News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

Bignums?

Started by NoCforMe, September 24, 2022, 07:21:52 AM

Previous topic - Next topic

NoCforMe

Anyone know anything about bignums?

Specifically, looking for actual implementations in assembler (or in C or some other translatable language), or even a good conceptual explanation.

Just found out about this technique. (Lets you handle numbers of any arbitrary size without being limited by the size of your registers.)
Assembly language programming should be fun. That's why I do it.

zedd151

From dedndave "Ling Long Kai Fang Bignum to ASCII"
http://masm32.com/board/index.php?topic=222.msg978#msg978


Something like this?
A search here for "Bignum" will yield some more results


I also have 'Ascii Adder' that I used for my fibonacci generator.
http://masm32.com/board/index.php?topic=7262.msg79593#msg79593
Adds ascii decimal text strings of virtually any length (depending on amount of memory allocated of course)...

NoCforMe

Um, maybe. Not sure that's the same thing, and not quite ready to delve into that code. But it might be that stuff.
Assembly language programming should be fun. That's why I do it.

zedd151

What do you need it for, what data type?
And, does it have to be fast?
At any rate I think there are still a few math nerds enthusiast members heer who may be able to help.

zedd151


NoCforMe

Thanks--that's exactly the sort of stuff I was looking for. I found that scholarly PDF myself, worth looking at. Also found a complete implementation guide (descriptive text, not code), for converting decimal #s to floating-point, which is what I'm interested in at the moment. Interesting stuff.
Assembly language programming should be fun. That's why I do it.

jj2007

You might search the forum for REAL16 or QuadMath, if that's precise enough.

NoCforMe

No, I want bignums. Gigantic, humongous, gargantuan #s. "Arbirtary precision".
Assembly language programming should be fun. That's why I do it.

zedd151

When I was working on ascii adder, I had made a wisecrack to dedndave about making an ascii subtractor , ascii multiplier, and ascii divider.
Of course I didn't complete that series but if I did, the next in line would have been ascii subtractor.
With those two, it's theoretically possible to do multiplication and division albeit longhand. And it doesn't have to be done with ascii text, could be data with adjustments of course. For floats, just keep good track of the decimal places.  :biggrin:
Sounds like a phun coding exercise. Perfect for the Laboratory. Any takers?
If I ever clear my slate of current projects, I might continue work in this vein with ascii subtractor.  :cool:  dedndave, jimg (helped with its use in the aforementioned fibonacci generator), and rrr314159 (iirc) were instrumental in my work on ascii adder giving some tips. That's when I learned of dedndaves Ling Long Kai Fang library btw.

NoCforMe

That stuff makes my head hurt.
Assembly language programming should be fun. That's why I do it.

daydreamer

Impressive code by raymond with bigness on huge 2^64 fibonnaci
http://masm32.com/board/index.php?topic=9773.msg107857#msg107857
my none asm creations
https://masm32.com/board/index.php?topic=6937.msg74303#msg74303
I am an Invoker
"An Invoker is a mage who specializes in the manipulation of raw and elemental energies."
Like SIMD coding