|
From: thomas.mertes on 20 Apr 2008 16:51 Hello, I have released a new version of Seed7: seed7_05_20080420.tgz In the Seed7 programming language new statements and operators can be declared easily. Types are first class objects and therefore templates/generics need no special syntax. Object orientation is used when it brings advantages and not in places when other solutions are more obvious. Seed7 is covered by the GPL (and LGPL for the Seed7 runtime library). Changelog: - An explatation how to uncompress the Seed7 package was added to the FAQ. - The descriptions of the functions log2, gcd, lowestSetBit, 'rem', 'mdiv' and 'mod' in the manual were added or improved. - The functions gcd and modInverse were added to the bigint.s7i library. - The bigrat.s7i library was changed to use the gcd function from the bigint.s7i library. - The chkbig.sd7 program was improved with additional checks for the monadic plus, 'div', 'rem', 'mdiv', 'mod' and bigInteger constants. - The chkexc.sd7 program was improved with additional checks for bigInteger functions. - The chk_all.sd7 program was improved to take the new checks into account. - The compiler (comp.sd7) was improved to work also with GMP's bigInteger's. - The compiler was improved to support big_plus and big_gcd. - The handling of +:=, -:=, *:=, <<:= and >>:= in the compiler was improved to avoid memory leaks. - The handling of the bigInteger 'mdiv' and * in the compiler was improved to do some optimisations like using shift operations instead. - Three example programs printpi1.sd7, printpi2.sd7 and printpi3.sd7 were added. - The big_gmp.c interface library was added to allow bigInteger computations based on the mpz_ functions of the GMP library. - The file big_rtl.h was renamed to big_drv.h. - The file biglib.c was change to allow working with big_rtl.c or big_gmp.c . - The file big_rtl.c was improved to work with a BIGDIGIT_SIZE of 32. - The functions bigHexCStri, uBigMultSub, uBigSqare, bigClit, bigCmpSignedDigit, bigDiv, bigGcd, bigGrow, bigImport, bigLShift, bigLShiftAssign, bigMDiv, bigMod, bigOdd, bigRem, bigRShift, bigShrink and bigToBStri of the file big_rtl.c were added or improved. - An error message about "match value failed" was suppressed in dcllib.c . - The int_mdiv action (defined in intlib.c) was improved for speed. - The function prot_bigint (defined in traceutl.c) was changed to use bigHexCStri. - The function printtype (defined in traceutl.c) was changed to avoid writing a pointer value. - A bug in the function typHashCode (defined in typ_data.c) was fixed. - The file read_me.txt was improved to contain a chapter about warnings and a chapter which explains how to use the GMP library. Greetings Thomas Mertes Seed7 Homepage: http://seed7.sourceforge.net Seed7 - The extensible programming language: User defined statements and operators, abstract data types, templates without special syntax, OO with interfaces and multiple dispatch, statically typed, interpreted or compiled, portable, runs under linux/unix/windows.
From: Mensanator on 22 Apr 2008 00:26 On Apr 20, 3:51 pm, thomas.mer...(a)gmx.at wrote: > - The file read_me.txt was improved to contain a chapter about > warnings and a chapter which explains how to use the GMP library. I'm having problems with this (regular bigInt compiled fine). I'm using cygwin and modified the makefile thusly: # LIBS = c:/cygwin/usr/X11R6/lib/libX11.dll.a -lncurses -lm LIBS = c:/cygwin/usr/X11R6/lib/libX11.dll.a -lncurses -lm C:/cygwin/ Seed7/seed7/lib/libgmp.a SEED7_LIB = seed7_05.a COMP_DATA_LIB = s7_data.a COMPILER_LIB = s7_comp.a CC = gcc # BIGINT = big_rtl BIGINT = big_gmp I had to use a full path for my gmp library which is libgmp.a like I had to do for libX11.dll.a. Before that change, I had "file not found" errors. Also, put gmp.h into Seed7/src folder, that made most of the reference problems stop. But I'm still getting gcc hi.o s7_comp.a s7_data.a seed7_05.a c:/cygwin/usr/X11R6/lib/ libX11.dll.a -l ncurses -lm C:/cygwin/Seed7/seed7/lib/libgmp.a -o hi seed7_05.a(fil_rtl.o):fil_rtl.c:(.text+0x76): undefined reference to `_bigUIConv' seed7_05.a(fil_rtl.o):fil_rtl.c:(.text+0x11d): undefined reference to `_bigUIConv' Info: resolving _cur_term by linking to __imp__cur_term (auto-import) collect2: ld returned 1 exit status make: *** [hi] Error 1 Am I missing something? Or have a file in the wrong place?
From: thomas.mertes on 22 Apr 2008 02:46 On 22 Apr., 06:26, Mensanator <mensana...(a)aol.com> wrote: > On Apr 20, 3:51 pm, thomas.mer...(a)gmx.at wrote: > > > - The file read_me.txt was improved to contain a chapter about > > warnings and a chapter which explains how to use the GMP library. > > I'm having problems with this (regular bigInt compiled fine). > > I'm using cygwin and modified the makefile thusly: > > # LIBS = c:/cygwin/usr/X11R6/lib/libX11.dll.a -lncurses -lm > LIBS = c:/cygwin/usr/X11R6/lib/libX11.dll.a -lncurses -lm C:/cygwin/ > Seed7/seed7/lib/libgmp.a > SEED7_LIB = seed7_05.a > COMP_DATA_LIB = s7_data.a > COMPILER_LIB = s7_comp.a > CC = gcc > > # BIGINT = big_rtl > BIGINT = big_gmp > > I had to use a full path for my gmp library which is libgmp.a like I > had to do for > libX11.dll.a. Before that change, I had "file not found" errors. > > Also, put gmp.h into Seed7/src folder, that made most of the > reference problems stop. > > But I'm still getting > > gcc hi.o s7_comp.a s7_data.a seed7_05.a c:/cygwin/usr/X11R6/lib/ > libX11.dll.a -l > ncurses -lm C:/cygwin/Seed7/seed7/lib/libgmp.a -o hi > seed7_05.a(fil_rtl.o):fil_rtl.c:(.text+0x76): undefined reference to > `_bigUIConv' > seed7_05.a(fil_rtl.o):fil_rtl.c:(.text+0x11d): undefined reference to > `_bigUIConv' > Info: resolving _cur_term by linking to __imp__cur_term (auto-import) > collect2: ld returned 1 exit status > make: *** [hi] Error 1 > > Am I missing something? Or have a file in the wrong place? All files are at the right place. The function bigUIConv is really missing from the file big_gmp.c . Sorry, but I had not the possibility to check cygwin (linux and MinGW do not need it). The good message is: bigUIConv is very simple: ---------------------------------------- #ifdef ANSI_C gmpBiginttype bigUIConv (inttype number) #else gmpBiginttype bigUIConv (number) inttype number; #endif { gmpBiginttype result; /* bigUIConv */ result = malloc(sizeof(__mpz_struct)); mpz_init_set_ui(result, number); return(result); } /* bigUIConv */ ---------------------------------------- If you add it at the end of the file big_gmp.c you should succeed. I hope that helps. Sorry for the trouble. If there are other problems: Please tell me. Greetings Thomas Mertes Seed7 Homepage: http://seed7.sourceforge.net Seed7 - The extensible programming language: User defined statements and operators, abstract data types, templates without special syntax, OO with interfaces and multiple dispatch, statically typed, interpreted or compiled, portable, runs under linux/unix/windows.
From: Mensanator on 22 Apr 2008 13:09 On Apr 22, 1:46 am, thomas.mer...(a)gmx.at wrote: > On 22 Apr., 06:26, Mensanator <mensana...(a)aol.com> wrote: > > > > > > > On Apr 20, 3:51 pm, thomas.mer...(a)gmx.at wrote: > > > > - The file read_me.txt was improved to contain a chapter about > > > warnings and a chapter which explains how to use the GMP library. > > > I'm having problems with this (regular bigInt compiled fine). > > > I'm using cygwin and modified the makefile thusly: > > > # LIBS = c:/cygwin/usr/X11R6/lib/libX11.dll.a -lncurses -lm > > LIBS = c:/cygwin/usr/X11R6/lib/libX11.dll.a -lncurses -lm C:/cygwin/ > > Seed7/seed7/lib/libgmp.a > > SEED7_LIB = seed7_05.a > > COMP_DATA_LIB = s7_data.a > > COMPILER_LIB = s7_comp.a > > CC = gcc > > > # BIGINT = big_rtl > > BIGINT = big_gmp > > > I had to use a full path for my gmp library which is libgmp.a like I > > had to do for > > libX11.dll.a. Before that change, I had "file not found" errors. > > > Also, put gmp.h into Seed7/src folder, that made most of the > > reference problems stop. > > > But I'm still getting > > > gcc hi.o s7_comp.a s7_data.a seed7_05.a c:/cygwin/usr/X11R6/lib/ > > libX11.dll.a -l > > ncurses -lm C:/cygwin/Seed7/seed7/lib/libgmp.a -o hi > > seed7_05.a(fil_rtl.o):fil_rtl.c:(.text+0x76): undefined reference to > > `_bigUIConv' > > seed7_05.a(fil_rtl.o):fil_rtl.c:(.text+0x11d): undefined reference to > > `_bigUIConv' > > Info: resolving _cur_term by linking to __imp__cur_term (auto-import) > > collect2: ld returned 1 exit status > > make: *** [hi] Error 1 > > > Am I missing something? Or have a file in the wrong place? > > All files are at the right place. The function bigUIConv is > really missing from the file big_gmp.c . Sorry, but I had not > the possibility to check cygwin (linux and MinGW do not need > it). The good message is: bigUIConv is very simple: > > ---------------------------------------- > #ifdef ANSI_C > > gmpBiginttype bigUIConv (inttype number) > #else > > gmpBiginttype bigUIConv (number) > inttype number; > #endif > > { > gmpBiginttype result; > > /* bigUIConv */ > result = malloc(sizeof(__mpz_struct)); > mpz_init_set_ui(result, number); > return(result); > } /* bigUIConv */ > ---------------------------------------- > > If you add it at the end of the file big_gmp.c you should > succeed. > > I hope that helps. Sorry for the trouble. Thanks! That fixed it. Hate to be a pest, but I've got three different machines with three different cygwin configurations. I try my best to resolve things, but compilers aren't my forte. I even considered trying to find the missing reference, but I can see that I never would have resolved it. > If there are other problems: Please tell me. I haven't had time to run it yet, but I plan to use the gmp version when I do a Seed7 implementation of Sedgewick's algorithm and we don't want my C version to have an unfair advantage. > > Greetings Thomas Mertes > > Seed7 Homepage: http://seed7.sourceforge.net > Seed7 - The extensible programming language: User defined statements > and operators, abstract data types, templates without special > syntax, OO with interfaces and multiple dispatch, statically typed, > interpreted or compiled, portable, runs under linux/unix/windows.- Hide quoted text - > > - Show quoted text -
From: thomas.mertes on 25 Apr 2008 02:30 On 22 Apr., 19:09, Mensanator <mensana...(a)aol.com> wrote: > On Apr 22, 1:46 am, thomas.mer...(a)gmx.at wrote: > > On 22 Apr., 06:26, Mensanator <mensana...(a)aol.com> wrote: > > > On Apr 20, 3:51 pm, thomas.mer...(a)gmx.at wrote: > > > > - The file read_me.txt was improved to contain a chapter about > > > > warnings and a chapter which explains how to use the GMP library. > > > > I'm having problems with this (regular bigInt compiled fine). > > > > I'm using cygwin and modified the makefile thusly: > > > > # LIBS = c:/cygwin/usr/X11R6/lib/libX11.dll.a -lncurses -lm > > > LIBS = c:/cygwin/usr/X11R6/lib/libX11.dll.a -lncurses -lm C:/cygwin/ > > > Seed7/seed7/lib/libgmp.a > > > SEED7_LIB = seed7_05.a > > > COMP_DATA_LIB = s7_data.a > > > COMPILER_LIB = s7_comp.a > > > CC = gcc > > > > # BIGINT = big_rtl > > > BIGINT = big_gmp > > > > I had to use a full path for my gmp library which is libgmp.a like I > > > had to do for > > > libX11.dll.a. Before that change, I had "file not found" errors. > > > > Also, put gmp.h into Seed7/src folder, that made most of the > > > reference problems stop. > > > > But I'm still getting > > > > gcc hi.o s7_comp.a s7_data.a seed7_05.a c:/cygwin/usr/X11R6/lib/ > > > libX11.dll.a -l > > > ncurses -lm C:/cygwin/Seed7/seed7/lib/libgmp.a -o hi > > > seed7_05.a(fil_rtl.o):fil_rtl.c:(.text+0x76): undefined reference to > > > `_bigUIConv' > > > seed7_05.a(fil_rtl.o):fil_rtl.c:(.text+0x11d): undefined reference to > > > `_bigUIConv' > > > Info: resolving _cur_term by linking to __imp__cur_term (auto-import) > > > collect2: ld returned 1 exit status > > > make: *** [hi] Error 1 > > > > Am I missing something? Or have a file in the wrong place? > > > All files are at the right place. The function bigUIConv is > > really missing from the file big_gmp.c . Sorry, but I had not > > the possibility to check cygwin (linux and MinGW do not need > > it). The good message is: bigUIConv is very simple: > > > ---------------------------------------- > > #ifdef ANSI_C > > > gmpBiginttype bigUIConv (inttype number) > > #else > > > gmpBiginttype bigUIConv (number) > > inttype number; > > #endif > > > { > > gmpBiginttype result; > > > /* bigUIConv */ > > result = malloc(sizeof(__mpz_struct)); > > mpz_init_set_ui(result, number); > > return(result); > > } /* bigUIConv */ > > ---------------------------------------- > > > If you add it at the end of the file big_gmp.c you should > > succeed. > > > I hope that helps. Sorry for the trouble. > > Thanks! That fixed it. > > Hate to be a pest, but I've got three different machines with > three different cygwin configurations. I try my best to resolve > things, but compilers aren't my forte. I even considered trying > to find the missing reference, but I can see that I never would > have resolved it. > > > If there are other problems: Please tell me. > > I haven't had time to run it yet, but I plan to use the gmp > version when I do a Seed7 implementation of Sedgewick's > algorithm and we don't want my C version to have an unfair > advantage. Can you give me an update. What should I add to the next release (except for a faster modInverse function)? BTW.: What results does mpz_invert(rop, op1, op2) have when op2 is negative? Is it defined at all? Is there some relation like: mpz_invert(rop, op1, -op2) = mpz_invert(rop, op1, op2) Greetings Thomas Mertes Seed7 Homepage: http://seed7.sourceforge.net Seed7 - The extensible programming language: User defined statements and operators, abstract data types, templates without special syntax, OO with interfaces and multiple dispatch, statically typed, interpreted or compiled, portable, runs under linux/unix/windows.
|
Next
|
Last
Pages: 1 2 Prev: But is it beautiful code? Next: Movado Women's Stalo Watch #0605510 - Replica Watch Fake |