[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Chicken-users] chicken bug?

From: naruto canada
Subject: [Chicken-users] chicken bug?
Date: Mon, 5 Nov 2007 03:30:12 +0000


I was cleaning up Grobner Basis library and testing with several
the code runs fine with petite mzscheme and gambit-c:
You can download the code here:

a session with gambit-c:
address@hidden: /build/scheme  /usr/v4.0.1/bin/gsi
Gambit v4.0.1

> (load "grobner-basis.scm")
> (define S (list '((4 0 0 0)) '((3 0 0 0)) '((2 0 0 0)) ))
> (polys-string lex-rational-xyz S)
> (define  G (buchberger lex-rational-xyz S))
> (define RG (g-reduce lex-rational-xyz G))
> (define GB (gbasis lex-rational-xyz S))
> (if (not (grobner? lex-rational-xyz  G)) (error "bug?"))
> (if (not (grobner? lex-rational-xyz RG)) (error "bug?"))
> (if (not (grobner? lex-rational-xyz GB)) (error "bug?"))
> (polys-string lex-rational-xyz GB)
> (print (string-append "G:=convert(gbasis("
  (polys-string lex-rational-xyz S) ",plex(x,y,z)),set):"
  "myG:=convert(" (polys-string lex-rational-xyz GB) ",set):G minus myG;"
minus myG;
> (polys-string lex-rational-xyz S)

a session with chicken:
address@hidden: /build/scheme  csi

Version 2.732 - linux-unix-gnu-x86      [ symbolgc manyargs dload
ptables applyhook cross ]
(c)2000-2007 Felix L. Winkelmann        compiled 2007-11-03 on localhost (Linux)

#;1> (load "grobner-basis.scm")
; loading grobner-basis.scm ...
#;2> (define S (list '((4 0 0 0)) '((3 0 0 0)) '((2 0 0 0)) ))
(polys-string lex-rational-xyz S)
(define  G (buchberger lex-rational-xyz S))
#;3> "[(4),(3),(2)]"
#;4> Error: bad argument count - received 0 but expected 1

        Call history:

        <eval>          [row-reduce] (not ((field (quote zero?))
(matrix-ref matrix i j)))
        <eval>          [row-reduce] ((field (quote zero?))
(matrix-ref matrix i j))
        <eval>          [row-reduce] (matrix-ref matrix i j)
        <eval>          [matrix-ref] (list-ref (list-ref matrix row) col)
        <eval>          [matrix-ref] (list-ref matrix row)
        <eval>          [row-reduce] (field (quote zero?))
        <eval>          [rational-field] (eq? op (quote zero?))
        <eval>          [row-reduce] (return)   <--

Ok, I don't know what to make of this. One thing I noticed was that
"row-reduce" should never have been called. This example don't use

reply via email to

[Prev in Thread] Current Thread [Next in Thread]