In Java, what does NaN mean?












91















I have a program that tries to shrink a double down to a desired number. The output I get is NaN.



What does NaN mean in Java?










share|improve this question

























  • There is a good description of NaN and of the common pitfalls when using NaN in Java: ppkwok.blogspot.co.uk/2012/11/…

    – Phil
    Nov 25 '12 at 1:56











  • If you are asking "what good is NaN?" in Java (or any other language), I can give you a use case where it is very handy: when I have a 2-D array of floats, but my calculation has no meaningful value for some portion of that 2-D array, I'll fill that value with "NaN". This can be used to signal downstream users of my calculation (such as when it is turned into a raster image) "don't pay attention to the value at this point". Very useful!

    – Dan H
    Jun 6 '18 at 13:36











  • BTW, what -- exactly -- does it mean to "shrink" a double? Curious...

    – Dan H
    Jun 6 '18 at 13:38
















91















I have a program that tries to shrink a double down to a desired number. The output I get is NaN.



What does NaN mean in Java?










share|improve this question

























  • There is a good description of NaN and of the common pitfalls when using NaN in Java: ppkwok.blogspot.co.uk/2012/11/…

    – Phil
    Nov 25 '12 at 1:56











  • If you are asking "what good is NaN?" in Java (or any other language), I can give you a use case where it is very handy: when I have a 2-D array of floats, but my calculation has no meaningful value for some portion of that 2-D array, I'll fill that value with "NaN". This can be used to signal downstream users of my calculation (such as when it is turned into a raster image) "don't pay attention to the value at this point". Very useful!

    – Dan H
    Jun 6 '18 at 13:36











  • BTW, what -- exactly -- does it mean to "shrink" a double? Curious...

    – Dan H
    Jun 6 '18 at 13:38














91












91








91


22






I have a program that tries to shrink a double down to a desired number. The output I get is NaN.



What does NaN mean in Java?










share|improve this question
















I have a program that tries to shrink a double down to a desired number. The output I get is NaN.



What does NaN mean in Java?







java nan






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Oct 28 '15 at 5:55









TryinHard

2,88122144




2,88122144










asked Apr 11 '10 at 17:57









DavidDavid

5,906286391




5,906286391













  • There is a good description of NaN and of the common pitfalls when using NaN in Java: ppkwok.blogspot.co.uk/2012/11/…

    – Phil
    Nov 25 '12 at 1:56











  • If you are asking "what good is NaN?" in Java (or any other language), I can give you a use case where it is very handy: when I have a 2-D array of floats, but my calculation has no meaningful value for some portion of that 2-D array, I'll fill that value with "NaN". This can be used to signal downstream users of my calculation (such as when it is turned into a raster image) "don't pay attention to the value at this point". Very useful!

    – Dan H
    Jun 6 '18 at 13:36











  • BTW, what -- exactly -- does it mean to "shrink" a double? Curious...

    – Dan H
    Jun 6 '18 at 13:38



















  • There is a good description of NaN and of the common pitfalls when using NaN in Java: ppkwok.blogspot.co.uk/2012/11/…

    – Phil
    Nov 25 '12 at 1:56











  • If you are asking "what good is NaN?" in Java (or any other language), I can give you a use case where it is very handy: when I have a 2-D array of floats, but my calculation has no meaningful value for some portion of that 2-D array, I'll fill that value with "NaN". This can be used to signal downstream users of my calculation (such as when it is turned into a raster image) "don't pay attention to the value at this point". Very useful!

    – Dan H
    Jun 6 '18 at 13:36











  • BTW, what -- exactly -- does it mean to "shrink" a double? Curious...

    – Dan H
    Jun 6 '18 at 13:38

















There is a good description of NaN and of the common pitfalls when using NaN in Java: ppkwok.blogspot.co.uk/2012/11/…

– Phil
Nov 25 '12 at 1:56





There is a good description of NaN and of the common pitfalls when using NaN in Java: ppkwok.blogspot.co.uk/2012/11/…

