SlideShare a Scribd company logo
1 of 15
The Character 'n' and the String “n”
The compiler recognizes both 'n' and “n” as
containing the newline character. The difference is
in the data type used. Formally, 'n' is a character
literal, and “n” is a string literal. From a practical
standpoint, both cause the same thing to happen:
A new line is forced in the output display.
Good programming practice requires ending the
last output display with a newline escape
sequence. This practice ensures that the first line
of output from one program doesn’t end up on the
last line displayed by the previously executed
program.
A signed data type allows storing negative
values, the value 0, and positive values
An unsigned data type provides for only non-
negative values (that is, 0 and positive values).
Some applications require only unsigned numerical
values.
For example, many date applications store dates
in the numerical form yearmonthday (storing
12/25/2011 as 20111225, for example)
For these applications, which never require a
negative value, an unsigned data type can be
used.
Floating-Point Types
A floating-point number, more commonly known as
a real number, can be the number 0 or any positive
or negative number containing a decimal point.
The following are examples of floating point
numbers:
+10.62 5.0 -6.2 3251.92 0.00 .33-6.67 +2.
A float value is sometimes referred to as a single-
precision number and a double value as a
double-precision number.
9.234 indicates a double literal.
9.234F indicates a float literal.
9.234L indicates a long double literal.
What is precision?
In numerical theory, the term precision typically
refers to numerical accuracy.
“This computation is accurate, or precise, to the
fifth decimal place” means the fifth digit after the
decimal point has been rounded, and the number
is accurate to within ±0.00005.
687.45678921 has five significant digits therefore; its
accurate to have the value 687.46. The last digit
assumed to be rounded.
In computer programming, “precision” can refer to
a number’s accuracy or the number of significant
digits; significant digits are defined as the number
of clearly correct digits plus 1.
.000734 7.34e-4 7.34x10
-4
.000000000954 Is it big number? Why?
67598934 6.7598934e7 6.7598934x10
7
Exponential Notation
Floating-point numbers can also be written in
exponential notation, which is similar to scientific
notation and is commonly used to express both very
large and very small values in compact form. The
following examples show how numbers with
decimals can be expressed in exponential and
scientific notation:
More on Data Types (Exponential and Scientific Notations)
More on Data Types (Exponential and Scientific Notations)

More Related Content

What's hot

Assignment 1 for 2nd sem
Assignment 1 for 2nd semAssignment 1 for 2nd sem
Assignment 1 for 2nd semhome
 
U6 Cn2 Definite Integrals Intro
U6 Cn2 Definite Integrals IntroU6 Cn2 Definite Integrals Intro
U6 Cn2 Definite Integrals IntroAlexander Burt
 
Data structures Lecture no. 4
Data structures Lecture no. 4Data structures Lecture no. 4
Data structures Lecture no. 4AzharIqbal710687
 
Assignements
AssignementsAssignements
AssignementsIIUM
 
Write a complete C++ program that does the following: 1. The program will c...
Write a complete C++ program that does the following:   1. The program will c...Write a complete C++ program that does the following:   1. The program will c...
Write a complete C++ program that does the following: 1. The program will c...licservernoida
 
Dm week01 linreg.handout
Dm week01 linreg.handoutDm week01 linreg.handout
Dm week01 linreg.handoutokeee
 
Int alg 3.1 notes
Int alg 3.1 notesInt alg 3.1 notes
Int alg 3.1 notesNikki
 
AP Calculus February 17, 2009
AP Calculus February 17, 2009AP Calculus February 17, 2009
AP Calculus February 17, 2009Darren Kuropatwa
 
Assignment # 2 computer system and Programming EC-105
Assignment # 2   computer system and Programming EC-105 Assignment # 2   computer system and Programming EC-105
Assignment # 2 computer system and Programming EC-105 NUST Stuff
 
Dti2143 dam31303 lab sheet 5
Dti2143 dam31303 lab sheet 5Dti2143 dam31303 lab sheet 5
Dti2143 dam31303 lab sheet 5alish sha
 
Pointer arithmetic in c
Pointer arithmetic in c Pointer arithmetic in c
Pointer arithmetic in c sangrampatil81
 

What's hot (20)

