chicken-users
[Top][All Lists]
Advanced

[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

hi

I was cleaning up Grobner Basis library and testing with several
implementations,
the code runs fine with petite mzscheme and gambit-c:
You can download the code here:
http://downloads.sourceforge.net/math-linux/grobner-basis.scm

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

> (load "grobner-basis.scm")
"/build/scheme/grobner-basis.scm"
> (define S (list '((4 0 0 0)) '((3 0 0 0)) '((2 0 0 0)) ))
> (polys-string lex-rational-xyz S)
"[(4),(3),(2)]"
> (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)
"[(1)]"
> (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;"
))
G:=convert(gbasis([(4),(3),(2)],plex(x,y,z)),set):myG:=convert([(1)],set):G
minus myG;
> (polys-string lex-rational-xyz S)
"[(4),(3),(2)]"


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

CHICKEN
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)   <--
#;4>


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
row-reduce.




reply via email to

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