2.0

2.0 | 1 rating Rate this file 18 Downloads (last 30 days) File Size: 270 KB File ID: #7038

Extended class

by

 

03 Mar 2005 (Updated )

Class providing calculation with the native floating point format of the processor.

| Watch this File

File Information
Description

This class provides floating point calculation in the native floating point format of the processor. The extended class stores data with 64bit mantissa instead of 53bit in double.

The class is intended for calculations depending critically on the mantissa length. Summing a large with a small value generally leads to a truncation error of the small value to fit into the mantissa. The extended precision relaxes this constraint, useful to verify the accuracy of a numerical result.

MATLAB release MATLAB 6.0 (R12)
Other requirements Windows NT/2000/XP Pentium II+
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (3)
10 Dec 2008 Marcel Leutenegger

Dear Zeyn Saigol,

thank you for your feedback. Indeed, I use in a few functions (size, rand, randn, ...) mathematical library functions mlfXxxx() by MATLAB. They were shipped as LIBMATLBMX.DLL up to R13. But since, the compiler was greatly improved (optimization and inlining of code), such that these functions are now compiled into the executable. So the library became obsolete and is no longer available. For size(), you can just use this m-function:

%Size of matrix.
%
function varargout=size(o,d)
if ~isa(o,'extended')
[varargout{1:nargout}]=size(o,double(d));
elseif nargin > 1
d=double(d);
if d < 1
error('Dimension number must be a non-negative integer.');
end
varargout{1}=size(o.extended,d+1);
elseif nargout > 1
[o,varargout{1:nargout}]=size(o.extended);
else
o=size(o.extended);
o=o(2:end);
if numel(o) < 2
o(2)=1;
end
varargout{1}=o;
end

I am planing of updating the elementary calculation packages for newer MATLAB releases. As of R2008a, MATLAB benefits of multi-threaded calculations on multi-core CPUs. As of now, my functions achieve top performance per core but do not even try to use multi-threading... So long, if all calculations are to be performed many times independently, users can just start several MATLAB instances.

19 Nov 2008 Zeyn Saigol

It looks like this isn't completely compatible with Matlab R2007 - some functions work, but size() fails as it can't find LIBMATLBMX.DLL. As this file doesn't exist in my installation, I assume the class is compiled for an older version of Matlab.

Is there any chance of releasing a version for newer Matlabs?

06 Jun 2008 Axel Schweiss

I installed it, i think. But how to use it???

Updates
02 May 2005

Added function: numel
Added file version information.

Contact us