[sage-devel] Sage 2.10.1.rc1 released

2008-01-27 Thread mabshoff

Hello folks,

Sage 2.10.1.rc0 was nothing to write home about, but 2.10.1.rc1
should be much better and build out of the box on Linux, OSX 10.4
and 10.5. Since rc0 we merged 15 patches, some of them quite
invasive. So if you review a patch and/or bundle please make
sure it applies cleanly against this release.

As you can see from the ToDo list there is still some way to
go before 2.10.1, unless we want to do a release now, i.e. in
the next 24 hours. In that case we need to fix the notebook
issue, which I didn't have time to work on yet, but that can be
resolved by downgrading the TLS components. Another possibility
is to solve some more issue, do a release by Wednesday. In either
case we should do 2.10.2, a conservative bug fix only release,
by Saturday or Sunday. Thoughts?

The tarball [201MB] is available at

http://sage.math.washington.edu/home/mabshoff/release-cycles-2.10.1/sage-2.10.1.rc1.tar

Cheers,

Michael

###

To Do:

* reviews, i.e. #1922, #1923 (Jason) - for details see below
* resolve notebook issue (GNUTLS related)
* update mfpr to 2.3.1.rc2
* ATLAS: add profiles for Pentium M, Athlon
* disable mandatory FLINT check
* update documentation for new ATLAS options
* #1689: update documentation for new SAGE_FORTRAN_LIB
* #1884: leak in coercion
* #1874: PolyBoRi leak: fix it or get somebody else to do it
* pygnutls: bump for update - look for update?
* remove opencdk since it is included in gnutls 2.2.1
* empty Ideal segfault
* add two open valgrind issues to track: Valgrind issues in 2.9.2

sage-memcheck.3056: Conditional jump or move depends on uninitialised
value(s), Invalid read of size 1
doctest calculus.py
sage-memcheck.19097:
doctest: real_rqdf.py

sage-memcheck.24275: longest_match - libz: Conditional jump or move
depends on uninitialised value(s)

###

spkg audit:

* ensure that "make install" is non-parallel, i.e. do a "export
MAKE=make"
* SAGE_LOCAL check (#633)
* add spkg-check (#255)
* add proper SPKG.txt to all packages
* /usr/bin/env bash (#1638)
* add md5sums for spkgs (#329)
* valgrind debug mode, i.e CFLAGS="-O0 -g"
* Debian build support

###

Upstream bug: gsl_isinf: Bug on OSX where the system's isinf always
returns "1"

###

In Review/Merge que: empty at the moment

Merged in rc1:

#384: Alex Ghitza, Mike Hansen: latex formatting issues with
  symbolic expressions
#652: Nick Alexander: .sage files destroy existing .py files
#743: Robert Miller, Carl Witty: graphs: simplify interface for
  accessing vertex objects
#980: Martin Albrecht, Didier Deshommes: random_element()
  for multivariate polynomials
#1083: Craig Citro: Bug in degree 1 number fields; manifests itself
   in element.matrix(), .trace(), .norm(), etc
#1155: Mike Hansen: PermutationGroup coercion bug
#1209: Mike Hansen: make it so maple.gcd?? shows source code
#1456: Mike Hansen: gaussian_binomial bug
#1575: Jason Grout: plotting -- fix vector plotting
#1845: Josh Kantor, Carl Witty: list_plot3d should be able to accept
   lists of points in arbitrary positions
#1875: William Stein: increase idle timeout and save interval
   on the notebook to 6 minutes (shorter times cause serious
   performance problems, esp on large notebook servers)
#1929: Alex Ghitza: add more examples to qqbar.py
#1943: Michael Abshoff: rpy fails to build on OSX 10.4
#1945: Carl Witty: improve reference manual formatting

Merged in rc0:

#1600: Craig Citro: another weird coercion bug
#1911: William Stein, Craig Citro: elliptic curves -- make
   heegner_index command return index instead of square
   of index; clarify why sometimes results is not an
   integer (it's not a bug, it's part of the algorithm)
#1930: Michael Abshoff: R is broken for parallel make, rpy is
   broken for fresh installs, remove recommended tar.gzs
#1931: Michael Abshoff: sage.spkg need to depend on ecm.spkg
#1933: Michael Abshoff: libgpg_error-1.6.spkg broken make install
   for parallel make
#1934: Michael Abshoff: sage-check for ATLAS broken on OSX
#1935: Craig Citro: legendre_symbol currently quite slow
#1937: Martin Albrecht: fix LLL documentation
#1939: Michael Abshoff: Fix OSX rpy import issues, i.e.
   DYLD_LIBRARY_PATH fix

Merged in alpha2:

#1028: Michael Abshoff: fix omega support for new valgrind
   release (3.3.0 once it is out)
#1050: Michael Abshoff: update optional valgrind.spkg to 3.3.0
   release
#1147: William Stein: change location of valgrind output files
   to something less obnoxious
#1550: Robert Miller: use libecm instead of pexpect+ecm binary
#1593: Martin Albrecht: m4ri -- the documentation of the echelon
   command only lists 1 algorithm but >= 2 algorithms are
   supported
#1617: William Stein: speed problem when fa

[sage-devel] Re: Sage 2.10.1.alpha2 released!

2008-01-27 Thread Jaap Spies

William Stein wrote:
[...]
> 
> Could you try changing that line 150 of sage/interfaces/sage0.py to
>   return eval(self.eval('cputime(%s)'%t).strip())
> then do "sage -br" and retry the test and see if it works on your machine?
> Let me know.
> 

Removing 
/home/jaap/downloads/sage-2.10.1.rc0/local/lib/python2.5/site-packages/sage-0.0.0-py2.5.egg-info
Writing 
/home/jaap/downloads/sage-2.10.1.rc0/local/lib/python2.5/site-packages/sage-0.0.0-py2.5.egg-info
--
| SAGE Version 2.10.1.rc0, Release Date: 2008-01-26  |
| Type notebook() for the GUI, and license() for information.|
--


sage:
Exiting SAGE (CPU time 0m0.00s, Wall time 0m5.10s).
[EMAIL PROTECTED] sage-2.10.1.rc0]$ ./sage -t  
devel/sage-main/sage/interfaces/sage0.py 2>&1 | tee -a test_sage0.log
sage -t  devel/sage-main/sage/interfaces/sage0.py   
**
File "sage0.py", line 143:
 sage: _= sage0.cputime() # random output
Exception raised:
 Traceback (most recent call last):
   File 
"/home/jaap/downloads/sage-2.10.1.rc0/local/lib/python2.5/doctest.py", line 
1212, in __run
 compileflags, 1) in test.globs
   File "", line 1, in 
 _= sage0.cputime() # random output###line 143:
 sage: _= sage0.cputime() # random output
   File 
"/home/jaap/downloads/sage-2.10.1.rc0/local/lib/python2.5/site-packages/sage/interfaces/sage0.py",
 line 150, in cputime
 return eval(self.eval('cputime(%s)'%t).strip())
   File "", line 1
   1.35179399
  ^
  SyntaxError: invalid syntax
**
File "sage0.py", line 147:
 sage: _= sage0.cputime() # random output
Exception raised:
 Traceback (most recent call last):
   File 
"/home/jaap/downloads/sage-2.10.1.rc0/local/lib/python2.5/doctest.py", line 
1212, in __run
 compileflags, 1) in test.globs
   File "", line 1, in 
 _= sage0.cputime() # random output###line 147:
 sage: _= sage0.cputime() # random output
   File 
"/home/jaap/downloads/sage-2.10.1.rc0/local/lib/python2.5/site-packages/sage/interfaces/sage0.py",
 line 150, in cputime
 return eval(self.eval('cputime(%s)'%t).strip())
   File "", line 1
   1.73473501
  ^
  SyntaxError: invalid syntax
**
1 items had failures:
2 of   3 in __main__.example_2
***Test Failed*** 2 failures.
For whitespace errors, see the file .doctest_sage0.py
  [8.0 s]
exit code: 256

--
The following tests failed:


 sage -t  devel/sage-main/sage/interfaces/sage0.py
Total time for all tests: 8.0 seconds


> Also, could you try replacing the line 150 by
>   s = self.eval('cputime(%s)'%t)
>   print "'%s'"%s
>   return 0
> in case my above suggestion doesn't work, and report what gets printed.
> 

Exiting SAGE (CPU time 0m0.00s, Wall time 0m8.03s).
[EMAIL PROTECTED] sage-2.10.1.rc0]$ ./sage -t  
devel/sage-main/sage/interfaces/sage0.py 2>&1 | tee -a test_sage0.log
sage -t  devel/sage-main/sage/interfaces/sage0.py   
**
File "sage0.py", line 143:
 sage: _= sage0.cputime() # random output
