Opened 10 years ago

Last modified 2 years ago

#5930 closed enhancement

switch from maxima to pynac for core symbolic manipulation system — at Version 3

Reported by: was Owned by: tbd
Priority: blocker Milestone: sage-4.0
Component: symbolics Keywords:
Cc: burcin Merged in:
Authors: Reviewers:
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Description (last modified by was)

If you want to try the code out do this:

  1. Install sage-3.4.2.
  1. Build pynac (should take about 3-5 minutes):
    ./sage -i http://sage.math.washington.edu/home/mhansen/symbolics/pynac-0.1.6-mh.spkg
    
  1. Apply the two patches at http://sage.math.washington.edu/home/mhansen/symbolics/
    sage: hg_sage.apply('http://sage.math.washington.edu/home/mhansen/symbolics/symbolics_1.patch')
    sage: hg_sage.apply('http://sage.math.washington.edu/home/mhansen/symbolics/symbolics_2.patch')
    

Just check in each with some random comment.

  1. Delete all traces of constants.so:
    rm devel/sage/build/*/sage/symbolic/constants*
    rm devel/sage/build/sage/symbolic/constants.so
    
  1. Build with "sage -br", and it should work. Building will take a while, since the patches touch many files.

Change History (3)

comment:1 Changed 10 years ago by burcin

  • Cc burcin added
  • Component changed from algebra to symbolics

comment:2 Changed 10 years ago by was

  • Description modified (diff)

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

comment:3 Changed 10 years ago by was

  • Description modified (diff)
Note: See TracTickets for help on using tickets.