realbasic-nug
[Top] [All Lists]

Re: Strange "number" in a double array

To: REALbasic NUG <realbasic-nug at lists dot realsoftware dot com>
Subject: Re: Strange "number" in a double array
From: Jonathan Johnson <jonj at realsoftware dot com>
Date: Sun, 30 Jan 2005 19:40:09 -0600
Delivered-to: realbasic-nug at lists dot realsoftware dot com
References: <404c9d5ac7483ee62b1e1533d45abd2a at kellerfarm dot com> <a06200702be22b8662c57 at [10 dot 10 dot 13 dot 4]> <53173caed30435916c1e12b70372ecb4 at kellerfarm dot com>

On Jan 30, 2005, at 7:33 PM, Andrew Keller wrote:

I have a two dimensional array of doubles, and I'm trying to do some math in it and am having some trouble. Through some debugging, I found that some of the cells have the value NAN(000) . What does this mean?

It means "Not A Number". It's the result of a variety of invalid math operations, such as 0/0.

It appears that 0 / 1 returns NAN(000) . Is this supposed to happen? It should return 0.

What platform? Here on 10.3.7, this code produces "0":

msgBox str(0.0/1.0)

HTH,
Jon


--
Jonathan Johnson
REAL Software, Inc.

--
REAL World 2005 - The REALbasic User Conference
March 23-25, 2005, Austin, Texas
<http://www.realsoftware.com/realworld>

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

<Prev in Thread] Current Thread [Next in Thread>