Expected nothing
Got:
 ' 1.360792
 '
**
File "sage0.py", line 147:
 sage: _= sage0.cputime() # random output
Expected nothing
Got:
 ' 1.73473499
 '
**
1 items had failures:
2 of   3 in __main__.example_2
***Test Failed*** 2 failures.
For whitespace errors, see the file .doctest_sage0.py
  [7.0 s]
exit code: 256

--
The following tests failed:


 sage -t  devel/sage-main/sage/interfaces/sage0.py
Total time for all tests: 7.0 seconds
[EMAIL PROTECTED] sage-2.10.1.rc0]$


Jaap


--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-devel] Re: Sage 2.10.1.alpha2 released!

2008-01-27 Thread Jaap Spies

mabshoff wrote:
> 
> 
> On Jan 27, 3:00 am, "William Stein" <[EMAIL PROTECTED]> wrote:
>> On Jan 26, 2008 11:46 AM, Jaap Spies <[EMAIL PROTECTED]> wrote:
[...]
>>
>> Thanks for reporting this!!
> 

Hi Michael

> Yep, I remember now that somebody else reported this a week or so ago
> in sage-support or sage-newbie, but I cannot recall details at the
> moment.
> 

It was me on gg: sage-devel who reported this (20080122) in the thread
about alpha1.

Jaap




>> William
> 
> Cheers,
> 
> Michael
> > 
> 


--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-devel] Re: Sage 2.10.1.alpha2 released!

2008-01-27 Thread William Stein

On Jan 27, 2008 4:55 AM, Jaap Spies <[EMAIL PROTECTED]> wrote:
>
> William Stein wrote:
> [...]
> >
> > Could you try changing that line 150 of sage/interfaces/sage0.py to
> >   return eval(self.eval('cputime(%s)'%t).strip())
> > then do "sage -br" and retry the test and see if it works on your machine?
> > Let me know.
> >

OK, try

return float(self.eval('cputime(%s)'%t))

and if that doesn't work


return float(self.eval('cputime(%s)'%t).strip())

I have to say -- I just don't get why this doesn't work on your FC7 machine.
All that it is doing is eval'ing a correct float constant...  I wonder if there
are weird hidden invisible control codes in the output or something.


>
> Removing 
> /home/jaap/downloads/sage-2.10.1.rc0/local/lib/python2.5/site-packages/sage-0.0.0-py2.5.egg-info
> Writing 
> /home/jaap/downloads/sage-2.10.1.rc0/local/lib/python2.5/site-packages/sage-0.0.0-py2.5.egg-info
> --
> | SAGE Version 2.10.1.rc0, Release Date: 2008-01-26  |
> | Type notebook() for the GUI, and license() for information.|
> --
>
>
> sage:
> Exiting SAGE (CPU time 0m0.00s, Wall time 0m5.10s).
> [EMAIL PROTECTED] sage-2.10.1.rc0]$ ./sage -t  
> devel/sage-main/sage/interfaces/sage0.py 2>&1 | tee -a test_sage0.log
> sage -t  devel/sage-main/sage/interfaces/sage0.py   
> **
> File "sage0.py", line 143:
>  sage: _= sage0.cputime() # random output
> Exception raised:
>  Traceback (most recent call last):
>File 
> "/home/jaap/downloads/sage-2.10.1.rc0/local/lib/python2.5/doctest.py", line 
> 1212, in __run
>  compileflags, 1) in test.globs
>File "", line 1, in 
>  _= sage0.cputime() # random output###line 143:
>  sage: _= sage0.cputime() # random output
>File 
> "/home/jaap/downloads/sage-2.10.1.rc0/local/lib/python2.5/site-packages/sage/interfaces/sage0.py",
>  line 150, in cputime
>  return eval(self.eval('cputime(%s)'%t).strip())
>File "", line 1
>1.35179399
>   ^
>   SyntaxError: invalid syntax
> **
> File "sage0.py", line 147:
>  sage: _= sage0.cputime() # random output
> Exception raised:
>  Traceback (most recent call last):
>File 
> "/home/jaap/downloads/sage-2.10.1.rc0/local/lib/python2.5/doctest.py", line 
> 1212, in __run
>  compileflags, 1) in test.globs
>File "", line 1, in 
>  _= sage0.cputime() # random output###line 147:
>  sage: _= sage0.cputime() # random output
>File 
> "/home/jaap/downloads/sage-2.10.1.rc0/local/lib/python2.5/site-packages/sage/interfaces/sage0.py",
>  line 150, in cputime
>  return eval(self.eval('cputime(%s)'%t).strip())
>File "", line 1
>1.73473501
>   ^
>   SyntaxError: invalid syntax
> **
> 1 items had failures:
> 2 of   3 in __main__.example_2
> ***Test Failed*** 2 failures.
> For whitespace errors, see the file .doctest_sage0.py
>   [8.0 s]
> exit code: 256
>
> --
> The following tests failed:
>
>
>  sage -t  devel/sage-main/sage/interfaces/sage0.py
> Total time for all tests: 8.0 seconds
>
>
> > Also, could you try replacing the line 150 by
> >   s = self.eval('cputime(%s)'%t)
> >   print "'%s'"%s
> >   return 0
> > in case my above suggestion doesn't work, and report what gets printed.
> >
>
> Exiting SAGE (CPU time 0m0.00s, Wall time 0m8.03s).
> [EMAIL PROTECTED] sage-2.10.1.rc0]$ ./sage -t  
> devel/sage-main/sage/interfaces/sage0.py 2>&1 | tee -a test_sage0.log
> sage -t  devel/sage-main/sage/interfaces/sage0.py   
> **
> File "sage0.py", line 143:
>  sage: _= sage0.cputime() # random output
> Expected nothing
> Got:
>  ' 1.360792
>  '
> **
> File "sage0.py", line 147:
>  sage: _= sage0.cputime() # random output
> Expected nothing
> Got:
>  ' 1.73473499
>  '
> **
> 1 items had failures:
> 2 of   3 in __main__.example_2
> ***Test Failed*** 2 failures.
> For whitespace errors, see the file .doctest_sage0.py
>   [7.0 s]
> exit code: 256
>
> --
> The following tests failed:
>
>
>  sage -t  devel/sage-main/sage/interfaces/sage0.py
> Total time for all tests: 7.0 seconds
> [EMAIL PROTECTED] sage-2.10.1.rc0]$
>
>
>
> Jaap
>
>
> >
>



-- 
W

[sage-devel] Re: Sage 2.10.1.alpha2 released!

2008-01-27 Thread Jaap Spies

William Stein wrote:
> On Jan 27, 2008 4:55 AM, Jaap Spies <[EMAIL PROTECTED]> wrote:
>> William Stein wrote:
>> [...]
>>> Could you try changing that line 150 of sage/interfaces/sage0.py to
>>>   return eval(self.eval('cputime(%s)'%t).strip())
>>> then do "sage -br" and retry the test and see if it works on your machine?
>>> Let me know.
>>>
> 
> OK, try
> 
> return float(self.eval('cputime(%s)'%t))
>

sage:
Exiting SAGE (CPU time 0m0.00s, Wall time 0m6.15s).
[EMAIL PROTECTED] sage-2.10.1.rc0]$ ./sage -t  
devel/sage-main/sage/interfaces/sage0.py 2>&1 | tee -a test_sage0.log
sage -t  devel/sage-main/sage/interfaces/sage0.py   
**
File "sage0.py", line 143:
 sage: _= sage0.cputime() # random output
