Alec Mihailovs

Dr. Aleksandrs Mihailovs

4495 Reputation

21 Badges

20 years, 341 days
Mihailovs, Inc.
Owner, President, and CEO
Tyngsboro, Massachusetts, United States

Social Networks and Content at Maplesoft.com

Maple Application Center

I received my Ph.D. from the University of Pennsylvania in 1998 and I have been teaching since then at SUNY Oneonta for 1 year, at Shepherd University for 5 years, at Tennessee Tech for 2 years, at Lane College for 1 year, and this year I taught at the University of Massachusetts Lowell. My research interests include Representation Theory and Combinatorics.

MaplePrimes Activity


These are replies submitted by Alec Mihailovs

This is a simple calculation.

A 16-bit number mod 1024 = 2^10 is just the lowest 10 bit of it. The highest 6 bits are not used, so the 12 bits that they are made from, can be anything - that gives multiplier 2^12 to the number of IP addresses corresponding to the given result (from 0 to 1023).

Now, 0 bit can be obtained in 3 cases of using AND - 0 & 1, 1 & 0, and 0 & 0, and 1 only in one case, as 1&1.

Let z(n) be the number of 0s in the 10 bits of the number n from 0 to 1023. For example, z(0)=10, z(1)=9, and z(1023)=0.

Since every 0 bit can be obtained in 3 cases, and 1 - in 1 case, by the product rule, the number of IP addresses mapping to n equals 3^z(n)*2^12.

That tells that the algorithm is very bad - for example, 3^10*2^12 IP addresses are mapped to 0, and only 2^12 IP addresses are mapped to 1023.

A "good" algorithm can be constructed by choosing an operation producing 2 0s and 2 1s instead of AND - for example, a (bitwise) xor. That would lead to a mapping of 2^22 IP addresses to every number from 0 to 1023.

Alec

This is obviously, a bug (in design). It was discussed last year in the Clairaut's theorem thread.

Alec

This is obviously, a bug (in design). It was discussed last year in the Clairaut's theorem thread.

Alec

I think that Maple does assume that the 2 mixed derivatives are equal,

diff(u(x,y),x,y)-diff(u(x,y),y,x);

                                  0

Alec

I think that Maple does assume that the 2 mixed derivatives are equal,

diff(u(x,y),x,y)-diff(u(x,y),y,x);

                                  0

Alec

As a code, there is no much of a difference using m[i,j] for a matrix m, or m(i,j) for a procedure m. By the way, the latest Maple release allows using m(i,j) for matrices, too.

Cache, I believe, was introduced for a type of problems like that.

Alec

As a code, there is no much of a difference using m[i,j] for a matrix m, or m(i,j) for a procedure m. By the way, the latest Maple release allows using m(i,j) for matrices, too.

Cache, I believe, was introduced for a type of problems like that.

Alec

evalhf is good, but Compiler:-Compile is much faster. In your example (with an additional 0s for timing),

cp:=Compiler:-Compile(p);

time(p(1000000, 2.3));      
                                4.477
time(evalf(p(1000000, 2.3)));   
                                4.430
time(evalhf(p(1000000, 2.3)));
                                0.358
time(cp(1000000, 2.3));
                                  0.

time(evalhf(p(10000000, 2.3)));
                                3.572
time(cp(10000000, 2.3));
                                0.078

time(evalhf(p(100000000, 2.3)));
                                36.098
time(cp(100000000, 2.3));
                                0.889

3.572/0.078;
                             45.79487179
36.098/0.889;
                             40.60517435

So Compiler:-Compile is more than 40 times faster than evalhf.

Alec

evalhf is good, but Compiler:-Compile is much faster. In your example (with an additional 0s for timing),

cp:=Compiler:-Compile(p);

time(p(1000000, 2.3));      
                                4.477
time(evalf(p(1000000, 2.3)));   
                                4.430
time(evalhf(p(1000000, 2.3)));
                                0.358
time(cp(1000000, 2.3));
                                  0.

time(evalhf(p(10000000, 2.3)));
                                3.572
time(cp(10000000, 2.3));
                                0.078

time(evalhf(p(100000000, 2.3)));
                                36.098
time(cp(100000000, 2.3));
                                0.889

3.572/0.078;
                             45.79487179
36.098/0.889;
                             40.60517435

So Compiler:-Compile is more than 40 times faster than evalhf.

Alec

Java is good for gadgets and for dialog windows. In addition to being slow, it is extremely memory intensive. With so many features as a normal interface (such as Classic) provides, it is theoretically impossible to make a normal (not talking about good) interface in Java. And it is more or less obvious for any Java programmer, I think.

Only people with absolutely no Java experience could make that interface choice then, in 2003, and continue with it now.

And 2D-input with its jumping cursor makes things thousands times worse.

I wonder how long Maplesoft can survive with that interface on the glory of the old and good Maple. Mathcad and Matlab already switched to Mupad...

A good thing is that if that will eventually lead to Maplesoft bancrupcy, Maple will become open source hopefully and it will be all ours :)

Alec

Java is good for gadgets and for dialog windows. In addition to being slow, it is extremely memory intensive. With so many features as a normal interface (such as Classic) provides, it is theoretically impossible to make a normal (not talking about good) interface in Java. And it is more or less obvious for any Java programmer, I think.

Only people with absolutely no Java experience could make that interface choice then, in 2003, and continue with it now.

And 2D-input with its jumping cursor makes things thousands times worse.

I wonder how long Maplesoft can survive with that interface on the glory of the old and good Maple. Mathcad and Matlab already switched to Mupad...

A good thing is that if that will eventually lead to Maplesoft bancrupcy, Maple will become open source hopefully and it will be all ours :)

Alec

I've just looked at the Maplesoft career page. 5 jobs - all for the Java interface. Obviously, they think that if more people work on it, it could be made better :)

Alec

I've just looked at the Maplesoft career page. 5 jobs - all for the Java interface. Obviously, they think that if more people work on it, it could be made better :)

Alec

That seems to be the end of the Mentor of the Month as well as Quarterly Maple Mentor awards.

Is something different planned for this year?

Alec

Will I get another Maplesoft mug for that?

My wife is drinking coffee from the one that I got for being Maple Mentor last May, and I would like to have one for myself, too.

Alec

First 72 73 74 75 76 77 78 Last Page 74 of 180