Sum benchmark
by Alain Barraud
05 Mar 2009
Compute set of real values to be summed with an a priori known sum and specified condition number
|
Watch this File
|
| File Information |
| Description |
For a given n, a condition number cth and a value s, Sumbench.m computes a n-vector x with x(1)+...+x(n) = s exactly and whose the sum condition number is about cth within sharp bounds. The true condition number is also returned.
An option is given to return an x such that the exact sum is not exactly a floating point but whose value is described 2 floating point. In this case a third output argument v is a 2 vector such that s= v(1)+ v(2) with v(2)<eps*v(1) ( no overlap).
Sumbench calls another m file exactsum.m which can be used directly for personnal test purpose. This small routines computes the exact sum of any given n- vector. See the comments for details. |
| Acknowledgements |
This submission has inspired the following:
XSum
|
| MATLAB release |
MATLAB 7.5 (R2007b)
|
| Other requirements |
nothing, probably run with old matlab version |
|
Tags for This File
|
| Everyone's Tags |
|
| Tags I've Applied |
|
| Add New Tags |
Please login to tag files.
|
|
Contact us at files@mathworks.com