Changes between Initial Version and Version 2 of Ticket #5930


Ignore:
Timestamp:
05/07/09 16:56:27 (9 years ago)
Author:
was
Comment:

Bug/Issue?: Control-C doesn't work in some cases.

----------------------------------------------------------------------
| Sage Version 3.4.2, Release Date: 2009-05-05                       |
| Type notebook() for the GUI, and license() for information.        |
----------------------------------------------------------------------
sage: var('x,y,z')
(x, y, z)
sage: time f = (x+y+z)^5
CPU times: user 0.00 s, sys: 0.00 s, total: 0.00 s
Wall time: 0.00 s
sage: g = f*(f+1)
sage: timeit('g.expand()')
5 loops, best of 3: 53.2 ms per loop
sage: %prun g.expand()
         8890 function calls in 0.069 CPU seconds

   Ordered by: internal time

   ncalls  tottime  percall  cumtime  percall filename:lineno(function)
        1    0.065    0.065    0.069    0.069 {method 'expand' of 'sage.symbolic.expression.Expression' objects}
     8863    0.003    0.000    0.003    0.000 functional.py:393(imag)
        1    0.000    0.000    0.069    0.069 <string>:1(<module>)
        4    0.000    0.000    0.000    0.000 arith.py:1140(gcd)
        4    0.000    0.000    0.000    0.000 {method 'lcm' of 'sage.structure.element.PrincipalIdealDomainElement' objects}
        4    0.000    0.000    0.000    0.000 arith.py:1256(lcm)
        4    0.000    0.000    0.000    0.000 {method 'gcd' of 'sage.rings.integer.Integer' objects}
        8    0.000    0.000    0.000    0.000 {hasattr}
        1    0.000    0.000    0.000    0.000 {method 'disable' of '_lsprof.Profiler' objects}

sage: %prun v = [g.expand() for _ in range(1000)]
^CException exceptions.KeyboardInterrupt: KeyboardInterrupt() in 'sage.symbolic.pynac.py_is_real' ignored
^CException exceptions.KeyboardInterrupt: KeyboardInterrupt() in 'sage.symbolic.pynac.py_is_real' ignored
^CException exceptions.KeyboardInterrupt: KeyboardInterrupt() in 'sage.symbolic.pynac.py_is_real' ignored

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #5930

    • Property Cc burcin added
    • Property Component changed from algebra to symbolics
  • Ticket #5930 – Description

    initial v2  
     1If you want to try the code out, there is an spkg and two patches in
     2
     3http://sage.math.washington.edu/home/mhansen/symbolics/. 
     4
     5These should install and apply cleanly to Sage 3.4.2.
     6Note that after applying all this you must delete all traces of constants.so:
     7
     8{{{
     9$ rm devel/sage/build/lib.macosx-10.3-i386-2.5/sage/symbolic/constants*
     10$ rm devel/sage/build/temp.macosx-10.3-i386-2.5/sage/symbolic/constants*
     11$ rm devel/sage/build/sage/symbolic/constants.so
     12}}}