Sophie

Sophie

distrib > Fedora > 15 > i386 > by-pkgid > 7ebd25ac536d248d499a3ce2acda963a > files > 3098

Macaulay2-1.3.1-8.fc15.i686.rpm

-- -*- M2-comint -*- {* hash: -807507937 *}

i1 : R = ZZ/31[x]

o1 = R

o1 : PolynomialRing

i2 : f = (x^110+1)*(x^13+1)

      123    110    13
o2 = x    + x    + x   + 1

o2 : R

i3 : time factor f
     -- used 0.016997 seconds

              2       2        2       2       2       4     3     2            4     3      2            4     3     2            10     8    6    4      2       10     8     6     4      2       10      8     6     4      2       10      8     6      4     2       10      8     6      4     2       10     8      6     4      2       10     8      6     4      2       10      8     6     4      2       10      8     6     4     2       10      8    6    4     2
o3 = (x + 1)(x  + 1)(x  - 15)(x  + 8)(x  + 4)(x  + 2)(x  + 9x  - 4x  + 9x + 1)(x  - 4x  + 11x  - 4x + 1)(x  - 6x  - 2x  - 6x + 1)(x   + 9x  - x  - x  - 10x  + 1)(x   - 5x  - 8x  - 4x  - 13x  + 1)(x   - 11x  - 8x  - 4x  + 11x  + 1)(x   + 13x  - 2x  + 15x  + 5x  + 1)(x   + 10x  - 2x  + 15x  - 9x  + 1)(x   - 9x  + 15x  - 2x  + 10x  + 1)(x   + 5x  + 15x  - 2x  + 13x  + 1)(x   + 11x  - 4x  - 8x  - 11x  + 1)(x   - 13x  - 4x  - 8x  - 5x  + 1)(x   - 10x  - x  - x  + 9x  + 1)

o3 : Expression of class Product

i4 : g = () -> factor f

o4 = g

o4 : FunctionClosure

i5 : g = profile g
--warning: function g redefined

o5 = g

o5 : FunctionClosure

i6 : h = profile("h", () -> factor f)

o6 = h

o6 : FunctionClosure

i7 : for i to 10 do (g();h();h())

i8 : profileSummary
g: 11 times, used .206968 seconds
h: 22 times, used .410939 seconds

i9 :