Hi Johannes,
the library itself is very powerful and the documentation is detailed and professionaly presented. Good job!
Petr
P.S. I can see the attachement in first post okay.
This is the first complete release of my BigInt module for thinBasic.
All functionality that was in the thinBasic include script is present, along with functions to control conversion between ASCII strings and Big Integers.
Apart from the module DLL the zip file contains a small text file that explains how to get things started, a thinBasic script that tests all keywords and performs integrity checks, and a PDF manual. That manual is what makes the zip file so big, the original OpenOffice document is only 40 kBytes uncompressed.
Future developments
If you have any questions or bug reports, or if you have suggestions for new or expanded functions, or would like to see some aliases added (e.g. BigInt_DivideWithRemainder for BigInt_DivRem), create a topic for it in this subforum and I'll see what I can do.
- Internal addition, subtraction and multiplication are still in standard PowerBASIC. I will convert these to assembler which should speed up most operations.
- Some optimisations will certainly be added for BigInt_Prm and BigInt_Cmb. I will check the other functions to see if they can be optimised as well.
- Binary logic (and, or, etc.) and bit stream (set, clear, shift, rotate, etc.) functions will be added. Descriptions of these functions are already in the manual.
Last edited by Johannes; 04-03-2011 at 16:19.
Boole and Turing, help me!
Primary programming: 200 MHz ARM StrongARM, RISC OS 4.02, BASIC V, ARM assembler.
Secondary programming: 3.16 GHz Intel Core 2 Duo E8500, Vista Home Premium SP2, thinBasic, x86 assembler.
Hi Johannes,
the library itself is very powerful and the documentation is detailed and professionaly presented. Good job!
Petr
P.S. I can see the attachement in first post okay.
Learn 3D graphics with ThinBASIC, learn TBGL!
Windows 10 64bit - Intel Core i5-3350P @ 3.1GHz - 16 GB RAM - NVIDIA GeForce GTX 1050 Ti 4GB
Found a real doozy, in the internal subtraction subroutine of all places. If the subtracted value is more than one DWord smaller and the first DWord "above" the subtracted value is zero, then it all goes to hell.
The next bit of code should not print anything.
New module and test script in zip file in the "latest release" topic. Please upgrade.Uses "Console" Module "BigInt" Alias String As BigInt BigInt a,b String c a=BigInt_FromString("100000000000000000000000000000000_16") b=BigInt_FromString("10000000000000000_16") c=BigInt_ToString(BigInt_Sub(a,b),16) If c<>"+FFFFFFFFFFFFFFFF0000000000000000_16" Then PrintL "Something is wrong..."
Last edited by Johannes; 06-03-2011 at 13:47.
Boole and Turing, help me!
Primary programming: 200 MHz ARM StrongARM, RISC OS 4.02, BASIC V, ARM assembler.
Secondary programming: 3.16 GHz Intel Core 2 Duo E8500, Vista Home Premium SP2, thinBasic, x86 assembler.
www.thinbasic.com | www.thinbasic.com/community/ | help.thinbasic.com
Windows 10 Pro for Workstations 64bit - 32 GB - Intel(R) Xeon(R) W-10855M CPU @ 2.80GHz - NVIDIA Quadro RTX 3000
Eros, that is an excellent idea. I will create a new thread with just the latest release and remove the archives from this one.
Boole and Turing, help me!
Primary programming: 200 MHz ARM StrongARM, RISC OS 4.02, BASIC V, ARM assembler.
Secondary programming: 3.16 GHz Intel Core 2 Duo E8500, Vista Home Premium SP2, thinBasic, x86 assembler.
Bookmarks