[Shootout-list] New matrix-norm not matrixy?

Greg Buchholz sleepingsquirrel@member.fsf.org
Sun, 27 Mar 2005 11:33:51 -0800 (PST)


--- Dave <davejf@frontiernet.net> wrote:
> What precision should the output verification be carried to - 10
> instead of 
> 20 maybe?
> 
> The GCC C version (the current 'gold standard') gives
> 1.27422415222861729056
> The Ocaml native version gives 1.27422415222861706852

    Yes, it'll be hard to get 20 digits of precision since IEEE754 64-bit
doubles only have about 15 decimal digits of precision.

    I've taken a quick look at the matrix-norm test and it seems like in
the process of converting from the mathematical description (item #3 at
http://mathworld.wolfram.com/Hundred-DollarHundred-DigitChallengeProblems.html
) to an imperative algorithm, the test has lost some of its matrixyness. 
Note that the original 2-D matrix has been replaced by the "eval_A"
function.  Also, the indexing on the the 1-D vectors (u & v, which are
use to accumulate the intermediate values) is very simple.  It marches
right on through, from one element to the very next.  We might want to
consider a matrix test which has higher dimensions (2D, 3D, ...) and a
more complex access pattern.  For instance, maybe having the next element
of matrix depend on its nearest neighbors in both columns and rows (e.g.
B[i,j] = A[i-1,j] + A[i,j-1] - A[i+1,j+1] ...).  As an example, see the
fluid dynamics simulation shown on...

http://www.wolframscience.com/nksonline/page-378
http://www.wolframscience.com/nksonline/page-380

...It probably meets the requirement for higher dimension matrix
calculations and has a non-trivial access pattern.  And we could produce
a pretty picture using postscript or something.

Thoughts?

Greg Buchholz




		
__________________________________ 
Do you Yahoo!? 
Yahoo! Small Business - Try our new resources site!
http://smallbusiness.yahoo.com/resources/