Exception raised:
 Traceback (most recent call last):
   File 
"/home/jaap/downloads/sage-2.10.1.rc0/local/lib/python2.5/doctest.py", line 
1212, in __run
 compileflags, 1) in test.globs
   File "", line 1, in 
 _= sage0.cputime() # random output###line 143:
 sage: _= sage0.cputime() # random output
   File 
"/home/jaap/downloads/sage-2.10.1.rc0/local/lib/python2.5/site-packages/sage/interfaces/sage0.py",
 line 150, in cputime
 return float(self.eval('cputime(%s)'%t))
 ValueError: invalid literal for float():  1.79372599

**
File "sage0.py", line 147:
 sage: _= sage0.cputime() # random output
Exception raised:
 Traceback (most recent call last):
   File 
"/home/jaap/downloads/sage-2.10.1.rc0/local/lib/python2.5/doctest.py", line 
1212, in __run
 compileflags, 1) in test.globs
   File "", line 1, in 
 _= sage0.cputime() # random output###line 147:
 sage: _= sage0.cputime() # random output
   File 
"/home/jaap/downloads/sage-2.10.1.rc0/local/lib/python2.5/site-packages/sage/interfaces/sage0.py",
 line 150, in cputime
 return float(self.eval('cputime(%s)'%t))
 ValueError: invalid literal for float():  2.33264499

**
1 items had failures:
2 of   3 in __main__.example_2
***Test Failed*** 2 failures.
For whitespace errors, see the file .doctest_sage0.py
  [9.8 s]
exit code: 256

--
The following tests failed:


 sage -t  devel/sage-main/sage/interfaces/sage0.py
Total time for all tests: 9.8 seconds
[EMAIL PROTECTED] sage-2.10.1.rc0]$


> and if that doesn't work
> 
> 
> return float(self.eval('cputime(%s)'%t).strip())
> 

sage:
Exiting SAGE (CPU time 0m0.01s, Wall time 0m6.39s).
[EMAIL PROTECTED] sage-2.10.1.rc0]$ ./sage -t  
devel/sage-main/sage/interfaces/sage0.py 2>&1 | tee -a test_sage0.log
sage -t  devel/sage-main/sage/interfaces/sage0.py   
**
File "sage0.py", line 143:
 sage: _= sage0.cputime() # random output
Exception raised:
 Traceback (most recent call last):
   File 
"/home/jaap/downloads/sage-2.10.1.rc0/local/lib/python2.5/doctest.py", line 
1212, in __run
 compileflags, 1) in test.globs
   File "", line 1, in 
 _= sage0.cputime() # random output###line 143:
 sage: _= sage0.cputime() # random output
   File 
"/home/jaap/downloads/sage-2.10.1.rc0/local/lib/python2.5/site-packages/sage/interfaces/sage0.py",
 line 150, in cputime
 return float(self.eval('cputime(%s)'%t).strip())
 ValueError: invalid literal for float():  1.82372099
**
File "sage0.py", line 147:
 sage: _= sage0.cputime() # random output
Exception raised:
 Traceback (most recent call last):
   File 
"/home/jaap/downloads/sage-2.10.1.rc0/local/lib/python2.5/doctest.py", line 
1212, in __run
 compileflags, 1) in test.globs
   File "", line 1, in 
 _= sage0.cputime() # random output###line 147:
 sage: _= sage0.cputime() # random output
   File 
"/home/jaap/downloads/sage-2.10.1.rc0/local/lib/python2.5/site-packages/sage/interfaces/sage0.py",
 line 150, in cputime
 return float(self.eval('cputime(%s)'%t).strip())
 ValueError: invalid literal for float():  2.38963502
**
1 items had failures:
2 of   3 in __main__.example_2
***Test Failed*** 2 failures.
For whitespace errors, see the file .doctest_sage0.py
  [9.3 s]
exit code: 256

--
The following tests failed:


 sage -t  devel/sage-main/sage/interfaces/sage0.py
Total time for all tests: 9.3 seconds

> I have to say -- I just don't get why this doesn't work on your FC7 machine.
> All that it is doing is eval'ing a corr

[sage-devel] Re: Sage 2.10.1.alpha2 released!

2008-01-27 Thread William Stein

On Jan 27, 2008 6:01 AM, Jaap Spies <[EMAIL PROTECTED]> wrote:
>
> William Stein wrote:
> > On Jan 27, 2008 4:55 AM, Jaap Spies <[EMAIL PROTECTED]> wrote:
> >> William Stein wrote:
> >> [...]
> >>> Could you try changing that line 150 of sage/interfaces/sage0.py to
> >>>   return eval(self.eval('cputime(%s)'%t).strip())
> >>> then do "sage -br" and retry the test and see if it works on your machine?
> >>> Let me know.
> >>>
> >
> > OK, try
> >
> > return float(self.eval('cputime(%s)'%t))
> >
>
> sage:
> Exiting SAGE (CPU time 0m0.00s, Wall time 0m6.15s).
> [EMAIL PROTECTED] sage-2.10.1.rc0]$ ./sage -t  
> devel/sage-main/sage/interfaces/sage0.py 2>&1 | tee -a test_sage0.log
> sage -t  devel/sage-main/sage/interfaces/sage0.py   
> **
> File "sage0.py", line 143:
>  sage: _= sage0.cputime() # random output
> Exception raised:
>  Traceback (most recent call last):
>File 
> "/home/jaap/downloads/sage-2.10.1.rc0/local/lib/python2.5/doctest.py", line 
> 1212, in __run
>  compileflags, 1) in test.globs
>File "", line 1, in 
>  _= sage0.cputime() # random output###line 143:
>  sage: _= sage0.cputime() # random output
>File 
> "/home/jaap/downloads/sage-2.10.1.rc0/local/lib/python2.5/site-packages/sage/interfaces/sage0.py",
>  line 150, in cputime
>  return float(self.eval('cputime(%s)'%t))
>  ValueError: invalid literal for float():  1.79372599
>
> **
> File "sage0.py", line 147:
>  sage: _= sage0.cputime() # random output
> Exception raised:
>  Traceback (most recent call last):
>File 
> "/home/jaap/downloads/sage-2.10.1.rc0/local/lib/python2.5/doctest.py", line 
> 1212, in __run
>  compileflags, 1) in test.globs
>File "", line 1, in 
>  _= sage0.cputime() # random output###line 147:
>  sage: _= sage0.cputime() # random output
>File 
> "/home/jaap/downloads/sage-2.10.1.rc0/local/lib/python2.5/site-packages/sage/interfaces/sage0.py",
>  line 150, in cputime
>  return float(self.eval('cputime(%s)'%t))
>  ValueError: invalid literal for float():  2.33264499
>
> **
> 1 items had failures:
> 2 of   3 in __main__.example_2
> ***Test Failed*** 2 failures.
> For whitespace errors, see the file .doctest_sage0.py
>   [9.8 s]
> exit code: 256
>
> --
> The following tests failed:
>
>
>  sage -t  devel/sage-main/sage/interfaces/sage0.py
> Total time for all tests: 9.8 seconds
> [EMAIL PROTECTED] sage-2.10.1.rc0]$
>
>
> > and if that doesn't work
> >
> >
> > return float(self.eval('cputime(%s)'%t).strip())
> >
>
> sage:
> Exiting SAGE (CPU time 0m0.01s, Wall time 0m6.39s).
> [EMAIL PROTECTED] sage-2.10.1.rc0]$ ./sage -t  
> devel/sage-main/sage/interfaces/sage0.py 2>&1 | tee -a test_sage0.log
> sage -t  devel/sage-main/sage/interfaces/sage0.py   
> **
> File "sage0.py", line 143:
>  sage: _= sage0.cputime() # random output
> Exception raised:
>  Traceback (most recent call last):
>File 
> "/home/jaap/downloads/sage-2.10.1.rc0/local/lib/python2.5/doctest.py", line 
> 1212, in __run
>  compileflags, 1) in test.globs
>File "", line 1, in 
>  _= sage0.cputime() # random output###line 143:
>  sage: _= sage0.cputime() # random output
>File 
> "/home/jaap/downloads/sage-2.10.1.rc0/local/lib/python2.5/site-packages/sage/interfaces/sage0.py",
>  line 150, in cputime
>  return float(self.eval('cputime(%s)'%t).strip())
>  ValueError: invalid literal for float():  1.82372099
> **
> File "sage0.py", line 147:
>  sage: _= sage0.cputime() # random output
> Exception raised:
>  Traceback (most recent call last):
>File 
> "/home/jaap/downloads/sage-2.10.1.rc0/local/lib/python2.5/doctest.py", line 
> 1212, in __run
>  compileflags, 1) in test.globs
>File "", line 1, in 
>  _= sage0.cputime() # random output###line 147:
>  sage: _= sage0.cputime() # random output
>File 
> "/home/jaap/downloads/sage-2.10.1.rc0/local/lib/python2.5/site-packages/sage/interfaces/sage0.py",
>  line 150, in cputime
>  return float(self.eval('cputime(%s)'%t).strip())
>  ValueError: invalid literal for float():  2.38963502
> **
> 1 items had failures:
> 2 of   3 in __main__.example_2
> ***Test Failed*** 2 failures.
> For whitespace errors, see the file .doctest_sage0.py
>   [9.3 s]
> exit code: 256
>
> ---

