
	A Comparison of Maple, Mathematica, and Macsyma
	-----------------------------------------------

==============================================================================
by flajolet@inria.UUCP (Philippe Flajolet) INRIA, Rocquencourt. France
with an update by zimmerma@bandol.inria.fr (Paul Zimmermann).
==============================================================================



At Inria (Rocquencourt, France) we have attempted a comparison of 

        Maple,Mathematica and Macsyma.

It is largely based on efficiency considerations and is offered here
with the hope of triggering some debate amongst users of various systems.
There is of course no claim of having been exhaustive, but I've tried
to draw some systematic conclusions from a few benchmarks,
and I'd like this experience to be confronted with other points of view.

Tested versions:
        Maple V4.2 [Dec.87]
        Mathematica (sun 1.0), demo version 21 June 1988
        Sun Unix Macsyma 309.6 [Symbolics 1987]
Timing results are for a Sun 3.60 w/ 12 Mbytes of memory.


I should say that I am a regular Maple user (we do our development
in Maple), recent discoverer of Mathematica and occasional user of Macsyma.

        The ranking of the 3 systems I propose is the following:

CRITERIA:                                       MAPLE   MATH    MACSY

        Efficiency:                             1++     2       3
                Integer:                        1       2       3
                Floats:                         2       1       3
                Control:                        1       2       3
                Symbolic:                       1       2       3
        Functionality:                          1       2       1
        Pleasantness:                           1       1       3
                Loading Speed:                  1++     2       3
                Debug/Trace:                    1++     2       2
                Interface/Graphics:             2       1++     2?
                Consistency:                    1?      1?      2?
                Manual:                         2       1++     2
        Overall:                                1       2       3
        

EFFICIENCY:

        Efficiency tests will be detailed later, but it appears that Maple is
often about 3 times faster than Mathematica on symbolic computations
except on small floats (there it looses by a factor of about 3 or 4)
and a good 6 times faster than Macsyma.

FUNCTIONALITY: [Very Subjective!]

        1) Globally, I believe that the two leaders are Maple and Macsyma in
terms of number of algorithms implemented. Each has of course its own limitations
but I would consider the two of them roughly equivalent.
Mathematica has a lot of functions, but several of these are
"easy", an extreme example being
        Pochhammer[a,n]=Gamma[a+n]/Gamma[n],  (you save 2 keystrokes!). 
Integration of facilities is less advanced in Mathematica (a much younger system).
For instance, a floating point eval of a Taylor series
        N[Series[Exp[x],{x,0,10}]] won't work as such.
Also,  I don't know how to extract the real part of 
        Log[x + Sin[x + I y]]
symbolically (using Re[.]). Macsyma and Maple will readily give
        1/2*ln((x+sin(x)*cosh(y))**2+cos(x)**2*sinh(y)**2).
Some of this may be due to being a recent Mathematica
user, but the general impression is that 
Mathematica is a sound system which still lacks some of the
standard features of its elder brothers.

        2) Mathematica has a very strong point with excellent 3D Graphics
(SunTools and PostScript interfaces, very pleasant and very  professional!).
Maple has only 2D graphics, but reasonable and simple Tektronix (useable under Xwindows)
and PostScript interfaces.



PLEASANTNESS: [Also very subjective]

        1) Maple loads very fast (0.5s) with a small kernel (~200k).
Apart from very basic primitives [2+3, expand((x+y)^2...],all its mathematical 
computations relie on library functions: the source (with comments) is accessible
separately, but also from under a Maple session (using op(.)),
and both user and system functions can be traced. Debugging in Maple,
when a computation does not work as expected is infinitely superior
to debugging in Macsyma!
         Mathematica and Macsyma load in about 7s and 11s respectively.
Executable code sizes are 2.7Mbytes and 6.1Mbytes resp.
They don't appear to give the same debugging facilities as Maple,
since more is done in the kernel and less is done in libraries.
It is all the more surprising that despite this aspect, they are not
in general as efficient as Maple.

        2) Manual: My ranking is 1++ for Mathematica (publ. Addison-Weesley)
and 2 ex aequo for the others. 

        3) Consistency: I think both Mathematica and Maple are "easy to
grasp". Evaluation mechanisms are simple and coherent. By the way,
simplicity, elegance, consistency are extremely important
in the design of computer algebra systems!
I believe that more time is now spent on programming and less in
interactive sessions and predictability of results (or ease
of debugging) depend crucially on the criteria above.
It is better to have fewer functions with well-defined
semantics than a number of ad hoc procedures that will break down unexpectedly.
Defining coherent philosophies is a highly non trivial problem;
consider the solve function: What should we get for
        solve(exp(x)=1,x); solve(sin(x)=2); solve(sin(x)=0); solve(sqrt(x)=1)...?
Globally, I have a feeling that Macsyma is more heterogeneous than
the other two systems.

        4) Interface: Mathematica has the lead I think due to its
graphics, and the language is simple enough to look consistent.
However, I don't like the absence of termination symbol for
commands (the parser stops as soon as it can!). This is likely
to pose problems when Mathematica is used as an algebra engine
with commands generated by another program. For instance
"(2+3)*5" typed on 2 lines will give:
        In[1]:= (2+3)
        Out[1]= 5
        In[2]:= *5
                ^ <retype line>
This is a detail, but I think it is also poor ergonomics for the user that may need
to type in long expressions.
        Maple should have a textual "save" that is actually an inverse
of a "load" and should get rid of its format for lprint of floats 
which is a pain for people that use it to generate input to other
(Postscript, Pascal,C etc.) programs and has visual info content 0
[Is "Float(1414427157,-12)" of the order of 10^(-1) or 10^(-4)?].
        Maple's print should be interruptible (^C) when
too long a formula is being displayed.
        
        5) Mathematica has a good concept of simplification rules:
In[2]:= log[x_ y_] =log[x]+log[y]
In[3]:= log[2*a]
Out[3]= log[2] + log[a]
and I would like to have something that simple in other systems.

