Thread Subject: realmin not actually the lowest ??

Subject: realmin not actually the lowest ??

From: Juliette Salexa

Date: 10 Aug, 2009 01:50:05

Message: 1 of 6

>> realmax
ans =
    1.797693134862316e+308

>> realmin
ans =
    2.225073858507201e-308

>> 1/realmax
ans =
    5.562684646268004e-309

If realmin is actually O(10^-308), then how did I just make a number smaller than that ??

The documentation for realmin says that realmin is the smallest positive normalized (whatever the heck this means) floating point number on my computer.

Subject: realmin not actually the lowest ??

From: TideMan

Date: 10 Aug, 2009 02:04:12

Message: 2 of 6

On Aug 10, 1:50 pm, "Juliette Salexa" <juliette.physic...@gmail.com>
wrote:
> >> realmax
>
> ans =
>     1.797693134862316e+308
>
> >> realmin
>
> ans =
>     2.225073858507201e-308
>
> >> 1/realmax
>
> ans =
>     5.562684646268004e-309
>
> If realmin is actually O(10^-308), then how did I just make a number smaller than that ??
>
> The documentation for realmin says that realmin is the smallest positive normalized (whatever the heck this means) floating point number on my computer.

But you didn't finish the quote:
Anything smaller underflows or is an IEEE
    "denormal".

Now, let me ask you something that is equally as important:
How many angels can dance on the head of a pin?

Subject: realmin not actually the lowest ??

From: Juliette Salexa

Date: 10 Aug, 2009 02:22:01

Message: 3 of 6

It depends on the size of the angels! There's no need for sarcasm.. I'm working with extremely small numbers and need very high accuracy.

I looked up what denormal/subnormal numbers are and what normalized means.
Thanks for the clarification.

Subject: realmin not actually the lowest ??

From: Steven Lord

Date: 10 Aug, 2009 02:27:24

Message: 4 of 6


"Juliette Salexa" <juliette.physicist@gmail.com> wrote in message
news:h5nucc$3dc$1@fred.mathworks.com...
>>> realmax
> ans =
> 1.797693134862316e+308
>
>>> realmin
> ans =
> 2.225073858507201e-308
>
>>> 1/realmax
> ans =
> 5.562684646268004e-309
>
> If realmin is actually O(10^-308), then how did I just make a number
> smaller than that ??

Easily. Note that REALMIN is NOT the smallest positive number, and the
documentation doesn't say it is.

http://www.mathworks.com/access/helpdesk/help/techdoc/ref/realmin.html

> The documentation for realmin says that realmin is the smallest positive
> normalized (whatever the heck this means) floating point number on my
> computer.

That's correct. The word "normalized" is extremely important for the
definition of REALMIN. There are smaller positive _non-normalized_ floating
point numbers, commonly referred to as denormal numbers.

http://en.wikipedia.org/wiki/Denormal

Basically, instead of having an assumed (but not stored) leading binary
digit of 1 (i.e. the mantissa is between 1 and 2), the assumed leading digit
of a denormal number is 0 (the mantissa is between 0 and 1.)

Cleve talks about denormal numbers around the end of page 2 of his Cleve's
Corner article about floating-point arithmetic.

http://www.mathworks.com/company/newsletters/news_notes/pdf/Fall96Cleve.pdf

--
Steve Lord
slord@mathworks.com

Subject: realmin not actually the lowest ??

From: Juliette Salexa

Date: 10 Aug, 2009 03:23:01

Message: 5 of 6

Thanks a lot Steven Lord,

TideMan's response motivated me to read up on denormal/subnormal numbers and normalized numbers.

So basically, the lowest number we can get is realnum/(9.999... *10^15) , but there will be truncation errors in its calculation, so only the first digit is really true.

Subject: realmin not actually the lowest ??

From: TideMan

Date: 10 Aug, 2009 06:05:09

Message: 6 of 6

On Aug 10, 2:22 pm, "Juliette Salexa" <juliette.physic...@gmail.com>
wrote:
> It depends on the size of the angels! There's no need for sarcasm.. I'm working with extremely small numbers and need very high accuracy.
>
> I looked up what denormal/subnormal numbers are and what normalized means.
> Thanks for the clarification.

Huh!!
As per earlier posts, your next post will be that Matlab desperately
needs a 300 digit capacity because:
realmax*(1/realmax) - 1
is not identically zero

Tags for this Thread

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

rssFeed for this Thread

Contact us at files@mathworks.com