– Phil
Nov 25 '12 at 1:56













If you are asking "what good is NaN?" in Java (or any other language), I can give you a use case where it is very handy: when I have a 2-D array of floats, but my calculation has no meaningful value for some portion of that 2-D array, I'll fill that value with "NaN". This can be used to signal downstream users of my calculation (such as when it is turned into a raster image) "don't pay attention to the value at this point". Very useful!

– Dan H
Jun 6 '18 at 13:36





If you are asking "what good is NaN?" in Java (or any other language), I can give you a use case where it is very handy: when I have a 2-D array of floats, but my calculation has no meaningful value for some portion of that 2-D array, I'll fill that value with "NaN". This can be used to signal downstream users of my calculation (such as when it is turned into a raster image) "don't pay attention to the value at this point". Very useful!

– Dan H
Jun 6 '18 at 13:36













BTW, what -- exactly -- does it mean to "shrink" a double? Curious...

– Dan H
Jun 6 '18 at 13:38





BTW, what -- exactly -- does it mean to "shrink" a double? Curious...

– Dan H
Jun 6 '18 at 13:38












10 Answers
10






active

oldest

votes


















136














Taken from this page:




"NaN" stands for "not a number". "Nan"
is produced if a floating point
operation has some input parameters
that cause the operation to produce
some undefined result. For example,
0.0 divided by 0.0 is arithmetically undefined. Taking the square root of a
negative number is also undefined.







share|improve this answer





















  • 16





    Additionally, NaN is defined by The IEEE Standard for Floating-Point Arithmetic (IEEE 754) quite explicitly which Java follows blindly. Reading the standard opens your eyes to a lot of things, the multiple values of zero being one of the things.

    – Esko
    Apr 11 '10 at 18:57






  • 35





    Also, NaN has the interesting property of being the only "number" which is not the same as itself when compared. Therefore a common (and in many languages the only) test if a number x is NaN is the following: boolean isNaN(x){return x != x;}

    – quazgar
    Mar 18 '13 at 18:19








  • 3





    Link in answer is dead?

    – Pang
    Jul 1 '13 at 4:26






  • 2





    ..."Taking square root of negative number is undefined (in arithmetics)"... Its not! its actually i and some languages like python deal very well with it... It may be not the case in java thou

    – Rafael T
    Feb 10 '14 at 18:40






  • 4





    @RafaelT I'd say it is undefined in non-complex arithmetic. There is no way to assign a complex number to a float or double in Java. Python is dynamically typed, therefore it may be possibly to just return a complex number in this case.

    – sstn
    Mar 27 '14 at 13:11



















15














NaN means “Not a Number” and is basically a representation of a special floating point value in the IEE 754 floating point standard. NaN generally means that the value is something that cannot be expressed with a valid floating point number.



A conversion will result in this value, when the value being converted is something else, for example when converting a string that does not represent a number.






