[eisseeker] Re: bignum?

  • From: Thomas Baruchel <baruchel.research@xxxxxxxxxxx>
  • To: eisseeker@xxxxxxxxxxxxx
  • Date: Wed, 22 Oct 2003 21:18:43 +0200

Brest, le mercredi 22 octobre
> looking at the implemented filters, you have excluded all that
> need any arithmetic. I guess you are aware that you need a bignum
> package additionally --- do you have preferences for that?
> gmp? pari?  or should that be kept outside your tool?

Nice to be able to answer to you! Well, as you will see it tonight
if you download the release I will upload in a few hours at
http://baruchel.thomas.free.fr/eisseeker.tar.gz
I do the following thing concerning the "meta-parser" (derivate),
which parses the database, and transform each sequence into its
derivate before giving it to the user: just playing with the string
version of the sequence, just after it has been read, I return a
pointer to another string being:
  "(list (- 2 1) (- 3 2) (- 4 3) )"
For a sequence like ,1,2,3,4

Then, guile applies the lambda function given by the user to a scheme
evaluation of that string: thus, two things are done at once:
evaluating a mathematical transformation of the sequence with
bignums allowed, and transforming it to a Scheme object ready to use.
Much can be done by that way (I also have a meta parser which discards
sequences that are not increasing sequences, by comparing the string
versions of the numbers, which is easy).

Of course, handling big numbers as strings to be converted by
libguile may help for much, but maybe you are thinking to
arbitrary precision arithmetic. I know that deeper things may need a bignum
library. I have no preference; pari may be a good idea, since it offers more
that only bignums (many interesting functions that gmp does not know...). I
have not thought much about it yet, and have no idea. What do you think of it?

I would be interested to know if you already have precise projects in mind
when you speak about bignum librairies ?

Cordially,

-- 
« nous devons agir comme si la chose qui peut-être ne sera pas devait
être » (Kant, Métaphysique des moeurs, doctrine du droit, II conclusion)

  Thomas Baruchel <thomas.baruchel@xxxxxxxxxxx>

Other related posts: