home *** CD-ROM | disk | FTP | other *** search
- Short: E modules+examples for BigNum library
- Author: maciejplewa@hotmail.com (Maciej Plewa)
- Uploader: maciejplewa@hotmail.com (Maciej Plewa)
- Version: 37.31 (BigNum.library), 1.0 (E-modules)
- Type: dev/e
- Requires: util/libs/Bignum.lha
-
-
- Introduction
- """"""""""""
- This archive contains modules and some sources (little changed for better
- performance in E code) for BigNum.library (all ⌐ Allebrand Brice).
-
-
- Translation
- """""""""""
- Modules:
-
- 'clib/BigNum_protos.h' -> 'libraries/bignum.m' (with source)
- 'fd/Bignum_lib.fd' -> 'bignum.m'
-
- Examples:
-
- ADD, DIV, INFO, LUCAS, MUL, PGCD
-
- Module 'bignum.m' was translated by FD2Module (so there's no E-source).
-
-
- Usage in E
- """"""""""
- 1) MODULE 'bignum', 'libraries/bignum'
-
- 2) Then declare your BigNums : DEF x:PTR TO bignum, z:PTR TO bignum, ...
-
- 3) Open the library with the common way.
-
- 4) Initialize BigNums : x:=BigNumInit(); y:=BigNumInit() ...
-
- 5) Make your computations......
- .....
- ......
- .....
-
- 6) After using, FREE THEM or you'll have warning message when you close
- the library. If you forget it, this won't crash the machine or lose
- memory, but it is an efficient way to know if what you've done is
- right
- e.g if you Init 5 BigNums then call BigNumFree(5)
-
- 7) Close the library or you'll lose memory.
-
- Have a look at examples....
-
- (rewritten from original documentation)
-
-
- Bugs
- """"
- Module 'libraries/bignum' doesn't contain following C declarations (for
- older versions of Bignum.library - don't care about them):
-
- #define SetNul(x) {(x)->chiffres[(x)->nc=0]=0;(x)->signe=1;}
- #define Size(x) ((x)->nc+1)
- #define Even(x) (!((x)->chiffres[0]&1))
- #define AbsBigNum(x,y) {Assign(x,y);x->signe=1;}
- #define IsPositive(x) ((x)->signe)
- #define IsNul(x) (((!(x)->nc)&&(!(x)->chiffres[0]))?1:0)
-
-
- Public Domain
- """""""""""""
-
- We are all waiting for PPC BigNum.library!
-
-
- -8<---------------------------------
- Chomig/NonSense
- maciejplewa@hotmail.com
- http://members.tripod.com/~nscomp/
- Most hippy Amiga 1240
- - flower power -
- --------------------------------->8-
-