share|improve this answer

































    11














    NaN means "Not a Number" and is the result of undefined operations on floating point numbers like for example dividing zero by zero. (Note that while dividing a non-zero number by zero is also usually undefined in mathematics, it does not result in NaN but in positive or negative infinity).






    share|improve this answer































      5














      NaN means "Not a number." It's a special floating point value that means that the result of an operation was not defined or not representable as a real number.



      See here for more explanation of this value.






      share|improve this answer































        5














        NaN stands for Not a Number. It is used to signify any value that is mathematically undefined. Like dividing 0.0 by 0.0.
        You can look here for more information: https://web.archive.org/web/20120819091816/http://www.concentric.net/~ttwang/tech/javafloat.htm



        Post your program here if you need more help.






        share|improve this answer

































          4














          NaN = Not a Number.






          share|improve this answer































            4














            Means Not a Number.
            It is a common representation for an impossible numeric value in many programming languages.






            share|improve this answer































              3














              Not a Java guy, but in JS and other languages I use it's "Not a Number", meaning some operation caused it to become not a valid number.






              share|improve this answer































                3














                It literally means "Not a Number." I suspect something is wrong with your conversion process.



                Check out the Not A Number section at this reference






                share|improve this answer































                  3














                  Not a valid floating-point value (e.g. the result of division by zero)



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






                  share|improve this answer
























                  • I quibble with this answer. First: "NaN" IS a valid value for an IEEE float! (After all, it is defined in the spec... so its "valid", right?). Second: "division by zero" can be represented by IEEE "Positive Infinity" or "Negative Infinity"; a better example of "NaN" is "zero divided by zero", as some other answers have correctly pointed out.

                    – Dan H
                    Jun 6 '18 at 13:33













                  • "Valid value" and "defined in spec" is not the same thing. Agreed to 0/0.

                    – Vladimir Dyuzhev
                    Jun 7 '18 at 12:51












                  protected by Patrick Hofman Dec 27 '16 at 9:06



                  Thank you for your interest in this question.
                  Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).



                  Would you like to answer one of these unanswered questions instead?














                  10 Answers
                  10






                  active

                  oldest

                  votes








                  10 Answers
                  10






                  active

                  oldest

                  votes









                  active

                  oldest

                  votes






                  active

                  oldest

                  votes









                  136














                  Taken from this page:




                  "NaN" stands for "not a number". "Nan"
                  is produced if a floating point
                  operation has some input parameters
                  that cause the operation to produce
                  some undefined result. For example,
                  0.0 divided by 0.0 is arithmetically undefined. Taking the square root of a
                  negative number is also undefined.







                  share|improve this answer





















                  • 16





                    Additionally, NaN is defined by The IEEE Standard for Floating-Point Arithmetic (IEEE 754) quite explicitly which Java follows blindly. Reading the standard opens your eyes to a lot of things, the multiple values of zero being one of the things.

                    – Esko
                    Apr 11 '10 at 18:57






                  • 35





                    Also, NaN has the interesting property of being the only "number" which is not the same as itself when compared. Therefore a common (and in many languages the only) test if a number x is NaN is the following: boolean isNaN(x){return x != x;}

                    – quazgar
                    Mar 18 '13 at 18:19








                  • 3





                    Link in answer is dead?

                    – Pang
                    Jul 1 '13 at 4:26






                  • 2





                    ..."Taking square root of negative number is undefined (in arithmetics)"... Its not! its actually i and some languages like python deal very well with it... It may be not the case in java thou

                    – Rafael T
                    Feb 10 '14 at 18:40






                  • 4





                    @RafaelT I'd say it is undefined in non-complex arithmetic. There is no way to assign a complex number to a float or double in Java. Python is dynamically typed, therefore it may be possibly to just return a complex number in this case.

                    – sstn
                    Mar 27 '14 at 13:11
















                  136














                  Taken from this page:




                  "NaN" stands for "not a number". "Nan"
                  is produced if a floating point
                  operation has some input parameters
                  that cause the operation to produce
                  some undefined result. For example,
                  0.0 divided by 0.0 is arithmetically undefined. Taking the square root of a
                  negative number is also undefined.







                  share|improve this answer





















                  • 16





                    Additionally, NaN is defined by The IEEE Standard for Floating-Point Arithmetic (IEEE 754) quite explicitly which Java follows blindly. Reading the standard opens your eyes to a lot of things, the multiple values of zero being one of the things.

                    – Esko
                    Apr 11 '10 at 18:57






                  • 35





                    Also, NaN has the interesting property of being the only "number" which is not the same as itself when compared. Therefore a common (and in many languages the only) test if a number x is NaN is the following: boolean isNaN(x){return x != x;}

                    – quazgar
                    Mar 18 '13 at 18:19








                  • 3





                    Link in answer is dead?

                    – Pang
                    Jul 1 '13 at 4:26






                  • 2





                    ..."Taking square root of negative number is undefined (in arithmetics)"... Its not! its actually i and some languages like python deal very well with it... It may be not the case in java thou

                    – Rafael T
                    Feb 10 '14 at 18:40






                  • 4





                    @RafaelT I'd say it is undefined in non-complex arithmetic. There is no way to assign a complex number to a float or double in Java. Python is dynamically typed, therefore it may be possibly to just return a complex number in this case.

                    – sstn
                    Mar 27 '14 at 13:11














                  136












                  136








                  136







                  Taken from this page:




                  "NaN" stands for "not a number". "Nan"
                  is produced if a floating point
                  operation has some input parameters
                  that cause the operation to produce
                  some undefined result. For example,
                  0.0 divided by 0.0 is arithmetically undefined. Taking the square root of a
                  negative number is also undefined.







                  share|improve this answer















                  Taken from this page:




                  "NaN" stands for "not a number". "Nan"
                  is produced if a floating point
                  operation has some input parameters
                  that cause the operation to produce
                  some undefined result. For example,
                  0.0 divided by 0.0 is arithmetically undefined. Taking the square root of a
                  negative number is also undefined.








                  share|improve this answer














                  share|improve this answer



                  share|improve this answer








                  edited Dec 1 '15 at 16:53









                  RAnders00

                  3,06942551




                  3,06942551










                  answered Apr 11 '10 at 18:00









                  KennyDeriemaekerKennyDeriemaeker

                  1,72111315




                  1,72111315








                  • 16





                    Additionally, NaN is defined by The IEEE Standard for Floating-Point Arithmetic (IEEE 754) quite explicitly which Java follows blindly. Reading the standard opens your eyes to a lot of things, the multiple values of zero being one of the things.

                    – Esko
                    Apr 11 '10 at 18:57






                  • 35





                    Also, NaN has the interesting property of being the only "number" which is not the same as itself when compared. Therefore a common (and in many languages the only) test if a number x is NaN is the following: boolean isNaN(x){return x != x;}

                    – quazgar
                    Mar 18 '13 at 18:19








                  • 3





                    Link in answer is dead?

                    – Pang
                    Jul 1 '13 at 4:26






                  • 2





                    ..."Taking square root of negative number is undefined (in arithmetics)"... Its not! its actually i and some languages like python deal very well with it... It may be not the case in java thou

                    – Rafael T
                    Feb 10 '14 at 18:40






                  • 4





                    @RafaelT I'd say it is undefined in non-complex arithmetic. There is no way to assign a complex number to a float or double in Java. Python is dynamically typed, therefore it may be possibly to just return a complex number in this case.

                    – sstn
                    Mar 27 '14 at 13:11














                  • 16





                    Additionally, NaN is defined by The IEEE Standard for Floating-Point Arithmetic (IEEE 754) quite explicitly which Java follows blindly. Reading the standard opens your eyes to a lot of things, the multiple values of zero being one of the things.

                    – Esko
                    Apr 11 '10 at 18:57






                  • 35





                    Also, NaN has the interesting property of being the only "number" which is not the same as itself when compared. Therefore a common (and in many languages the only) test if a number x is NaN is the following: boolean isNaN(x){return x != x;}

                    – quazgar
                    Mar 18 '13 at 18:19








                  • 3





                    Link in answer is dead?

                    – Pang
                    Jul 1 '13 at 4:26






                  • 2





                    ..."Taking square root of negative number is undefined (in arithmetics)"... Its not! its actually i and some languages like python deal very well with it... It may be not the case in java thou

                    – Rafael T
                    Feb 10 '14 at 18:40






                  • 4





                    @RafaelT I'd say it is undefined in non-complex arithmetic. There is no way to assign a complex number to a float or double in Java. Python is dynamically typed, therefore it may be possibly to just return a complex number in this case.

                    – sstn
                    Mar 27 '14 at 13:11








                  16




                  16





                  Additionally, NaN is defined by The IEEE Standard for Floating-Point Arithmetic (IEEE 754) quite explicitly which Java follows blindly. Reading the standard opens your eyes to a lot of things, the multiple values of zero being one of the things.

                  – Esko
                  Apr 11 '10 at 18:57





                  Additionally, NaN is defined by The IEEE Standard for Floating-Point Arithmetic (IEEE 754) quite explicitly which Java follows blindly. Reading the standard opens your eyes to a lot of things, the multiple values of zero being one of the things.

                  – Esko
                  Apr 11 '10 at 18:57




                  35




                  35





                  Also, NaN has the interesting property of being the only "number" which is not the same as itself when compared. Therefore a common (and in many languages the only) test if a number x is NaN is the following: boolean isNaN(x){return x != x;}

                  – quazgar
                  Mar 18 '13 at 18:19







                  Also, NaN has the interesting property of being the only "number" which is not the same as itself when compared. Therefore a common (and in many languages the only) test if a number x is NaN is the following: boolean isNaN(x){return x != x;}

                  – quazgar
                  Mar 18 '13 at 18:19






                  3




                  3





                  Link in answer is dead?

                  – Pang
                  Jul 1 '13 at 4:26





                  Link in answer is dead?

                  – Pang
                  Jul 1 '13 at 4:26




                  2




                  2





                  ..."Taking square root of negative number is undefined (in arithmetics)"... Its not! its actually i and some languages like python deal very well with it... It may be not the case in java thou

                  – Rafael T
                  Feb 10 '14 at 18:40





                  ..."Taking square root of negative number is undefined (in arithmetics)"... Its not! its actually i and some languages like python deal very well with it... It may be not the case in java thou

                  – Rafael T
                  Feb 10 '14 at 18:40




                  4




                  4





                  @RafaelT I'd say it is undefined in non-complex arithmetic. There is no way to assign a complex number to a float or double in Java. Python is dynamically typed, therefore it may be possibly to just return a complex number in this case.

                  – sstn
                  Mar 27 '14 at 13:11





                  @RafaelT I'd say it is undefined in non-complex arithmetic. There is no way to assign a complex number to a float or double in Java. Python is dynamically typed, therefore it may be possibly to just return a complex number in this case.

                  – sstn
                  Mar 27 '14 at 13:11













                  15














                  NaN means “Not a Number” and is basically a representation of a special floating point value in the IEE 754 floating point standard. NaN generally means that the value is something that cannot be expressed with a valid floating point number.



                  A conversion will result in this value, when the value being converted is something else, for example when converting a string that does not represent a number.






                  share|improve this answer






























                    15














                    NaN means “Not a Number” and is basically a representation of a special floating point value in the IEE 754 floating point standard. NaN generally means that the value is something that cannot be expressed with a valid floating point number.



                    A conversion will result in this value, when the value being converted is something else, for example when converting a string that does not represent a number.






                    share|improve this answer




























                      15












                      15








                      15







                      NaN means “Not a Number” and is basically a representation of a special floating point value in the IEE 754 floating point standard. NaN generally means that the value is something that cannot be expressed with a valid floating point number.



                      A conversion will result in this value, when the value being converted is something else, for example when converting a string that does not represent a number.






                      share|improve this answer















                      NaN means “Not a Number” and is basically a representation of a special floating point value in the IEE 754 floating point standard. NaN generally means that the value is something that cannot be expressed with a valid floating point number.



                      A conversion will result in this value, when the value being converted is something else, for example when converting a string that does not represent a number.







                      share|improve this answer














                      share|improve this answer



                      share|improve this answer








                      edited Dec 27 '16 at 10:22

























                      answered Apr 11 '10 at 18:01









                      pokepoke

                      217k46337400




                      217k46337400























                          11














                          NaN means "Not a Number" and is the result of undefined operations on floating point numbers like for example dividing zero by zero. (Note that while dividing a non-zero number by zero is also usually undefined in mathematics, it does not result in NaN but in positive or negative infinity).






                          share|improve this answer




























                            11














                            NaN means "Not a Number" and is the result of undefined operations on floating point numbers like for example dividing zero by zero. (Note that while dividing a non-zero number by zero is also usually undefined in mathematics, it does not result in NaN but in positive or negative infinity).






                            share|improve this answer


























                              11












                              11








                              11







                              NaN means "Not a Number" and is the result of undefined operations on floating point numbers like for example dividing zero by zero. (Note that while dividing a non-zero number by zero is also usually undefined in mathematics, it does not result in NaN but in positive or negative infinity).






                              share|improve this answer













                              NaN means "Not a Number" and is the result of undefined operations on floating point numbers like for example dividing zero by zero. (Note that while dividing a non-zero number by zero is also usually undefined in mathematics, it does not result in NaN but in positive or negative infinity).







                              share|improve this answer












                              share|improve this answer



                              share|improve this answer










                              answered Apr 11 '10 at 17:59









                              sepp2ksepp2k

                              299k39601617




                              299k39601617























                                  5














                                  NaN means "Not a number." It's a special floating point value that means that the result of an operation was not defined or not representable as a real number.



                                  See here for more explanation of this value.






                                  share|improve this answer




























                                    5














                                    NaN means "Not a number." It's a special floating point value that means that the result of an operation was not defined or not representable as a real number.



                                    See here for more explanation of this value.






                                    share|improve this answer


























                                      5












                                      5








                                      5







                                      NaN means "Not a number." It's a special floating point value that means that the result of an operation was not defined or not representable as a real number.



                                      See here for more explanation of this value.






                                      share|improve this answer













                                      NaN means "Not a number." It's a special floating point value that means that the result of an operation was not defined or not representable as a real number.



                                      See here for more explanation of this value.







                                      share|improve this answer












                                      share|improve this answer



                                      share|improve this answer










                                      answered Apr 11 '10 at 17:59









                                      Mike DanielsMike Daniels

                                      7,86912444




                                      7,86912444























                                          5














                                          NaN stands for Not a Number. It is used to signify any value that is mathematically undefined. Like dividing 0.0 by 0.0.
                                          You can look here for more information: https://web.archive.org/web/20120819091816/http://www.concentric.net/~ttwang/tech/javafloat.htm



                                          Post your program here if you need more help.






                                          share|improve this answer






























                                            5














                                            NaN stands for Not a Number. It is used to signify any value that is mathematically undefined. Like dividing 0.0 by 0.0.
                                            You can look here for more information: https://web.archive.org/web/20120819091816/http://www.concentric.net/~ttwang/tech/javafloat.htm



                                            Post your program here if you need more help.






                                            share|improve this answer




























                                              5












                                              5








                                              5







                                              NaN stands for Not a Number. It is used to signify any value that is mathematically undefined. Like dividing 0.0 by 0.0.
                                              You can look here for more information: https://web.archive.org/web/20120819091816/http://www.concentric.net/~ttwang/tech/javafloat.htm



                                              Post your program here if you need more help.






                                              share|improve this answer















                                              NaN stands for Not a Number. It is used to signify any value that is mathematically undefined. Like dividing 0.0 by 0.0.
                                              You can look here for more information: https://web.archive.org/web/20120819091816/http://www.concentric.net/~ttwang/tech/javafloat.htm



                                              Post your program here if you need more help.







                                              share|improve this answer














                                              share|improve this answer



                                              share|improve this answer








                                              edited Oct 15 '15 at 20:25









                                              BennyMcBenBen

                                              86221637




                                              86221637










                                              answered Apr 11 '10 at 18:01









                                              PrachiPrachi

                                              18817




                                              18817























                                                  4














                                                  NaN = Not a Number.






                                                  share|improve this answer




























                                                    4














                                                    NaN = Not a Number.






                                                    share|improve this answer


























                                                      4












                                                      4








                                                      4







                                                      NaN = Not a Number.






                                                      share|improve this answer













                                                      NaN = Not a Number.







                                                      share|improve this answer












                                                      share|improve this answer



                                                      share|improve this answer










                                                      answered Apr 11 '10 at 17:59









                                                      Fitzchak YitzchakiFitzchak Yitzchaki

                                                      6,76374589




                                                      6,76374589























                                                          4














                                                          Means Not a Number.
                                                          It is a common representation for an impossible numeric value in many programming languages.






                                                          share|improve this answer




























                                                            4














                                                            Means Not a Number.
                                                            It is a common representation for an impossible numeric value in many programming languages.






                                                            share|improve this answer


























                                                              4












                                                              4








                                                              4







                                                              Means Not a Number.
                                                              It is a common representation for an impossible numeric value in many programming languages.






                                                              share|improve this answer













                                                              Means Not a Number.
                                                              It is a common representation for an impossible numeric value in many programming languages.







                                                              share|improve this answer












                                                              share|improve this answer



                                                              share|improve this answer










                                                              answered Apr 11 '10 at 18:04









                                                              lbedognilbedogni

                                                              5,88172246




                                                              5,88172246























                                                                  3














                                                                  Not a Java guy, but in JS and other languages I use it's "Not a Number", meaning some operation caused it to become not a valid number.






                                                                  share|improve this answer




























                                                                    3














                                                                    Not a Java guy, but in JS and other languages I use it's "Not a Number", meaning some operation caused it to become not a valid number.






                                                                    share|improve this answer


























                                                                      3












                                                                      3








                                                                      3







                                                                      Not a Java guy, but in JS and other languages I use it's "Not a Number", meaning some operation caused it to become not a valid number.






                                                                      share|improve this answer













                                                                      Not a Java guy, but in JS and other languages I use it's "Not a Number", meaning some operation caused it to become not a valid number.







                                                                      share|improve this answer












                                                                      share|improve this answer



                                                                      share|improve this answer










                                                                      answered Apr 11 '10 at 17:59









                                                                      Brian MainsBrian Mains

                                                                      44.1k32128233




                                                                      44.1k32128233























                                                                          3














                                                                          It literally means "Not a Number." I suspect something is wrong with your conversion process.



                                                                          Check out the Not A Number section at this reference






                                                                          share|improve this answer




























                                                                            3














                                                                            It literally means "Not a Number." I suspect something is wrong with your conversion process.



                                                                            Check out the Not A Number section at this reference






                                                                            share|improve this answer


























                                                                              3












                                                                              3








                                                                              3







                                                                              It literally means "Not a Number." I suspect something is wrong with your conversion process.



                                                                              Check out the Not A Number section at this reference






                                                                              share|improve this answer













                                                                              It literally means "Not a Number." I suspect something is wrong with your conversion process.



                                                                              Check out the Not A Number section at this reference







                                                                              share|improve this answer












                                                                              share|improve this answer



                                                                              share|improve this answer










                                                                              answered Apr 11 '10 at 17:59









                                                                              Chris ThompsonChris Thompson

                                                                              29.2k96999




                                                                              29.2k96999























                                                                                  3














                                                                                  Not a valid floating-point value (e.g. the result of division by zero)



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






                                                                                  share|improve this answer
























                                                                                  • I quibble with this answer. First: "NaN" IS a valid value for an IEEE float! (After all, it is defined in the spec... so its "valid", right?). Second: "division by zero" can be represented by IEEE "Positive Infinity" or "Negative Infinity"; a better example of "NaN" is "zero divided by zero", as some other answers have correctly pointed out.

                                                                                    – Dan H
                                                                                    Jun 6 '18 at 13:33













                                                                                  • "Valid value" and "defined in spec" is not the same thing. Agreed to 0/0.

                                                                                    – Vladimir Dyuzhev
                                                                                    Jun 7 '18 at 12:51


















                                                                                  3














                                                                                  Not a valid floating-point value (e.g. the result of division by zero)



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






                                                                                  share|improve this answer
























                                                                                  • I quibble with this answer. First: "NaN" IS a valid value for an IEEE float! (After all, it is defined in the spec... so its "valid", right?). Second: "division by zero" can be represented by IEEE "Positive Infinity" or "Negative Infinity"; a better example of "NaN" is "zero divided by zero", as some other answers have correctly pointed out.

                                                                                    – Dan H
                                                                                    Jun 6 '18 at 13:33













                                                                                  • "Valid value" and "defined in spec" is not the same thing. Agreed to 0/0.

                                                                                    – Vladimir Dyuzhev
                                                                                    Jun 7 '18 at 12:51
















                                                                                  3












                                                                                  3








                                                                                  3







                                                                                  Not a valid floating-point value (e.g. the result of division by zero)



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






                                                                                  share|improve this answer













                                                                                  Not a valid floating-point value (e.g. the result of division by zero)



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







                                                                                  share|improve this answer












                                                                                  share|improve this answer



                                                                                  share|improve this answer










                                                                                  answered Apr 11 '10 at 17:59









                                                                                  Vladimir DyuzhevVladimir Dyuzhev

                                                                                  15.9k94357




                                                                                  15.9k94357













                                                                                  • I quibble with this answer. First: "NaN" IS a valid value for an IEEE float! (After all, it is defined in the spec... so its "valid", right?). Second: "division by zero" can be represented by IEEE "Positive Infinity" or "Negative Infinity"; a better example of "NaN" is "zero divided by zero", as some other answers have correctly pointed out.

                                                                                    – Dan H
                                                                                    Jun 6 '18 at 13:33













                                                                                  • "Valid value" and "defined in spec" is not the same thing. Agreed to 0/0.

                                                                                    – Vladimir Dyuzhev
                                                                                    Jun 7 '18 at 12:51





















                                                                                  • I quibble with this answer. First: "NaN" IS a valid value for an IEEE float! (After all, it is defined in the spec... so its "valid", right?). Second: "division by zero" can be represented by IEEE "Positive Infinity" or "Negative Infinity"; a better example of "NaN" is "zero divided by zero", as some other answers have correctly pointed out.

                                                                                    – Dan H
                                                                                    Jun 6 '18 at 13:33













                                                                                  • "Valid value" and "defined in spec" is not the same thing. Agreed to 0/0.

                                                                                    – Vladimir Dyuzhev
                                                                                    Jun 7 '18 at 12:51



















                                                                                  I quibble with this answer. First: "NaN" IS a valid value for an IEEE float! (After all, it is defined in the spec... so its "valid", right?). Second: "division by zero" can be represented by IEEE "Positive Infinity" or "Negative Infinity"; a better example of "NaN" is "zero divided by zero", as some other answers have correctly pointed out.

                                                                                  – Dan H
                                                                                  Jun 6 '18 at 13:33







                                                                                  I quibble with this answer. First: "NaN" IS a valid value for an IEEE float! (After all, it is defined in the spec... so its "valid", right?). Second: "division by zero" can be represented by IEEE "Positive Infinity" or "Negative Infinity"; a better example of "NaN" is "zero divided by zero", as some other answers have correctly pointed out.

                                                                                  – Dan H
                                                                                  Jun 6 '18 at 13:33















                                                                                  "Valid value" and "defined in spec" is not the same thing. Agreed to 0/0.

                                                                                  – Vladimir Dyuzhev
                                                                                  Jun 7 '18 at 12:51







                                                                                  "Valid value" and "defined in spec" is not the same thing. Agreed to 0/0.

                                                                                  – Vladimir Dyuzhev
                                                                                  Jun 7 '18 at 12:51







                                                                                  protected by Patrick Hofman Dec 27 '16 at 9:06



                                                                                  Thank you for your interest in this question.
                                                                                  Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).



                                                                                  Would you like to answer one of these unanswered questions instead?



                                                                                  Popular posts from this blog

                                                                                  MongoDB - Not Authorized To Execute Command

                                                                                  How to fix TextFormField cause rebuild widget in Flutter

                                                                                  in spring boot 2.1 many test slices are not allowed anymore due to multiple @BootstrapWith