C coding#1
C   coding#1C   coding#1
C coding#1
 
Assignment 1 for 2nd sem
Assignment 1 for 2nd semAssignment 1 for 2nd sem
Assignment 1 for 2nd sem
 
U6 Cn2 Definite Integrals Intro
U6 Cn2 Definite Integrals IntroU6 Cn2 Definite Integrals Intro
U6 Cn2 Definite Integrals Intro
 
Data structures Lecture no. 4
Data structures Lecture no. 4Data structures Lecture no. 4
Data structures Lecture no. 4
 
NASHIK CAMBRIDGE SCHOOL
NASHIK CAMBRIDGE SCHOOLNASHIK CAMBRIDGE SCHOOL
NASHIK CAMBRIDGE SCHOOL
 
C programming Tutorial Session 2
C programming Tutorial Session 2C programming Tutorial Session 2
C programming Tutorial Session 2
 
Riemann's Sum
Riemann's SumRiemann's Sum
Riemann's Sum
 
G0423538
G0423538G0423538
G0423538
 
Assignements
AssignementsAssignements
Assignements
 
Write a complete C++ program that does the following: 1. The program will c...
Write a complete C++ program that does the following:   1. The program will c...Write a complete C++ program that does the following:   1. The program will c...
Write a complete C++ program that does the following: 1. The program will c...
 
C programming Tutorial Session 1
C programming Tutorial Session 1C programming Tutorial Session 1
C programming Tutorial Session 1
 
C programming Tutorial Session 3
C programming Tutorial Session 3C programming Tutorial Session 3
C programming Tutorial Session 3
 
C programming Tutorial Session 4
C programming Tutorial Session 4C programming Tutorial Session 4
C programming Tutorial Session 4
 
Dm week01 linreg.handout
Dm week01 linreg.handoutDm week01 linreg.handout
Dm week01 linreg.handout
 
Int alg 3.1 notes
Int alg 3.1 notesInt alg 3.1 notes
Int alg 3.1 notes
 
Evaluate procedures
Evaluate proceduresEvaluate procedures
Evaluate procedures
 
AP Calculus February 17, 2009
AP Calculus February 17, 2009AP Calculus February 17, 2009
AP Calculus February 17, 2009
 
Assignment # 2 computer system and Programming EC-105
Assignment # 2   computer system and Programming EC-105 Assignment # 2   computer system and Programming EC-105
Assignment # 2 computer system and Programming EC-105
 
Dti2143 dam31303 lab sheet 5
Dti2143 dam31303 lab sheet 5Dti2143 dam31303 lab sheet 5
Dti2143 dam31303 lab sheet 5
 
Pointer arithmetic in c
Pointer arithmetic in c Pointer arithmetic in c
Pointer arithmetic in c
 

Similar to More on Data Types (Exponential and Scientific Notations)

[ITP - Lecture 13] Introduction to Pointers
[ITP - Lecture 13] Introduction to Pointers[ITP - Lecture 13] Introduction to Pointers
[ITP - Lecture 13] Introduction to PointersMuhammad Hammad Waseem
 
Cs291 assignment solution
Cs291 assignment solutionCs291 assignment solution
Cs291 assignment solutionKuntal Bhowmick
 
CHAPTER-2.ppt
CHAPTER-2.pptCHAPTER-2.ppt
CHAPTER-2.pptTekle12
 
Computer Oraganizaation.pptx
Computer Oraganizaation.pptxComputer Oraganizaation.pptx
Computer Oraganizaation.pptxbmangesh
 
3Arrays, Declarations, Expressions, Statements, Symbolic constant.pptx
3Arrays, Declarations, Expressions, Statements, Symbolic constant.pptx3Arrays, Declarations, Expressions, Statements, Symbolic constant.pptx
3Arrays, Declarations, Expressions, Statements, Symbolic constant.pptxganeshkarthy
 
Float Data Type in C.pdf
Float Data Type in C.pdfFloat Data Type in C.pdf
Float Data Type in C.pdfSudhanshiBakre1
 
presentation_data_types_and_operators_1513499834_241350.pptx
presentation_data_types_and_operators_1513499834_241350.pptxpresentation_data_types_and_operators_1513499834_241350.pptx
presentation_data_types_and_operators_1513499834_241350.pptxKrishanPalSingh39
 
