Scilab Home Page | Wiki | Bug Tracker | Forge | Mailing List Archives | Scilab Online Help | File Exchange
ATOMS : Floating Point Module details
Login with GitLab

Floating Point Module

Functions to manage floating point numbers
(1542 downloads for this version - 23264 downloads for all versions)
Details
Version
0.1
A more recent valid version with binaries for Scilab 5.2 exists: 0.2
Author
Michael Baudin
Owner Organization
Consortium Scilab - Digiteo
Maintainers
Michael BAUDIN
Allan CORNET
Categories
License
Creation Date
April 21, 2010
Source created on
Scilab 5.2.x
Binaries available on
Scilab 5.2.x:
Windows 64-bit Windows 32-bit Linux 64-bit Linux 32-bit macOS
Install command
--> atomsInstall("floatingpoint")
Description
            Floating Point toolbox

Purpose

The goal of this toolbox is to provide a collection of 
algorithms for floating point number management.
This is more a learning tool than an operationnal component,
although it might complement some features which are not 
provided by Scilab.

The flps_systemgui function allows to see the distribution
of floating point numbers graphically.
By varying the rounding mode, the precision and the logscale,
we can actually the distribution of a toy floating 
point number. Adding or suppressing the denormals can be 
instructive too.

The functions allow to compute automatically the 
properties of the current Scilab system with 
respect to the doubles. It is similar in spirit 
to the number_properties functions, except that 
our functions are based on macros and that 
the returned values are made consistent 
with the references cited in the bibliography.
Moreover, the flps_radix function returns
the current radix and allows to check that the 
current rounding mode is round-to-nearest (which 
is IEEE's default).

The functions allow to create virtual floating point 
systems, which allows to see their discrete nature 
in simplified examples. The rounding mode of 
such a virtual floating point system can be configured
to one of the four mode from the IEEE standard. 
This feature allows to see the effect of the rounding mode
on the distribution of floating point numbers. This is 
not easy to see with a straightforward Scilab, since the 
rounding mode is round-to-nearest, most of the time.

The following is a list of the current functions :

flps_IEEEdouble : Returns the floating point system for a IEEE double.
flps_IEEEdoubleext : Returns an IEEE double extended floating point system.
flps_IEEEsingle : Returns the floating point system for a IEEE single.
flps_chop : Round matrix elements to t significant binary places.
flps_emax : Returns the maximum exponent and value before overflow.
flps_emin : Returns the minimum exponent and value before underflow.
flps_eps : Returns the machine epsilon and the precision for Scilab doubles.
flps_format2system : Returns the floating point system of the given format.
flps_frexp : Returns the exponent and fraction.
flps_frombary : Returns the floating point number given its b-ary
decomposition.
flps_isIEEE : Returns true if the current system satisfies basic IEEE
requirements.
flps_numbereval : Returns the value of the current floating point number.
flps_numberformat : Returns the floating point number of the given double.
flps_numbernew : Returns a new floating point number.
flps_radix : Compute the radix used for Scilab doubles.
flps_systemall : Returns the list of floating point numbers of the given
floating point system.
flps_systemgui : Plots all the numbers in the current floating point system
flps_systemnew : Returns a new floating point system.
flps_tobary : Returns the digits of the b-ary decomposition.

See DLAMCH for a comparison with Lapack's algorithms:
http://www.netlib.org/misc/dlamch.f

See number_properties in Scilab for a comparison :
modules/elementary_functions/sci_gateway/fortran/sci_f_number_properties.f

Author

Michael Baudin

Licence

This toolbox is released under the CeCILL_V2 licence :

http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt


            
Files (2)
[80.59 kB]
Source code archive

[156.87 kB]
OS-independent binary for Scilab 5.2.x
Binary version
Automatically generated by the ATOMS compilation chain

News (0)
Comments (0)
Leave a comment
You must register and log in before leaving a comment.
Login with GitLab
Email notifications
Send me email when this toolbox has changes, new files or a new release.
You must register and log in before setting up notifications.