CodingForums.com

CodingForums.com (http://www.codingforums.com/index.php)
-   Computer Programming (http://www.codingforums.com/forumdisplay.php?f=21)
-   -   Explanation of floating-point numbers (http://www.codingforums.com/showthread.php?t=268790)

dannyboi 07-26-2012 01:19 AM

Explanation of floating-point numbers
 
Could anybody explain floating point types numbers concisely, because the books definition I am reading is somewhat confusing, and explain how it is applicable in real life.

alykins 07-26-2012 11:47 AM

an int is a single number (without decimal point- it is an integer ie -2, -1, 0, 1, 2, ...)
float, double, decimal are all forms of a decimal number - not to be confused with decimal data type- (eg: 1.34, 5.68, 8.22, etc) but with varying degrees of precision.
a float has up to 7 points of precision, a double has 15-16 points of precision, and a decimal has 28-29 points of precision. These are data types of .Net, most languages are relatively close by comparison in 'what' the data types are called and their precision and size.

gelee 08-19-2012 04:11 PM

Floating pont is a character which
contains numbers or integers that
is decimal. That is according to our
Computer Science professor. Good day!


_________________________________
Discover more about fencing


All times are GMT +1. The time now is 12:40 PM.

Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.