Devry cis-170-c-i lab-4-of-7-functions
Devry cis-170-c-i lab-4-of-7-functionsDevry cis-170-c-i lab-4-of-7-functions
Devry cis-170-c-i lab-4-of-7-functionsgovendaagoovenda
 
Devry cis-170-c-i lab-4-of-7-functions
Devry cis-170-c-i lab-4-of-7-functionsDevry cis-170-c-i lab-4-of-7-functions
Devry cis-170-c-i lab-4-of-7-functionsnoahjamessss
 
JavaScript number object.pptx
JavaScript number object.pptxJavaScript number object.pptx
JavaScript number object.pptxSteins18
 
Type Conversion in C++ and C# Arithmetic Expressions
Type Conversion in C++ and C# Arithmetic ExpressionsType Conversion in C++ and C# Arithmetic Expressions
Type Conversion in C++ and C# Arithmetic ExpressionsPVS-Studio
 

Similar to More on Data Types (Exponential and Scientific Notations) (20)

[ITP - Lecture 13] Introduction to Pointers
[ITP - Lecture 13] Introduction to Pointers[ITP - Lecture 13] Introduction to Pointers
[ITP - Lecture 13] Introduction to Pointers
 
C++ for beginners
C++ for beginnersC++ for beginners
C++ for beginners
 
Programming egs
Programming egs Programming egs
Programming egs
 
Cs291 assignment solution
Cs291 assignment solutionCs291 assignment solution
Cs291 assignment solution
 
CHAPTER-2.ppt
CHAPTER-2.pptCHAPTER-2.ppt
CHAPTER-2.ppt
 
C++
C++C++
C++
 
Computer Oraganizaation.pptx
Computer Oraganizaation.pptxComputer Oraganizaation.pptx
Computer Oraganizaation.pptx
 
3Arrays, Declarations, Expressions, Statements, Symbolic constant.pptx
3Arrays, Declarations, Expressions, Statements, Symbolic constant.pptx3Arrays, Declarations, Expressions, Statements, Symbolic constant.pptx
3Arrays, Declarations, Expressions, Statements, Symbolic constant.pptx
 
C important questions
C important questionsC important questions
C important questions
 
C# slid
C# slidC# slid
C# slid
 
Introduction to Procedural Programming in C++
Introduction to Procedural Programming in C++Introduction to Procedural Programming in C++
Introduction to Procedural Programming in C++
 
17 Jo P May 08
17 Jo P May 0817 Jo P May 08
17 Jo P May 08
 
Float Data Type in C.pdf
Float Data Type in C.pdfFloat Data Type in C.pdf
Float Data Type in C.pdf
 
presentation_data_types_and_operators_1513499834_241350.pptx
presentation_data_types_and_operators_1513499834_241350.pptxpresentation_data_types_and_operators_1513499834_241350.pptx
presentation_data_types_and_operators_1513499834_241350.pptx
 
Chapter 2
Chapter 2Chapter 2
Chapter 2
 
Chapter 2
Chapter 2Chapter 2
Chapter 2
 
Devry cis-170-c-i lab-4-of-7-functions
Devry cis-170-c-i lab-4-of-7-functionsDevry cis-170-c-i lab-4-of-7-functions
Devry cis-170-c-i lab-4-of-7-functions
 
Devry cis-170-c-i lab-4-of-7-functions
Devry cis-170-c-i lab-4-of-7-functionsDevry cis-170-c-i lab-4-of-7-functions
Devry cis-170-c-i lab-4-of-7-functions
 
JavaScript number object.pptx
JavaScript number object.pptxJavaScript number object.pptx
JavaScript number object.pptx
 
Type Conversion in C++ and C# Arithmetic Expressions
Type Conversion in C++ and C# Arithmetic ExpressionsType Conversion in C++ and C# Arithmetic Expressions
Type Conversion in C++ and C# Arithmetic Expressions
 

More from Nicole Ynne Estabillo (15)

Sound and Waves
Sound and WavesSound and Waves
Sound and Waves
 
