home *** CD-ROM | disk | FTP | other *** search
/ Dream 57 / Amiga_Dream_57.iso / Amiga / Programmation / e / Modules / bignume.readme < prev    next >
Encoding:
Text File  |  1998-09-25  |  2.0 KB  |  83 lines

  1. Short:    E modules+examples for BigNum library
  2. Author:   maciejplewa@hotmail.com (Maciej Plewa)
  3. Uploader: maciejplewa@hotmail.com (Maciej Plewa)
  4. Version:  37.31 (BigNum.library), 1.0 (E-modules)
  5. Type:     dev/e
  6. Requires: util/libs/Bignum.lha
  7.  
  8.  
  9. Introduction
  10. """"""""""""
  11. This archive contains modules and some sources (little changed for better
  12. performance in E code) for BigNum.library (all ⌐ Allebrand Brice).
  13.  
  14.  
  15. Translation
  16. """""""""""
  17. Modules:
  18.  
  19. 'clib/BigNum_protos.h' -> 'libraries/bignum.m' (with source)
  20. 'fd/Bignum_lib.fd'     -> 'bignum.m'
  21.  
  22. Examples:
  23.  
  24. ADD, DIV, INFO, LUCAS, MUL, PGCD
  25.  
  26. Module 'bignum.m' was translated by FD2Module (so there's no E-source).
  27.  
  28.  
  29. Usage in E
  30. """"""""""
  31. 1) MODULE 'bignum', 'libraries/bignum'
  32.  
  33. 2) Then declare your BigNums : DEF x:PTR TO bignum, z:PTR TO bignum, ...
  34.  
  35. 3) Open the library with the common way.
  36.  
  37. 4) Initialize BigNums : x:=BigNumInit(); y:=BigNumInit() ...
  38.  
  39. 5) Make your computations......
  40.    .....
  41.      ......
  42.          .....
  43.  
  44. 6) After using, FREE THEM or you'll have warning message when you close
  45.    the library. If you forget it, this won't crash the machine or lose
  46.    memory, but it is an efficient way to know if what you've done is
  47.    right
  48.    e.g if you Init 5 BigNums then call BigNumFree(5)
  49.  
  50. 7) Close the library or you'll lose memory.
  51.  
  52. Have a look at examples....
  53.  
  54. (rewritten from original documentation)
  55.  
  56.  
  57. Bugs
  58. """"
  59. Module 'libraries/bignum' doesn't contain following C declarations (for
  60. older versions of Bignum.library - don't care about them):
  61.  
  62. #define SetNul(x) {(x)->chiffres[(x)->nc=0]=0;(x)->signe=1;}
  63. #define Size(x) ((x)->nc+1)
  64. #define Even(x) (!((x)->chiffres[0]&1))
  65. #define AbsBigNum(x,y) {Assign(x,y);x->signe=1;}
  66. #define IsPositive(x) ((x)->signe)
  67. #define IsNul(x) (((!(x)->nc)&&(!(x)->chiffres[0]))?1:0)
  68.  
  69.  
  70. Public Domain
  71. """""""""""""
  72.  
  73. We are all waiting for PPC BigNum.library!
  74.  
  75.  
  76. -8<---------------------------------
  77.            Chomig/NonSense
  78.        maciejplewa@hotmail.com
  79.  http://members.tripod.com/~nscomp/
  80.        Most hippy Amiga 1240
  81.          - flower power -
  82. --------------------------------->8-
  83.