[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Chicken-users] bug in big numbers or somewhere
From: |
naruto canada |
Subject: |
[Chicken-users] bug in big numbers or somewhere |
Date: |
Sun, 15 Jun 2008 23:30:47 +0000 |
hi
I thinks there is a bug in big numbers extension or somewhere else...
I am not sure.
I use "(use numbers)" for big number "exact" calculations. And nowhere
in my code was told to evaluate to float or anything else --- but
float numbers show up anyhow.
The right answer given by gambit-c, petite and mzscheme were:
(0 1 2)
(1 2 3)
(2 1 0)
(3 2 1)
wrong numbers given by chicken Version 3.2.0
(0.0 1.0 2.0 7.37869762948382e+19 1.47573952589676e+20
2.95147905179353e+20 5.90295810358706e+20 4.72236648286965e+21
9.44473296573929e+21 1.88894659314786e+22 3.77789318629572e+22
7.55578637259143e+22)
(1.0 1.18059162071741e+21 2.36118324143482e+21 4.72236648286965e+21
9.44473296573929e+21 1.88894659314786e+22 3.77789318629572e+22
7.55578637259143e+22)
(7.55578637259143e+22 3.77789318629572e+22 1.88894659314786e+22
9.44473296573929e+21 4.72236648286965e+21 2.36118324143482e+21 0.0)
(7.55578637259143e+22 3.77789318629572e+22 1.88894659314786e+22
9.44473296573929e+21 4.72236648286965e+21 1.18059162071741e+21 1.0)
The input was:
(insertion-sort < (list->set = (map random (make-list 1000 3))))
(insertion-sort < (list->set = (map Random (make-list 1000 3))))
(insertion-sort > (list->set = (map random (make-list 1000 3))))
(insertion-sort > (list->set = (map Random (make-list 1000 3))))
You can download my toy evalutor here:
http://narutocanada.googlecode.com/svn/trunk/top.chicken.sc
chicken -run-time-macros -no-usual-integrations /tmp/top.chicken.sc
-output-file top.chicken.sc.c
gcc top.chicken.sc.c `csc -cflags -libs -ldflags` -o top.chicken
- [Chicken-users] bug in big numbers or somewhere,
naruto canada <=