OVERALL: I would rank Maple number 1 based on its efficiency,
and functionality. For each criterion, I think that Macsyma is
always beaten either by Maple or Mathematica, so that I rank it 3.
Mathematica looks like a promising new system, though it is
likely to remain less efficient than Maple (except for small floats),
and developments related to interfaces should be watched!
Although I sympathize with the system, I don't like the advertising
style of Mathematica [Manual: "Mathematica now promises to automate all
mathematical computations"...]

Roughly, I would continue developing large symbolic packages in Maple,
appeal to Macsyma in rare cases where I lack a specific function,
and use Mathematica as a SuperFortran for some numerical (real number)
applications and as a Plot server.


        ***** EFFICIENCY TESTS  *****

First, I give a set of 4 tests [A,B,C,D] in Maple, Mathematica and Macsyma resp.
Then a more detailed analysis, based on timings of individual commands and
finally a program that was tried in the three languages.
        
======================================================================

BATCH A: General Test

This is just a random combination of numeric and symbolic commands
in order to get a rough feeling of what goes on.
First, we do a Taylor expansion to order 80 (A1), then compute with integers up to
10,000 digits (A2), then do a big float computation to
400 digits of accuracy (A3). Finally, we start with
d=1/(1+x^4), differentiate 16 times (A4) and integrate back
to obtain d (A5).

        F:=8;
A1:     taylor(1/cos(z),z=0,10*F);
A2:     2^(1000*F)/3^(1000*F)*15^(1000*F)/10^(1000*F);
A3:     evalf(exp(Pi*sqrt(163)),50*F);
        d:=1/(1+x^4);
A4:     for i from 1 to 2*F do  d:=diff(d,x) od;
A5:     for i from 1 to 2*F do  d:=int(d,x)  od;
        quit();

MAPLE:        207.1 real       198.8 user         2.3 sys  
MATH:         770.4 real       677.7 user         5.5 sys  
MACSY:       1453.3 real      1429.8 user         3.2 sys  

        Maple is globally 3 times faster than Mathematica on this
and 7 times faster than Macsyma (!). However, a more detailed analysis
reveals that Maple is loosing on floats (A3), while it wins on all
the other tests. So, we investigate flaots separately below [Batch C].

======================================================================

BATCH B: Control Sructures Test

This aims at testing in more detail  the efficiency of loop controls, procedure calls
with or without remember tables.
First, we do 5000 simple enough for-loops (B1). Next, we compute about 2000 recursive
-- exactly 1973 -- calls to a function related to the Fibonacci sequence (B2).
Finally, we define a trivial function f(x)=x  which remembers its values;
this is achieved in Mathematica by the double declaration "f[n_]:=f[n]=BODY".
We compute (and remember 500 values)

        F=1;s=0;
B1:     Timing[For[i=1,i<=5000*F,i++,If[Mod[i,2]==0 , s=s+i+1, s=s-i]]]
        nfb=Round[N[Log[F*2000.]/Log[(1+Sqrt[5.])/2]]]          /* F=1 ==> nfb=12 */
        fb[n_]:= If[ n<=1 ,1 , 1+fb[n-1]+fb[n-2] ]              /* fb[nfb]=1973 */
B2:     Timing[fb[nfb]]
        f[n_]:=f[n]=n
B3:     s=0;Timing[Do[s=s+f[j],{j,500*F}]]
        Quit[]

MAPLE:         14.8 real        13.5 user         0.7 sys  
MATH:         111.5 real       101.3 user         1.6 sys  
MACSY:        145.5 real       129.1 user         2.0 sys  

The big suprise is that Mathematica is beaten here by a factor of 7
over Maple.
A closer look shows that Mathematica looses by a ``normal'' factor
of 3 on (B1), (B2), but by a much higher factor on (B3).
It seems that remember tables are stored internally
as lists, and varying parameters, we find that computing
(and storing) n values of a function has cost n^2 ?!?.
Maple and Macsyma behave linearly. Maple uses hashing
and is efficient and the ratio Macsyma/maple is what you expect.

======================================================================

BATCH C: Small Floats Tests
[Note: for Maple use "Digits:=16;", "Digits:=32;" and for Mathematica,
use N[.,16], N[.,32], to be in accordance with Macsyma's accuracy.]
This aims at checking our intuition from Batch A (A3), that
Maple looses on floats.

        F:1;showtime:true;s:0;
C1:     for i from 1 thru 100*F do s:s+float(sqrt(i));
C2:     for i from 1 thru 100*F do s:s+float(log(i));
C3:     for i from 1 thru 100*F do s:s+float(sin(i));
        fpprec:32;
        s:0;
C4:     for i from 1 thru 100*F do s:s+bfloat(sqrt(i));
C5:     for i from 1 thru 100*F do s:s+bfloat(log(i));
C6:     for i from 1 thru 100*F do s:s+bfloat(sin(i));
        quit();

MAPLE:         53.3 real        47.1 user         0.9 sys  
MATH:          24.7 real        18.5 user         0.9 sys  
MACSY:        287.0 real       261.6 user         2.5 sys  

Incidentally, I was  impressed by the numerical complex roots finder (for
polynomials: N[Roots[Sum[x^i/i,{i,1,50}]==0,x]] in 105s) of Mathematica 
[=Macsyma's allroots(), often buggy, not available in Maple 4.2].

======================================================================

BATCH D: Yet another general test

This test was meant as an independent check to all of our earlier observations.
First we compute Newton approximations to sqrt(2) (D1) 
[It is correct up to 10^(-3135)],
and the 500th harmonic number (D2). These are tests of
integer/rational arithmetic.
Next we do a more complicated taylor expansion (D3)
and do a float eval. Finally we expand a product and factor it back.

D1:     s:=1: for i to 12 do s:=(s+2/s)/2; od: s; evalf(s^2-2);
D2:     n:=500;s:=0: for i to n do s:=s+1/i; od: s;evalf(s-log(n),50);
D3:     d:=8;f:=exp(cos(sqrt(1-x^4))); tt:=taylor(f,x=1/sqrt(2),d):evalf(tt);
D4:     m:=5;p:=expand(product(product(x[i]-x[j],i=j+1..m),j=1..m)):factor(p);

MAPLE:       27.1 real        21.9 user         0.9 sys  
MATH:       122.1 real       106.8 user         1.9 sys  
MACSY:      225.8 real       202.0 user         3.1 sys  

Ratios are now more like 1/5 and 1/10 in favour of Maple.

======================================================================


                ********** ANALYSIS **********

  Detailed timings for ...      MAPLE   MATH    MACSY

INTEGERS: Maple is surprisingly good considering that it uses
internal decimal arithmetic (!).

<10^4dig>       A2:             85.5    205.3   303.0
<Newton>        D1:              7.2     36.9    55.
<harmonic>      D2:              2.9      5.2    33.5

FLOATS: maple looses over mathematica by a factor of about 3 to 4
(on 32 and 400 digits).
Macsyma's floats are decent, but its bigfloats are outrageously
expensive.

Smallfloats:
<16 dig>        C1:             1.53    1.05    5.38
                C2:             6.60    0.53    1.05
                C3:             7.68    0.50    1.23
<32 dig>        C4:             1.73    2.93    48.68 
                C5:             10.95   3.96    128.81
                C6:             17.78   4.91    78.53
Very Big Floats:
<400 dig>       A3:             49.3    12.0    254.9

CONTROL: Macsyma is consistently about 10 times slower than
Maple. Mathematica is in between except for memo functions (Mcalls)
where the data structure has cost O(n^2) for n operations:

<5000Loop>      B1:             7.87    28.0    96.2
<1973FCall>     B2:             3.85    10.4    24.8
<500Mcall>      B3:             0.75    58.4(!) 7.5
<1000Mcall>     B'3:            1.75    218.3   15.2

There we have added a variant of B3 with twice as many loops
to show the O(n^2) dependency. Did I miss something in Mathematica
programming or is there a system design problem?
The elementary time constant for Maple is thus of the order of 1ms.

SYMBOLIC: 

<Taylor>        A1:             35.1    122.7   268.2
<Taylor2>       D3:             4.8     2.8     40.0
<Diff>          A4:             0.8     2.6     6.0
<Int>           A5:             27.1    327.5   588.7
<Factor>        D4:             6.9     35.     50.

Maple's symbolic engine looks quite good. More extensive tests
between Mathematica and Maple are called for, because of
the large dispersion of timing results observed
in these types of tests (On some factorization problems,
Mathematica will beat Maple). 
Globally, I believe Maple to be appreciably 
more efficient as a symbolic engine.


======================================================================

        ********** SYMMETRIC GROUPS **********

As a final check, Francois Morain <morain@inria.inria.fr> from Inria tried
a program he had to compute the maximal order g(n) of an
element in the symmetric group of order n. The function gg(n)
lists the sequence {g(k)}_k=1..n..
The programming was done with a table of small primes,
to put all systems on equal grounds (on our version,
Macsyma's prime(i) did not work!).
        In Maple, we used a "convert(p,array)" to have direct
(rather than sequential) access to the list of primes.
In Mathematica, we tried several variants (with Table etc.),
but all had about the same time complexity.

The Mathematica code is as follows:

F=100
gden[nmax_,kmax_]:=Block[{i, k, n,
                          g=Table[1,{nmax+1}]},
                         For[k = 1, k <= kmax, k++,
                             For[n = nmax, n >= p[[k]], n--,
                                 For[i=1, p[[k]]^i <= n, i++,
                                     g[[n+1]]=Max[g[[n+1]],
                                                  p[[k]]^i*g[[n-p[[k]]^i+1]]]
                                ]
                             ]
                         ];
                Return[g]];
gg[nmax_] := Block[{kmax},
                   kmax = Floor[N[1.5*Sqrt[nmax]*Log[nmax]]];
                   gden[nmax, kmax] ];
pp={2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,
        ......... table of the first 208 primes ...........
   1213,1217,1223,1229,1231,1237,1249,1259,1277,1279,1283};
p=Table[pp[[i]],{i,208}] /* Does not seem to improve efficiency */
Timing[gg[F]]
Quit[]


MAPLE:      12.700;       15.4 real        13.8 user         0.5 sys  
MATH:       38.733;       58.4 real        45.4 user         1.4 sys  
MACSY:     107.450;      141.8 real       108.3 user         3.3 sys  


======================================================================
======================================================================


>From zimmerma@bandol.inria.fr  Tue May 30 06:42:24 1989
From: zimmerma@bandol.inria.fr (Paul Zimmermann)

(Message of May 30 updated by message of Jun 5 which added additional
						factor tests  - Keith Geddes)

Several months ago, P. Flajolet compared Maple 4.2, Mathematica 1.0 and
Macsyma 309.6 (on a Sun 3/60 with 12 MB). I have tried these tests on the
pre-version of Maple 4.3 and on a beta test version of Mathematica 1.2,
that we received at Inria one month ago. Here are the results:

                Maple 4.3       Mathematica 1.2         Macsyma 309.6
Integers            1                2.8                      4.3
Floats 16 digits    1                1.6                      6.7
       32 digits   3.3                1                       28
      400 digits   5.3                1                       29
Control             1                 8                       12
Symbolic            1                2.7                      13
Factor             1.3                1                       48
Integer/Rational    1                4.5                      21
Taylor              1                8.9                      9.3
Differentiation     1                11                       43

mod/Factor (I1-I3) 2.1                1                      5700
Factor (J1-J4)      1                1.7                      35
Factor (K1-K4)      1                2.9                      74

Paul Zimmermann

===============================================================================
  Detailed timings for ...      MAPLE   MATH    MACSY
                                 4.3     1.2    309.6

Loading                          0.2      0.3    11.0 seconds

**** INTEGERS:
A2        2^8000/3^8000*15^8000/10^8000;
D1        s:=1: for i to 12 do s:=(s+2/s)/2 od: evalf(s^2-2);
D2        n:=500; s:=0: for i to n do s:=s+1/i od: evalf(s-log(n),50);

<10^4dig>       A2:             82.0    214.1   303.0
<Newton>        D1:              7.1     35.0    55.0
<harmonic>      D2:              2.9      5.6    33.5
------------------------------------------------------
Total                           92.0    254.7   391.5    (1 / 2.8 / 4.3)

**** FLOATS:
C1        s:=0.0; for i from 1 to 100 do s:=evalhf(s+sqrt(i)) od;
C2        s:=0.0; for i from 1 to 100 do s:=evalhf(s+ln(i)) od;
C3        s:=0.0; for i from 1 to 100 do s:=evalhf(s+sin(i)) od;

<16 dig>        C1:              0.37     1.00    5.38
                C2:              0.37     0.43    1.05
                C3:              0.40     0.42    1.23
------------------------------------------------------
Total                            1.14     1.85    7.66   (1 / 1.6 / 6.7)

          Digits:=32;
C4        s:=0.0; for i from 1 to 100 do s:=s+evalf(sqrt(i)) od;
C5        s:=0.0; for i from 1 to 100 do s:=s+evalf(ln(i)) od;
C6        s:=0.0; for i from 1 to 100 do s:=s+evalf(sin(i)) od;

<32 dig>        C4:              1.88     2.33   48.68
                C5:             10.95     3.53  128.81
                C6:             17.00     3.30   78.53
------------------------------------------------------
Total                           29.83     9.16  256.02   (3.3 / 1 / 28)

A3        evalf(exp(Pi*sqrt(163)),400);

<400 dig>       A3:             46.7      8.77  254.9    (5.3 / 1 / 29)

**** CONTROL:
B1      s:=0;
        for i from 1 to 5000 do if i mod 2=0 then s:=s+i+1 else s:=s-i fi od;
        fb:=proc(n) if n<=1 then 1 else 1+fb(n-1)+fb(n-2) fi end;
        nfb:=trunc(log(2000.)/log((1+sqrt(5.))/2));
B2      fb(nfb);
        f:=proc(n) option remember; RETURN(n) end;
B3      s:=0; for i from 1 to 500 do s:=f(i) od;
B'3     s:=0; for i from 1 to 1000 do s:=f(i) od;

<5000Loop>      B1:              7.3     29.4    96.2
<1973FCall>     B2:              3.8     11.5    24.8
<500Mcall>      B3:              0.4     16.0     7.5
<1000Mcall>     B'3:             0.8     42.3    15.2
------------------------------------------------------
Total                           12.3     99.2   143.7    (1 / 8 / 12)

**** SYMBOLIC:
A1       taylor(1/cos(z),z=0,80);
D3       f:=exp(cos(sqrt(1-x^4))); tt:=taylor(f,x=1/sqrt(2),8): evalf(tt);
         d:=1/(1+x^4);
A4       for i from 1 to 16 do d:=diff(d,x) od;
A5       for i from 1 to 16 do d:=int(d,x) od;
D4       m:=5;p:=expand(product(product(x[i]-x[j],i=j+1..m),j=1..m)):factor(p);

<Taylor>        A1:             34.7    124.8   268.2
<Taylor2>       D3:              3.8      3.0    40.0
<Diff>          A4:              0.5      2.1     6.0
<Int>           A5:             29.1     67.6   588.7
<Factor>        D4:              7.3      9.8    50.0
------------------------------------------------------
Total                           75.4    207.3   952.9    (1 / 2.7 / 13)

**** FACTOR:
        p2:=expand((4-4*x+3*x^3)*(-6+7*x-7*x^2+5*x^3)*
                   (-7+4*x-7*x^2-5*x^3+8*x^4)*(-3-6*x-7*x^2+6*x^3+3*x^4));
H1      factor(p2);
        p6:=expand((x^25+x^17+11*x^5+12)*(x^26+47*x^18+19*x^6+81));
H2      factor(p6);
        p7:=expand((x^33-1)*(x^31-1));
H3      factor(p7);

                H1:              4.8      1.7   28.4
                H2:             10.4      6.8  207.4
                H3:             13.1     13.6  832.5
------------------------------------------------------
Total                           28.3     22.1 1068.3     (1.3 / 1 / 48)

**** Integer/Rational Arithmetic and (some) Control:
E1      ee:=sum(1/i!,i=0..99);
        CF:=proc(x,n) local xi,xp,r,i,j; xp:=x; Empty(r);
        for i from 1 to n do xi:=trunc(xp); AppendTo(r,xi); xp:=1/(xp-xi) od;
        [(r[j])$j=1..n] end;
        AppendTo:=proc(l,e) l[0]:=l[0]+1; l[l[0]]:=e end;
        Empty:=proc(l) l[0]:=0 end;
E2      CF(ee,100);

                E1:              5.2     25.1   41.0
                E2:              0.7      1.2   80.1
------------------------------------------------------
Total                            5.9     26.3  121.1     (1 / 4.5 / 21)

**** Taylor Expansions:
        u[1]:=proc(x) log(1/(1-x)) end; u[2]:=proc(x) x/(1+x) end;
        u[3]:=proc(x) exp(x)-1 end; u[4]:=proc(x) sqrt(1-x)-1 end;
        u[5]:=proc(x) (1+x)^(1/3)-1 end; 
        u[6]:=proc(x) (1-x)*(1-x^2)*(1-x^3)*(1-x^4)*(1-x^5)-1 end;
        u[7]:=proc(x) x+x^2+x^3+x^4+x^5 end; u[0]:=proc(x) sin(x) end;
        test:=proc(n) t:=x; 
        for i from 1 to 8*n do t:=taylor(u[i mod 8](t),x=0,F+1) od; t end;
F1      F:=16: test(1)
F2      F:=16: test(2);

                F1:             15.1    112.4  122.8
                F2:             37.9    357.7  370.0
------------------------------------------------------
Total                           53.0    470.1  492.8     (1 / 8.9 / 9.3)

**** Differentiation:
        test:=proc(nn) s:=0; for n from 1 to nn do d:=diff(sin(x)^n,x$n);
        s:=s+subs(x=0,d)*z^n od; RETURN(s) end;
G1      test(50);

                G1:             27.2    308.5 1178.2     (1 / 11 / 43)

**** More factor tests: factor a random polynomial modulo p
	a:=17*x+78+79*x**18+43*x**19-66*x**20-53*x**21-61*x**22-23*x**23-37*x**24+31*x**25-34*x**26-42*x**27+88*x**28-76*x**29-65*x**30+25*x**31+28*x**32-61*x**33-60*x**34+9*x**35+29*x**36-66*x**37-32*x**38+78*x**39+72*x**2-99*x**3-85*x**4-86*x**5+30*x**6+80*x**
7+72*x**8+66*x**9-29*x**10-91*x**11-53*x**12-19*x**13-47*x**14+68*x**15-72*x**16-87*x**17+39*x**40+94*x**41+68*x**42-17*x**43-98*x**44-36*x**45+40*x**46+22*x**47+5*x**48-88*x**49-43*x**50;
I1	for p in {2,3,5,7} do Factor(a) mod p od:
I2	for p in {101,103,107,109} do Factor(a) mod p od: 
I3	for p in {10007,10009,10037,10039} do Factor(a) mod p od:

                I1:              5.1      3.8    515.4
                I2:             16.5     14.1   1239.1
                I3:             62.4     22.9 231896.0
------------------------------------------------------
Total                           84.0     40.8 233650.5    (2.1 / 1 / 5700)

**** More factor tests: polynomials which factor
	bb:=proc(d) expand(bernoulli(d,x)*bernoulli(d+1,x)) end:
	bb21:=bb(10); bb41:=bb(20); bb61:=bb(30); bb81:=bb(40);
J1	factor(bb21);
J2	factor(bb41);
J3	factor(bb61);
J4	factor(bb81);

                J1:              3.5      2.9    37.3
                J2:             19.5     22.8   561.9
                J3:            101.2    180.9  2678.6
                J4:            172.8    305.8  7059.3
------------------------------------------------------
Total                          297.0    512.4 10337.1      (1 / 1.7 / 35)

**** More factor tests: (quasi) irreducible polynomials
        b25:=bernoulli(25,x): b26:=bernoulli(26,x):
K1	factor(b25); factor(b26);
        b45:=bernoulli(45,x): b46:=bernoulli(46,x):
K2	factor(b45); factor(b46);
        b65:=bernoulli(65,x): b66:=bernoulli(66,x):
K3	factor(b65); factor(b66);
        b85:=bernoulli(85,x): b86:=bernoulli(86,x):
K4	factor(b85); factor(b86);

                K1:              5.3      6.9   138.8
                K2:             12.9     37.5  1086.1
                K3:            132.1     65.0  5251.6
                K4:             71.4    535.0  9913.0
------------------------------------------------------
Total                          221.7    644.4 16389.5         (1 / 2.9 / 74)