Mirrors and Reflections
Mirrors and ReflectionsMirrors and Reflections
Mirrors and Reflections
 
Electromagnetic Spectrum
Electromagnetic Spectrum Electromagnetic Spectrum
Electromagnetic Spectrum
 
Mathematics 10 (Quarter Two)
Mathematics 10 (Quarter Two)Mathematics 10 (Quarter Two)
Mathematics 10 (Quarter Two)
 
Ekonomiks 10 (Unit Two)
Ekonomiks 10 (Unit Two)Ekonomiks 10 (Unit Two)
Ekonomiks 10 (Unit Two)
 
Electromagnetic Waves
Electromagnetic WavesElectromagnetic Waves
Electromagnetic Waves
 
Software Development
Software DevelopmentSoftware Development
Software Development
 
Operator Precedence and Associativity
Operator Precedence and AssociativityOperator Precedence and Associativity
Operator Precedence and Associativity
 
Operands (Modulo)
Operands (Modulo)Operands (Modulo)
Operands (Modulo)
 
Data Types
Data TypesData Types
Data Types
 
Common Programming Errors
Common Programming ErrorsCommon Programming Errors
Common Programming Errors
 
Activities on Software Development
Activities on Software DevelopmentActivities on Software Development
Activities on Software Development
 
Activities on Operator Precedence and Associativity
Activities on Operator Precedence and AssociativityActivities on Operator Precedence and Associativity
Activities on Operator Precedence and Associativity
 
Activities on Exponential and Scientific Expressions
Activities on Exponential and Scientific ExpressionsActivities on Exponential and Scientific Expressions
Activities on Exponential and Scientific Expressions
 
Activities on Operands
Activities on OperandsActivities on Operands
Activities on Operands
 

Recently uploaded

1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDThiyagu K
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfchloefrazer622
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdfQucHHunhnh
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Celine George
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...fonyou31
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsTechSoup
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAssociation for Project Management
 

Recently uploaded (20)

1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SD
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdf
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 

More on Data Types (Exponential and Scientific Notations)

  • 1. The Character 'n' and the String “n” The compiler recognizes both 'n' and “n” as containing the newline character. The difference is in the data type used. Formally, 'n' is a character literal, and “n” is a string literal. From a practical standpoint, both cause the same thing to happen: A new line is forced in the output display.
  • 2. Good programming practice requires ending the last output display with a newline escape sequence. This practice ensures that the first line of output from one program doesn’t end up on the last line displayed by the previously executed program.
  • 3. A signed data type allows storing negative values, the value 0, and positive values An unsigned data type provides for only non- negative values (that is, 0 and positive values). Some applications require only unsigned numerical values.
  • 4. For example, many date applications store dates in the numerical form yearmonthday (storing 12/25/2011 as 20111225, for example) For these applications, which never require a negative value, an unsigned data type can be used.
  • 5.
  • 6. Floating-Point Types A floating-point number, more commonly known as a real number, can be the number 0 or any positive or negative number containing a decimal point. The following are examples of floating point numbers: +10.62 5.0 -6.2 3251.92 0.00 .33-6.67 +2.
  • 7. A float value is sometimes referred to as a single- precision number and a double value as a double-precision number. 9.234 indicates a double literal. 9.234F indicates a float literal. 9.234L indicates a long double literal.
  • 8. What is precision? In numerical theory, the term precision typically refers to numerical accuracy.
  • 9. “This computation is accurate, or precise, to the fifth decimal place” means the fifth digit after the decimal point has been rounded, and the number is accurate to within ±0.00005.
  • 10. 687.45678921 has five significant digits therefore; its accurate to have the value 687.46. The last digit assumed to be rounded.
  • 11. In computer programming, “precision” can refer to a number’s accuracy or the number of significant digits; significant digits are defined as the number of clearly correct digits plus 1.
  • 12. .000734 7.34e-4 7.34x10 -4 .000000000954 Is it big number? Why? 67598934 6.7598934e7 6.7598934x10 7
  • 13. Exponential Notation Floating-point numbers can also be written in exponential notation, which is similar to scientific notation and is commonly used to express both very large and very small values in compact form. The following examples show how numbers with decimals can be expressed in exponential and scientific notation: