acer's blog

acer's picture

undoing one form of symbolic root

In this previous post, an example is shown that demonstrates the potential problems that can arise following symbolic conversions such as from sqrt(x^2)  to x^(1/2).

acer's picture

wine 1.0

So, after many years in the making, version 1.0 of wine is released.

Can anyone say, whether it'll run Maple 12?

acer

acer's picture

int() and float input

This is one sort of Maple inconsistency that interests me. Why should the first example behave like evalf(Int(...)) and call `evalf/int` while the second example does not?

acer's picture

timelimit

I was looking at the timelimit command in Maple, and wonder about whether it might be improved .

The help-page ?timelimit says that it suspends its checks while within builtin functions. It says that, inside builtins, the time limit is "ignored".

But Maple has a lot of builtins. And significant portions of the work may go on within them. Does this make the timelimit() function not useful, from a practical point of view?

What if timelimit were to make checks whenever garbage collection (gc) ocurred? That's a safe point, no? And gc can happen within some builtins? Or what if time checks were made at the same frequency that interrupt requests were checked? Those can happen within some builtins, at safe points.

Those were my thoughts, until I tried it. The command anames(builtin) shows that rtable() is a builtin. But I have found that timelimit will function within at least some rtable() calls.

acer's picture

exploding a sparse float[8] Matrix

I was reminded of this by another thread.

It is faster to add in-place a large size storage=sparse float[8] Matrix into a new empty storage=rectangular float[8] Matrix than it is to convert it that way using the Matrix() or rtable() constructors.

Here's an example. First I'll do it with in-place Matrix addition. And then after that with a call to Matrix(). I measure the time to execute as well as the increase in bytes-allocated and bytes-used.

> with(LinearAlgebra):

> N := 500:
> A := RandomMatrix(N,'density'=0.1,
>                   'outputoptions'=['storage'='sparse',
>                                    'datatype'=float[8]]):

> st,ba,bu := time(),kernelopts(bytesalloc),kernelopts(bytesused):

> B := Matrix(N,'datatype'=float[8]):
> MatrixAdd(B,A,'inplace'=true):

> time()-st,kernelopts(bytesalloc)-ba,kernelopts(bytesused)-bu;
                            0.022, 2489912, 357907
acer's picture

Thin SVD

As Demmel and others have noted, SVD is both more reliable and more expensive than QR as a method of solving rank-deficient least squares problems.

SVD is the method that LinearAlgebra:-LeastSquares will choose when the Matrix has more columns than rows (n>m), unless instructed otherwise using the optional 'method' parameter.

LinearAlgebra:-SingularValues always computes a full U and Vt. But for least squares computations, such as when n>m, this is not necessary. Including the smaller singular values may just be (re-)introducing noise. See here for more detail.

Here's a 20x2000 example, using wrapperless external calling and the SVD routine dgesvd in the CLAPACK library. The effective speedup by using the Thin SVD for that 20x2000 least squares example is about a factor of 100 (ie, 2000/20), with a similar reduction in additional memory allocation.

acer's picture

Maple patch library (independent)

I have been wondering about the reception of an independent patch Library for Maple.

I'll lay out a few ideas, and then maybe some criticism (or indifference) might follow.

I'm a bullet-point sort of person:

acer's picture

Easter, closer still

Another interesting undocumented package in the Maple 11.02 Library.

acer's picture

Easter is close, '08

The time for Easter eggs will soon be here.

And using LibraryTools to browse and poke about in Maple's .mla files can show a few undocumented items.

Here's one below, that's an interesting part of a package.

acer's picture

5th ncrunch math program review

A few weeks ago I mentioned the ncrunch comparison of "mathematical programs for data analysis" in a comment in another thread.  There is now a new, 5th release of that review. The systems reviewed are:

  • GAUSS
  • Maple
  • Mathematica
  • Matlab
  • O-Matrix
  • Ox
  • SciLab

The review is skewed towards statistical computation and data manipulation, but it includes several interesting comparisons of the major computer algebra systems (CAS).

There is a comparative performance section, and the worksheets used for that benchmarking are available for download. Here is the Maple worksheet, which was used with Maple 11.

Syndicate content
}