[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Floating-point in Python and Octave

From: David Bateman
Subject: Re: Floating-point in Python and Octave
Date: Sun, 14 Jan 2007 01:21:58 +0100
User-agent: Thunderbird (X11/20060921)

Trevor Law wrote:
> Hello,
> My name is Trevor Law and I (in general) need an application for
> analyzing simulation data.
> I find Python easier to work with than Octave (due to experience), but
> am not sure if I should
> be concerned about differences in how floating-point arithmetic is
> handled.  The Python
> documentation is not very specific but seems to indicate the
> implementation is that of the
> underlying machine/compiler.  I suppose I would like to know if Octave
> does something
> different, and if it is significant.  As a rough gauge of what
> "significant" means, my supervisor
> told me that since we will be adding noise to the simulation data anyway
> (we are
> simulating extracellular neuron potentials to test a classifier), I
> really do not need to
> worry much about machine floating point issues.
> Thank you for your time,
> Trevor Law
> address@hidden <mailto:address@hidden>

Most modern machines use a IEEE754 format, and Octave and I believe
Python use double precision floating point values. In IEEE754 these
double precision values have 1 sign bit 52 bits of mantissa and the rest
exponent. If the largest value you want to represent is normalized to 1,
then if your rms noise level is reasonably above 1/(2^52) then your
supervisor is probably right.. As in terms of power you have about 300dB
of dynamic range in double precision (ignoring the exponent) I doubt
there is any real world data that can't accurately be represented by
double precision values.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]