[sage-devel] Re: Sage 2.10.1.alpha2 released!

2008-01-27 Thread Jaap Spies

William Stein wrote:

>>  ValueError: invalid literal for float(): ^[[0;31m 
>> ^[[0m2.38963502
>> **
>> 1 items had failures:
>> 2 of   3 in __main__.example_2
>> ***Test Failed*** 2 failures.
>> For whitespace errors, see the file .doctest_sage0.py
>>   [9.3 s]
>> exit code: 256
>>
>> Seems you are right!
> 
> Bummer.  OK, following http://www.thescripts.com/forum/thread167794.html could
> you try replacing return float(self.eval('cputime(%s)'%t)) by
> 
> aString = self.eval('cputime(%s)'%t)
> IDENTITY_MAP = ''.join([chr(x) for x in range(256)])
> BAD_MAP = ''.join([chr(x) for x in range(32) + [124])
  ^^
> aNewString = aString.translate(IDENTITY_MAP, BAD_MAP)
> return float(aNewString)
> 

I put in:
 aString = self.eval('cputime(%s)'%t)
 IDENTITY_MAP = ''.join([chr(x) for x in range(256)])
 BAD_MAP = ''.join([chr(x) for x in range(32) + [124]])
 aNewString = aString.translate(IDENTITY_MAP, BAD_MAP)
 return float(aNewString)


> and let me know what happens.  If this works, it will at least make it
> clear how we can fix the problem... I guess.
> 
Got this:

sage:
Exiting SAGE (CPU time 0m0.00s, Wall time 0m3.60s).
[EMAIL PROTECTED] sage-2.10.1.rc0]$ ./sage -t  
devel/sage-main/sage/interfaces/sage0.py 2>&1 | tee -a test_sage0.log
sage -t  devel/sage-main/sage/interfaces/sage0.py   
**
File "sage0.py", line 143:
 sage: _= sage0.cputime() # random output
Exception raised:
 Traceback (most recent call last):
   File 
"/home/jaap/downloads/sage-2.10.1.rc0/local/lib/python2.5/doctest.py", line 
1212, in __run
 compileflags, 1) in test.globs
   File "", line 1, in 
 _= sage0.cputime() # random output###line 143:
 sage: _= sage0.cputime() # random output
   File 
"/home/jaap/downloads/sage-2.10.1.rc0/local/lib/python2.5/site-packages/sage/interfaces/sage0.py",
 line 154, in cputime
 return float(aNewString)
 ValueError: invalid literal for float(): [0;31m [0m1.962701
**
File "sage0.py", line 147:
 sage: _= sage0.cputime() # random output
Exception raised:
 Traceback (most recent call last):
   File 
"/home/jaap/downloads/sage-2.10.1.rc0/local/lib/python2.5/doctest.py", line 
1212, in __run
 compileflags, 1) in test.globs
   File "", line 1, in 
 _= sage0.cputime() # random output###line 147:
 sage: _= sage0.cputime() # random output
   File 
"/home/jaap/downloads/sage-2.10.1.rc0/local/lib/python2.5/site-packages/sage/interfaces/sage0.py",
 line 154, in cputime
 return float(aNewString)
 ValueError: invalid literal for float(): [0;31m [0m2.54861199
**
1 items had failures:
2 of   3 in __main__.example_2
***Test Failed*** 2 failures.
For whitespace errors, see the file .doctest_sage0.py
  [11.1 s]
exit code: 256

I seems not all characters are caught.

> I wonder if the notebook works kind of funky for you on that
> same computer?  I mean, if there are funny control codes everywhere
> in sage0, then that would impact the notebook as well, possibly.
> 

This test first failed in sage-2.10.1.alpha1. As did the notebook()
with gnutls related problems.
I removed the alpha0, but on sage-2.10, I got
sage -t  devel/sage-main/sage/interfaces/sage0.py   ^[[?1034h
  [23.4 s]


Note the strange characters, or are they intentionally there?



Jaap


--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-devel] Re: Sage 2.10.1.alpha2 released!

2008-01-27 Thread Jaap Spies

Jaap Spies wrote:
> William Stein wrote:


In
  aString = self.eval('cputime(%s)'%t)
  IDENTITY_MAP = ''.join([chr(x) for x in range(256)])
  BAD_MAP = ''.join([chr(x) for x in range(32) + [124]])
  aNewString = aString.translate(IDENTITY_MAP, BAD_MAP)
  return float(aNewString)

only the control characters are filtered out.

What can be the meaning of escape followed by a string like "[0;31m [0m"
(also see below)? And where is it coming from?

>> I wonder if the notebook works kind of funky for you on that
>> same computer?  I mean, if there are funny control codes everywhere
>> in sage0, then that would impact the notebook as well, possibly.
>>
> 
> This test first failed in sage-2.10.1.alpha1. As did the notebook()
> with gnutls related problems.
> I removed the alpha0, but on sage-2.10, I got
> sage -t  devel/sage-main/sage/interfaces/sage0.py   ^[[?1034h
>   [23.4 s]
> 
> 
> Note the strange characters, or are they intentionally there?
> 

In test.log I see them all the time:

sage -t  devel/sage-main/sage/monoids/free_abelian_monoid_element.py^[[?1034h
  [1.6 s]
sage -t  devel/sage-main/sage/monoids/string_ops.py ^[[?1034h
  [1.5 s]
sage -t  devel/sage-main/sage/monoids/free_monoid.py^[[?1034h
  [1.6 s]
sage -t  devel/sage-main/sage/monoids/monoid.py ^[[?1034h
  [1.5 s]
sage -t  devel/sage-main/sage/monoids/string_monoid.py  ^[[?1034h




Jaap


--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-devel] Re: is_simplified()

2008-01-27 Thread William Stein

On Jan 26, 2008 1:10 PM, Robert Bradshaw <[EMAIL PROTECTED]> wrote:
> I believe the point of is_simplified() is to see if the result has
> already been simplified. Trying to detect if simplify() will modify
> self is a (potentially) expensive operation, so if it knows it's been
> simplified then it returns True, but otherwise it returns False
> (which may be a false positive).
>
> Perhaps a clearer name would have been "has_been_simplified?" The
> docstring could use clarifying though (and whoever wrote this
> function might want to speak up).

I wrote it. You're right about the intention -- it's really
"has_been_simplified".
I would be OK with somebody changing the name to that.

>
> On Jan 26, 2008, at 12:29 PM, Alex Ghitza wrote:
>
> >
> > -BEGIN PGP SIGNED MESSAGE-
> > Hash: SHA1
> >
> > Hi,
> >
> > The following is a bit confusing:
> >
> > sage: f=(x-1)
> > sage: f.is_simplified()
> > False
> > sage: g=f.simplify()
> > sage: g
> > x - 1
> > sage: g.is_simplified()
> > True
> >
> > Is this on purpose?  I.e. if one had to describe what the function
> > is_simplified() is supposed to do, that description should be
> >
> > "Return True if self is the result of running simplify() on a symbolic
> > expression"
> >
> > rather than the naive
> >
> > "Return True if self is a simplified symbolic expression"
> >
> > If yes, should I just add this description to the function's doc?  If
> > no, should I report this as a bug?
> >
> > Cheers,
> > Alex
> > -BEGIN PGP SIGNATURE-
> > Version: GnuPG v2.0.7 (GNU/Linux)
> > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
> >
> > iD8DBQFHm5hBdZTaNFFPILgRAtzmAJ4ssbGkMLRGqfH6sYxvc/bVHo2xeQCcCDs5
> > JGN2jVZK5PziGVL4QIVTtWQ=
> > =c41N
> > -END PGP SIGNATURE-
> >
> > >
>



-- 
William Stein
Associate Professor of Mathematics
University of Washington
http://wstein.org

--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-devel] Re: Sage 2.10.1.rc1 released

2008-01-27 Thread Jaap Spies

mabshoff wrote:
> Hello folks,
> 
[...]
> 
> The tarball [201MB] is available at
> 
> http://sage.math.washington.edu/home/mabshoff/release-cycles-2.10.1/sage-2.10.1.rc1.tar
> 

On Fedora 8 32 bits all tests passed.

Jaap


--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-devel] Re: Sage 2.10.1.alpha2 released!

2008-01-27 Thread Justin C. Walker


On Jan 27, 2008, at 08:28 , Jaap Spies wrote:

>
> Jaap Spies wrote:
>> William Stein wrote:
>
>
> In
>   aString = self.eval('cputime(%s)'%t)
>   IDENTITY_MAP = ''.join([chr(x) for x in range(256)])
>   BAD_MAP = ''.join([chr(x) for x in range(32) + [124]])
>   aNewString = aString.translate(IDENTITY_MAP, BAD_MAP)
>   return float(aNewString)
>
> only the control characters are filtered out.
>
> What can be the meaning of escape followed by a string like "[0;31m  
> [0m"
> (also see below)? And where is it coming from?
>
>>> I wonder if the notebook works kind of funky for you on that
>>> same computer?  I mean, if there are funny control codes everywhere
>>> in sage0, then that would impact the notebook as well, possibly.
>>>
>>
>> This test first failed in sage-2.10.1.alpha1. As did the notebook()
>> with gnutls related problems.
>> I removed the alpha0, but on sage-2.10, I got
>> sage -t  devel/sage-main/sage/interfaces/sage0.py   ^[[?1034h
>>   [23.4 s]
>>
>> 
>> Note the strange characters, or are they intentionally there?
>>
>
> In test.log I see them all the time:
>
> sage -t  devel/sage-main/sage/monoids/ 
> free_abelian_monoid_element.py^[[?1034h
>   [1.6 s]
> sage -t  devel/sage-main/sage/monoids/string_ops.py ^[[?1034h
>   [1.5 s]
> sage -t  devel/sage-main/sage/monoids/free_monoid.py^[[?1034h
>   [1.6 s]
> sage -t  devel/sage-main/sage/monoids/monoid.py ^[[?1034h
>   [1.5 s]
> sage -t  devel/sage-main/sage/monoids/string_monoid.py  ^[[?1034h

FWIW, these look like "escape codes" for screen control, a la curses 
(3).  Are you viewing at the log file through 'tail' or something  
similar?

The sequence "ESC[" (or "^[[") is the Control Sequence Indicator/ 
Introducer.  There's a pretty accessible description of this stuff at
   

Justin

--
Justin C. Walker, Curmudgeon-at-Large
() The ASCII Ribbon Campaign
/\ Help Cure HTML Email




--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-devel] Re: Sage 2.10.1.alpha2 released!

2008-01-27 Thread Jaap Spies

Justin C. Walker wrote:
> 
> On Jan 27, 2008, at 08:28 , Jaap Spies wrote:
> 
>> Jaap Spies wrote:
>>> William Stein wrote:
>>
>> In
>>   aString = self.eval('cputime(%s)'%t)
>>   IDENTITY_MAP = ''.join([chr(x) for x in range(256)])
>>   BAD_MAP = ''.join([chr(x) for x in range(32) + [124]])
>>   aNewString = aString.translate(IDENTITY_MAP, BAD_MAP)
>>   return float(aNewString)
>>
>> only the control characters are filtered out.
>>
>> What can be the meaning of escape followed by a string like "[0;31m  
>> [0m"
>> (also see below)? And where is it coming from?
>>
 I wonder if the notebook works kind of funky for you on that
 same computer?  I mean, if there are funny control codes everywhere
 in sage0, then that would impact the notebook as well, possibly.

>>> This test first failed in sage-2.10.1.alpha1. As did the notebook()
>>> with gnutls related problems.
>>> I removed the alpha0, but on sage-2.10, I got
>>> sage -t  devel/sage-main/sage/interfaces/sage0.py   ^[[?1034h
>>>   [23.4 s]
>>>
>>> 
>>> Note the strange characters, or are they intentionally there?
>>>
>> In test.log I see them all the time:
>>
>> sage -t  devel/sage-main/sage/monoids/ 
>> free_abelian_monoid_element.py^[[?1034h
>>   [1.6 s]
>> sage -t  devel/sage-main/sage/monoids/string_ops.py ^[[?1034h
>>   [1.5 s]
>> sage -t  devel/sage-main/sage/monoids/free_monoid.py^[[?1034h
>>   [1.6 s]
>> sage -t  devel/sage-main/sage/monoids/monoid.py ^[[?1034h
>>   [1.5 s]
>> sage -t  devel/sage-main/sage/monoids/string_monoid.py  ^[[?1034h
> 
> FWIW, these look like "escape codes" for screen control, a la curses 
> (3).  Are you viewing at the log file through 'tail' or something  
> similar?
> 

No, this 'codes' are in the  log file. Viewed with vi, but also visible with
od -c


> The sequence "ESC[" (or "^[[") is the Control Sequence Indicator/ 
> Introducer.  There's a pretty accessible description of this stuff at
>
> 

Thanks.

Jaap


> Justin
> 
> --
> Justin C. Walker, Curmudgeon-at-Large
> () The ASCII Ribbon Campaign
> /\ Help Cure HTML Email
> 
> 
> 
> 
> > 
> 


--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-devel] CAS and bugs

2008-01-27 Thread Jaap Spies

FYI,

There is IMO an interesting discussion going on in:

http://groups.google.com/group/sci.math.symbolic/topics

regarding bugs and bugs hunting in CAS.

Follow the 5 stars.

Jaap



--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-devel] bug in sage/modules/free_module_element.pyx computing abs(vector(...))

2008-01-27 Thread Peter

Hi,

It seems the __abs__ method for vectors is missing the part that is
supposed to square the components before they are added.

[e.g. abs(vector([1..5])) should really be
sqrt(1+4+9+16+25)=sqrt(55) ]

The code of the current version is included below.

def __abs__(self):
"""
Return the square root of the sum of the squares of the
entries of this vector.

EXAMPLES:
sage: v = vector([1..5]); abs(v)
sqrt(15)
sage: v = vector(RDF, [1..5]); abs(v)
3.87298334621
"""
return sum(self.list()).sqrt()

The last line should be something like

return sum([x*x for x in self.list()]).sqrt()

(not sure if that is the most efficient way).

--Peter

--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-devel] Re: bug in sage/modules/free_module_element.pyx computing abs(vector(...))

2008-01-27 Thread Mike Hansen

Hello,

I've added this as #1954 and posted a patch.

--Mike

On Jan 27, 2008 3:50 PM, Peter <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> It seems the __abs__ method for vectors is missing the part that is
> supposed to square the components before they are added.
>
> [e.g. abs(vector([1..5])) should really be
> sqrt(1+4+9+16+25)=sqrt(55) ]
>
> The code of the current version is included below.
>
> def __abs__(self):
> """
> Return the square root of the sum of the squares of the
> entries of this vector.
>
> EXAMPLES:
> sage: v = vector([1..5]); abs(v)
> sqrt(15)
> sage: v = vector(RDF, [1..5]); abs(v)
> 3.87298334621
> """
> return sum(self.list()).sqrt()
>
> The last line should be something like
>
> return sum([x*x for x in self.list()]).sqrt()
>
> (not sure if that is the most efficient way).
>
> --Peter
>
> >
>

--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-devel] Re: bug in sage/modules/free_module_element.pyx computing abs(vector(...))

2008-01-27 Thread William Stein

On Jan 27, 2008 6:50 PM, Peter <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> It seems the __abs__ method for vectors is missing the part that is
> supposed to square the components before they are added.
>
> [e.g. abs(vector([1..5])) should really be
> sqrt(1+4+9+16+25)=sqrt(55) ]
>
> The code of the current version is included below.
>
> def __abs__(self):
> """
> Return the square root of the sum of the squares of the
> entries of this vector.
>
> EXAMPLES:
> sage: v = vector([1..5]); abs(v)
> sqrt(15)
> sage: v = vector(RDF, [1..5]); abs(v)
> 3.87298334621
> """
> return sum(self.list()).sqrt()
>
> The last line should be something like
>
> return sum([x*x for x in self.list()]).sqrt()
>
> (not sure if that is the most efficient way).

Thanks for tracking this down.  I've made it trac #1955
   http://trac.sagemath.org/sage_trac/ticket/1955
and declared it a blocker, since obviously it will give
terribly wrong mathematical results.

William

--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-devel] Re: Sage 2.10.1.rc1 released

2008-01-27 Thread Justin C. Walker


On Jan 27, 2008, at 24:55 , mabshoff wrote:

> Sage 2.10.1.rc0 was nothing to write home about, but 2.10.1.rc1
> should be much better and build out of the box on Linux, OSX 10.4
> and 10.5. Since rc0 we merged 15 patches, some of them quite
> invasive. So if you review a patch and/or bundle please make
> sure it applies cleanly against this release.
>
> As you can see from the ToDo list there is still some way to
> go before 2.10.1, unless we want to do a release now, i.e. in
> the next 24 hours. In that case we need to fix the notebook
> issue, which I didn't have time to work on yet, but that can be
> resolved by downgrading the TLS components. Another possibility
> is to solve some more issue, do a release by Wednesday. In either
> case we should do 2.10.2, a conservative bug fix only release,
> by Saturday or Sunday. Thoughts?
>
> The tarball [201MB] is available at
>
> http://sage.math.washington.edu/home/mabshoff/release-cycles-2.10.1/ 
> sage-2.10.1.rc1.tar

Built w/o problems on both Mac OS X, 10.4.11 and 10.5.1.  One test  
failed on each:

10.4.11 (Dual Quad Xeon, "-j6"):

 real80m54.727s
 user64m0.940s
 sys 37m8.340s

  
--
 The following tests failed:


 sage -t  devel/sage-main/sage/interfaces/sage0.py
 Total time for all tests: 3117.0 seconds

10.5.1 (Core Duo, "-j2"):
 real126m1.604s
 user96m4.584s
 sys 19m13.760s

  
--
 The following tests failed:


 sage -t  devel/sage-main/sage/interfaces/sage0.py
 Total time for all tests: 3000.3 seconds

In both cases, the 'sage0' failure was the same as Jaap reported for  
alpha2 (escape sequences causing syntax errors).  I'm not sure I got  
the whole thread, though: was there a solution to this?

Justin

--
Justin C. Walker, Curmudgeon-At-Large
Director
Institute for the Enhancement of the Director's Income

"Weaseling out of things is what separates us from the animals.
  Well, except the weasel."
   - Homer J Simpson




--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-devel] Re: Sage 2.10.1.rc1 released

2008-01-27 Thread William Stein

On Jan 27, 2008 8:03 PM, Justin C. Walker <[EMAIL PROTECTED]> wrote:
>
>
> On Jan 27, 2008, at 24:55 , mabshoff wrote:
>
> > Sage 2.10.1.rc0 was nothing to write home about, but 2.10.1.rc1
> > should be much better and build out of the box on Linux, OSX 10.4
> > and 10.5. Since rc0 we merged 15 patches, some of them quite
> > invasive. So if you review a patch and/or bundle please make
> > sure it applies cleanly against this release.
> >
> > As you can see from the ToDo list there is still some way to
> > go before 2.10.1, unless we want to do a release now, i.e. in
> > the next 24 hours. In that case we need to fix the notebook
> > issue, which I didn't have time to work on yet, but that can be
> > resolved by downgrading the TLS components. Another possibility
> > is to solve some more issue, do a release by Wednesday. In either
> > case we should do 2.10.2, a conservative bug fix only release,
> > by Saturday or Sunday. Thoughts?
> >
> > The tarball [201MB] is available at
> >
> > http://sage.math.washington.edu/home/mabshoff/release-cycles-2.10.1/
> > sage-2.10.1.rc1.tar
>
> Built w/o problems on both Mac OS X, 10.4.11 and 10.5.1.  One test
> failed on each:
>
> 10.4.11 (Dual Quad Xeon, "-j6"):
>
>  real80m54.727s
>  user64m0.940s
>  sys 37m8.340s
>
>
> --
>  The following tests failed:
>
>
>  sage -t  devel/sage-main/sage/interfaces/sage0.py
>  Total time for all tests: 3117.0 seconds
>
> 10.5.1 (Core Duo, "-j2"):
>  real126m1.604s
>  user96m4.584s
>  sys 19m13.760s
>
>
> --
>  The following tests failed:
>
>
>  sage -t  devel/sage-main/sage/interfaces/sage0.py
>  Total time for all tests: 3000.3 seconds
>
> In both cases, the 'sage0' failure was the same as Jaap reported for
> alpha2 (escape sequences causing syntax errors).  I'm not sure I got
> the whole thread, though: was there a solution to this?

No, I think everybody is stumped.

Interestingly, I just did a full doctest and build on a bunch of different
linux machines *and* on osx 10.4 ppc, osx 10.4 intel, osx 10.5 intel,
and unfortunately on *none* of them did I see this sage0.py bug.

So what do you, Jaap, and Craig Citro all have in common?
And can you replicate the sage0.py bug if you very carefully log
in as a different user with no .bash* stuff and doctest that file?

 - William

--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-devel] some sort of plotting problem

2008-01-27 Thread Jonathan Bober

Does anyone know what's going on in the following example? I can't seem
to reproduce this with a simple example. Basically, I create a few
'callable symbolic expressions', and then define a lambda function that
calls a one of them. 

Ultimately, I have a function

Q = lambda x : RR(bound(15000, 15000^x))

which takes a float and returns a float. (Well, if I change 'RR' to
'float' in the above code, I get the same result.) So, as far as I can
tell, the plot() function should just see a function that takes a float
and returns a float, and it should just plot it without complaining.

Also, if I change my callable symbolic expressions to lambdas, this
still doesn't work. 

But, if I replace Q with

Q = lambda x : RR(sin(x))

the everything works fine.

I suspect that I might be doing something wrong, since I can't reproduce
this with something simpler (and I don't like sending 'what is wrong
with my code'-type emails to sage-devel instead of sage-support), but
the same thing was happening to me yesterday and I just tried rewriting
from scratch, and I don't know what's going on. Maybe there is some sort
of bug in sage.

Here's the code, and the error.

sage: M = var('M')
sage: B = .561459483
sage: C1(M) = 1/(4*pi^2) * (B/(log(M))) * (1 - 1/(2 * log(M)^2))^2
sage: C2(M) = 2/(M - 1)^(1/2) * (log(M)^2)/B * (1 - 1/(2 * log(M)))^(-1) + 
1/(M-1)
sage: bound(N,M) = N * C1(M) - N^2 * C2(M)
sage: Q = lambda x : RR(bound(15000, 15000^x))
sage: Q(10)
2.21828479338329
sage: P = plot(Q, (1, 10))
---
 Traceback (most recent call last)

/home/bober/ in ()

/home/bober/sage/local/lib/python2.5/site-packages/sage/plot/plot.py in 
__call__(self, funcs, *args, **kwds)
   2394 # if there is one extra arg, then it had better be a tuple
   2395 elif n == 1:
-> 2396 G = self._call(funcs, *args, **kwds)
   2397 elif n == 2:
   2398 # if ther eare two extra args, then pull them out and pass 
them as a tuple

/home/bober/sage/local/lib/python2.5/site-packages/sage/plot/plot.py in 
_call(self, funcs, xrange, parametric, polar, label, **kwds)
   2470 del options['plot_division']
   2471 while i < len(data) - 1:
-> 2472 if abs(data[i+1][1] - data[i][1]) > max_bend:
   2473 x = (data[i+1][0] + data[i][0])/2
   2474 try:

: 'float' object is unsubscriptable
sage: 




--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-devel] more on number of digits

2008-01-27 Thread Alex Ghitza
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi,

David Harvey made some interesting suggestions on sagetrac about #1014
(implementing a number-of-digits function).  I have some comments about
this and I decided it might be better to bring the discussion to
sage-devel; I'll try to summarize what we end up with back on trac.

Basically, the gmp function mpz_sizeinbase returns either the correct
number of digits, or 1+ this number (unless the base is 2, when the answer
is always correct.  We want to use this to figure out the correct number
of digits, as fast as possible.  

Let *self* denote the integer we're working with and let *guess* denote
the number returned by mpz_sizeinbase.  What I am currently doing is
comparing *self* and *compare=base^(guess-1)*.  If *self* is bigger or
equal, then *guess* is right, otherwise we need to subtract one.

This can become somewhat slow when *self* is humongous, due to the fact
that we need to compute *compare*.

David's suggestion was:
- -
  * instead of computing the whole power, just estimate the top couple of
 digits using MPFR (much much much faster than computing the whole power)
  * keep increasing precision until we can distinguish the input from the
 power.

 Maybe this would be easiest to implement using interval arithmetic.

 The point is, for uniform random input, the top couple of digits will
 almost always give you the right answer straightaway. It's very rare that
 you need to compute everything. I wish I had more time to think about
 this, it sounds like a fun problem.
- -

We actually know what the first few digits (or, actually, all of them)
of *compare* are: 1000...
The trick is that to do things as suggested, we need to figure out what
the first few digits of *self* in the given base are -- in fact, I
think it's enough to know whether its first digit is a one or not.  But
I don't know how to do this efficiently.  Everything I can think of
basically comes down to comparing/dividing/etc *self* and *compare*,
and that's precisely what we were trying to avoid.  If anyone has a
smart quick way of computing the most significant digit of an arbitrary
integer with respect to an arbitrary basis, I'd love to hear about it.

Thinking about all this made me realize that for a majority of numbers
(if base=10, for a set of density 6/7) it is possible to decide that
the guess is right without involving *compare*, and very very quickly.
But for the remaining case I still need to check *self* versus *compare*.

I'm attaching the current version of the ndigits function so you can
see what it looks like at the moment.  Suggestions are very much welcome!

Cheers,
Alex

- --
Alexandru Ghitza
Assistant Professor
Department of Mathematics
Colby College
Waterville, ME 04901
http://bayes.colby.edu/~ghitza/
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.7 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHnU+qdZTaNFFPILgRAo/nAKCCI5VGc8KbzYkZv7zCdbNZFg3EpACeIt5/
Pw9669ytHNrUDy9rip4cSd0=
=DYGS
-END PGP SIGNATURE-


--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---

def ndigits(self, int base=10):
"""
Return the number of digits of self expressed in the given base.

INPUT:
base -- integer (default: 10)

EXAMPLES:
sage: n = 52
sage: n.ndigits()
2
sage: n = -10003
sage: n.ndigits()
5
sage: n = 15
sage: n.ndigits(2)
4
sage: n=1000**100+1
sage: n.ndigits()
301
sage: n=1000**100-1
sage: n.ndigits()
300
"""
if base < 2:
raise ValueError, "base=%s should be an integer greater than or 
equal to 2" %base
if self == 0:
return 1
# the following is either the number of digits, or 1+ the number
# of digits
guess = Integer(mpz_sizeinbase(self.value, base))
# if the base is 2, the guess is always correct
if guess == one or base == 2:
return guess

# from the behavior of mpz_sizeinbase, we know that self is
# somewhere between 2^floor(log2(base^(guess-1))) and
# 2^floor(log2(base^guess))
threshold = (guess - one)*RR(base).log2() + 1
# floor(threshold) is the number of bits required to write down
# base^(guess-1).  If self needs more bits than that, then it is
# clearly bigger and guess is correct.
if self.bits() > (guess - one)*RR(base).log2() + 1:
return guess
else:
# otherwise, we need to "m

[sage-devel] Re: more on number of digits

2008-01-27 Thread David Harvey


On Jan 27, 2008, at 10:44 PM, Alex Ghitza wrote:

> David's suggestion was:
> - -
>   * instead of computing the whole power, just estimate the top  
> couple of
>  digits using MPFR (much much much faster than computing the whole  
> power)
>   * keep increasing precision until we can distinguish the input  
> from the
>  power.
>
>  Maybe this would be easiest to implement using interval arithmetic.
>
>  The point is, for uniform random input, the top couple of digits will
>  almost always give you the right answer straightaway. It's very  
> rare that
>  you need to compute everything. I wish I had more time to think about
>  this, it sounds like a fun problem.
> - -
>
> We actually know what the first few digits (or, actually, all of them)
> of *compare* are: 1000...

Sorry, you're right, I wasn't very coherent.

What I think I meant was to quickly compute the top few *binary*  
digits of "compare". The reason for this is that everything is stored  
internally in binary, so it's very easy to read off the top few  
*binary* digits of "self".

david


--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-devel] Re: some sort of plotting problem

2008-01-27 Thread William Stein

On Jan 27, 2008 9:39 PM, Jonathan Bober <[EMAIL PROTECTED]> wrote:
>
> Does anyone know what's going on in the following example? I can't seem
> to reproduce this with a simple example. Basically, I create a few
> 'callable symbolic expressions', and then define a lambda function that
> calls a one of them.
>
> Ultimately, I have a function
>
> Q = lambda x : RR(bound(15000, 15000^x))
>
> which takes a float and returns a float. (Well, if I change 'RR' to
> 'float' in the above code, I get the same result.) So, as far as I can
> tell, the plot() function should just see a function that takes a float
> and returns a float, and it should just plot it without complaining.

[...]

I don't know, but you should check out

 http://trac.sagemath.org/sage_trac/ticket/1938

It's some surprisingly sophisticated code that makes it so
that if f is a symbolic expression, then f._fast_float(...) gives
back a blazingly fast python function that is the same as
calling f and coercing to floats.It might be relevant to
what you're thinking about.

Don't be too afraid of the "negative review" -- that was me earlier today;
I found one bug which is documented in my comment.

>
> Also, if I change my callable symbolic expressions to lambdas, this
> still doesn't work.
>
> But, if I replace Q with
>
> Q = lambda x : RR(sin(x))
>
> the everything works fine.
>
> I suspect that I might be doing something wrong, since I can't reproduce
> this with something simpler (and I don't like sending 'what is wrong
> with my code'-type emails to sage-devel instead of sage-support), but
> the same thing was happening to me yesterday and I just tried rewriting
> from scratch, and I don't know what's going on. Maybe there is some sort
> of bug in sage.
>
> Here's the code, and the error.
>
> sage: M = var('M')
> sage: B = .561459483
> sage: C1(M) = 1/(4*pi^2) * (B/(log(M))) * (1 - 1/(2 * log(M)^2))^2
> sage: C2(M) = 2/(M - 1)^(1/2) * (log(M)^2)/B * (1 - 1/(2 * log(M)))^(-1) + 
> 1/(M-1)
> sage: bound(N,M) = N * C1(M) - N^2 * C2(M)
> sage: Q = lambda x : RR(bound(15000, 15000^x))
> sage: Q(10)
> 2.21828479338329
> sage: P = plot(Q, (1, 10))
> ---
>  Traceback (most recent call last)
>
> /home/bober/ in ()
>
> /home/bober/sage/local/lib/python2.5/site-packages/sage/plot/plot.py in 
> __call__(self, funcs, *args, **kwds)
>2394 # if there is one extra arg, then it had better be a tuple
>2395 elif n == 1:
> -> 2396 G = self._call(funcs, *args, **kwds)
>2397 elif n == 2:
>2398 # if ther eare two extra args, then pull them out and 
> pass them as a tuple
>
> /home/bober/sage/local/lib/python2.5/site-packages/sage/plot/plot.py in 
> _call(self, funcs, xrange, parametric, polar, label, **kwds)
>2470 del options['plot_division']
>2471 while i < len(data) - 1:
> -> 2472 if abs(data[i+1][1] - data[i][1]) > max_bend:
>2473 x = (data[i+1][0] + data[i][0])/2
>2474 try:
>
> : 'float' object is unsubscriptable
> sage:
>
>
>
>
> >
>



-- 
William Stein
Associate Professor of Mathematics
University of Washington
http://wstein.org

--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-devel] Re: Sage 2.10.1.rc1 released

2008-01-27 Thread root

The escape sequences look like old ansi-graphics sequences.
Is there a terminal setting somewhere?

Tim

--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-devel] Re: more on number of digits

2008-01-27 Thread David Harvey


On Jan 27, 2008, at 10:55 PM, David Harvey wrote:

>> We actually know what the first few digits (or, actually, all of  
>> them)
>> of *compare* are: 1000...
>
> Sorry, you're right, I wasn't very coherent.
>
> What I think I meant was to quickly compute the top few *binary*
> digits of "compare". The reason for this is that everything is stored
> internally in binary, so it's very easy to read off the top few
> *binary* digits of "self".

BTW I think the following might be relevant:

sage: I = RealInterval(10.0, 10.0)
sage: I
[10.000 .. 10.000]
sage: I**1
[9.3908e .. 1.0429e1]

I don't know exactly what this means, since I don't understand enough  
about the semantics of the constructor, but surely someone like Carl  
Witty would know.

(and is this is a bug:

sage: I**10
[2.0985787164673874e323228496 .. +infinity]

???)

david


--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-devel] Re: Sage 2.10.1.rc1 released

2008-01-27 Thread Craig Citro

> So what do you, Jaap, and Craig Citro all have in common?

Rugged good looks? :)

Fix is up on trac ticket 1958. The issue is that ANSI codes end up in
the output string; I wrote a very quick and dirty patch to strip them
out, but it's still curious to me how they get there on our three
machines and nowhere else. Maybe a configuration issue? An issue with
readline?

-cc

--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-devel] Re: Sage 2.10.1.rc1 released

2008-01-27 Thread mabshoff



On Jan 28, 5:53 am, "Justin C. Walker" <[EMAIL PROTECTED]> wrote:
> On Jan 27, 2008, at 20:36 , Craig Citro wrote:
>
>
>
> >> So what do you, Jaap, and Craig Citro all have in common?
>
> > Rugged good looks? :)
>
> I certainly concur with this conclusion, but...

:)

> > Fix is up on trac ticket 1958. The issue is that ANSI codes end up in
> > the output string; I wrote a very quick and dirty patch to strip them
> > out, but it's still curious to me how they get there on our three
> > machines and nowhere else. Maybe a configuration issue? An issue with
> > readline?
>
> I'll suggest that this is more of a work-around than a fix.  The
> question remains, as you say, regarding the presence of these pesky
> escape sequences...
>
> This sequence of releases (2.10.1.xxx) is the first where this
> problem has been seen, right?
>
> Is .alpha2 the one to first show the problem?  What went into that
> tarball?  Do we have a handle on the changes?

Look into alpha[012] at 
http://sage.math.washington.edu/home/mabshoff/release-cycles-2.10.1/

> Justin

Cheers,

Michael

> --
> Justin C. Walker, Curmudgeon-At-Large
> Institute for the Enhancement of the Director's Income
> 
> Experience is what you get
>when you don't get what you want.
> 
--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-devel] Re: Sage 2.10.1.rc1 released

2008-01-27 Thread Craig Citro

> > Fix is up on trac ticket 1958. The issue is that ANSI codes end up in
> > the output string; I wrote a very quick and dirty patch to strip them
> > out, but it's still curious to me how they get there on our three
> > machines and nowhere else. Maybe a configuration issue? An issue with
> > readline?
>
> I'll suggest that this is more of a work-around than a fix.  The
> question remains, as you say, regarding the presence of these pesky
> escape sequences...
>

Very true.

> This sequence of releases (2.10.1.xxx) is the first where this
> problem has been seen, right?
>

No, it's the first one with that particular doctest in place. I just
tried it on my 2.10 tree, and it creates the exact same bug.

Since we're mentioning it, there's a known issue with the readline
build on certain platforms, which you can spot by looking at your
install.log at the section where readline gets installed. I don't know
why these would be related, and Michael Abshoff is suspicious -- which
probably means I'm wrong :) -- but if I were motivated to look, I'd
probably start there. This is trac ticket #1259. It's easy to get the
build problems to go away, but I'm not sure if it's the "right" way to
do so -- if you untar the readline package, go into src/support, and
look at shobj-conf. If you edit line 145 to say:

darwin[89]*)

and line 174 to start with

 darwin[789]*)

then it builds with no errors. However, if you look at what you're
doing, you're basically just telling the builder to use the same
options for 10.5 (which is what I assume Darwin9 is?) as it uses on
Darwin 8. I have absolutely no idea whether or not that's a wise idea.

Once one does this, you could try rebuilding all of Sage with the new
readline package, and seeing if you get the same troubles.

-cc

--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-devel] Re: some sort of plotting problem

2008-01-27 Thread Justin C. Walker


On Jan 27, 2008, at 18:39 , Jonathan Bober wrote:

>
> Does anyone know what's going on in the following example? I can't  
> seem
> to reproduce this with a simple example. Basically, I create a few
> 'callable symbolic expressions', and then define a lambda function  
> that
> calls a one of them.


I have no problem using 2.10.1.rc1.  I get the error that you see if  
I use 2.10.

Justin

--
Justin C. Walker, Curmudgeon-at-Large
() The ASCII Ribbon Campaign
/\ Help Cure HTML Email




--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-devel] Re: Sage 2.10.1.rc1 released

2008-01-27 Thread Justin C. Walker


On Jan 27, 2008, at 20:36 , Craig Citro wrote:

>
>> So what do you, Jaap, and Craig Citro all have in common?
>
> Rugged good looks? :)

I certainly concur with this conclusion, but...

> Fix is up on trac ticket 1958. The issue is that ANSI codes end up in
> the output string; I wrote a very quick and dirty patch to strip them
> out, but it's still curious to me how they get there on our three
> machines and nowhere else. Maybe a configuration issue? An issue with
> readline?

I'll suggest that this is more of a work-around than a fix.  The  
question remains, as you say, regarding the presence of these pesky  
escape sequences...

This sequence of releases (2.10.1.xxx) is the first where this  
problem has been seen, right?

Is .alpha2 the one to first show the problem?  What went into that  
tarball?  Do we have a handle on the changes?

Justin

--
Justin C. Walker, Curmudgeon-At-Large
Institute for the Enhancement of the Director's Income

Experience is what you get
   when you don't get what you want.





--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-devel] Re: Sage 2.10.1.rc1 released

2008-01-27 Thread Craig Citro

> > I'll suggest that this is more of a work-around than a fix.  The
> > question remains, as you say, regarding the presence of these pesky
> > escape sequences...
> >
>
> Very true.
>

So I just posted another version of the patch, which is a bit slicker,
at William's suggestion. I need someone to review it, and it should be
one of the two of Justin & Jaap, since you're the only ones currently
seeing the bug.

-cc

--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---