On 8 sep, 02:52, kcrisman <[email protected]> wrote:
> On Sep 7, 5:26 pm, Burcin Erocal <[email protected]> wrote:
>
>
>
> > Hi,
>
> > Here is a short example to replicate the first error mentioned below:
>
> > b = [var('b_%s'%i) for i in range(4)]
>
> > precomp = (2^b_2 + 2)*(2^b_1 + 2^(-b_1) + 2^b_1*2^b_0 - 2^b_1*2^(-b_0)
> > - 2^(-b_1)*2^b_0 - 2^(-b_1)*2^(-b_0) + 2^b_0 + 2^(-b_0) - 9) + (2^b_1 +
> > 2^(-b_1) + 2^b_1*2^b_0 - 2^b_1*2^(-b_0) - 2^(-b_1)*2^b_0 -
> > 2^(-b_1)*2^(-b_0) + 2^b_0 + 2^(-b_0) - 9)/2^b_2
>
> > repl_dict = {b_0: b_0, b_3: b_1, b_2: b_3, b_1: b_2}
> > P = precomp.substitute(repl_dict)
> > P.expand()
>
> > I will take a break now. I'd appreciate any help tracking down the
> > problem (in pynac) if anybody has the time.
Hi,
Thanks a lot for producing a small piece of code reproducing the bug !
I'll try to track something down from here with gdb.
By the way, the above code doesn't *always* produce a bug (in fact it
didn't the first time I tried it...).
You can verify it by putting it in a "bug.sage" file and running the
following bash script:
[...@napoleon sage-current]\$ cat bug.sh
#!/bin/bash
for (( i=1; i<$1; i++ ))
do
./sage bug.sage &> /dev/null
if [ $? = 0 ]
then
echo $i
fi
done
It gave the following output:
[...@napoleon sage-current]\$ ./bug.sh 100
48
57
75
79
83
then:
[...@napoleon sage-current]\$ ./bug.sh 100
4
6
7
26
28
68
69
99
So there must be something strange going on.
>
> Did you open a ticket for this?
>
I did not.
I took a look on the recent tickets in Trac, and also used the search
function for Pynac, but could not find anything relevant.
So I guess Burcin did not either. I'll do it today.
> - kcrisman
--
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org