0% found this document useful (0 votes)
160 views11 pages

Definition of Double in

The double data type represents numeric variables with decimal values and can store up to 15 digits. It is commonly used for numbers requiring decimal points and has largely replaced the float type due to increased processor speeds. The double type stores values with higher precision than float but takes more space, while int stores only whole numbers but is faster for calculations not involving decimals.

Uploaded by

Lea Lovato
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
160 views11 pages

Definition of Double in

The double data type represents numeric variables with decimal values and can store up to 15 digits. It is commonly used for numbers requiring decimal points and has largely replaced the float type due to increased processor speeds. The double type stores values with higher precision than float but takes more space, while int stores only whole numbers but is faster for calculations not involving decimals.

Uploaded by

Lea Lovato
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 11

Definition of Double in

C, C++ and C#
 The double is a fundamental data type built into
the compiler and used to define
numeric variables holding numbers with decimal
points.
 C, C++, C# and many other programming
languages recognize the double as a type.
 A double type can represent fractional as well as
whole values.
 It can contain up to 15 digits in total, including
those before and after the decimal point.
Uses for Double

 The float type, which has a smaller range, was


used at one time because it was faster than the
double when dealing with thousands or millions
of floating-point numbers.
 Because calculation speed has increased
dramatically with new processors, however, the
advantages of floats over doubles are negligible.
 Many programmers consider the double type to
be the default when working with numbers that
require decimal points.
Double vs. Float and Int

 Other data types include float and int. The


double and float types are similar, but they differ
in precision and range:
 A float is a single precision, 32-bit floating-point
data type that accommodates seven digits. Its
range is approximately 1.5 × 10−45 to 3.4 × 1038.
 A double is a double-precision, 64-bit floating-
point data type. It accommodates 15 to 16 digits,
with a range of approximately 5.0 × 10−345 to
1.7 × 10308.
 The int also deals with data, but it serves a
different purpose.
 Numbers without fractional parts or any need
for a decimal point can be used as int.
 Thus, the int type holds only whole numbers,
but it takes up less space, the arithmetic is
usually faster, and it uses caches and data
transfer bandwidth more efficiently than the
other types.
Computer Programming -
Characters
 If it was easy to work with numbers in computer
programming, it would be even easier to work with
characters.
 Characters are simple alphabets like a, b, c, d...., A,
B, C, D,....., but with an exception.
 In computer programming, any single digit number
like 0, 1, 2,....and special characters like $, %, +, -....
etc., are also treated as characters and to assign
them in a character type variable, you simply need to
put them inside single quotes.
 For example, the following statement defines a
character type variable ch and we assign a value 'a'
to it −
char ch = 'a';
Water sports adventure

 Page 80
 Wakeboarding and kiteboarding are sports
that take place on the surface of the water
 In kiteboarding, a kite, which is powered by
the wind, moves the board and the rider
across the water
 Whereas in wakeboarding a boat is used to
drag the board and rider behind it.
 In the 1990s Cory Roeseler developed a single
board for these sports, which previously used
skis
 Speeds of up to nearly 100 km per hour can
be achieved by experienced participants
 In the summer 2010, Louis Trapper set a world
kiteboarding record by travelling 2000 km
over 23 days
A

 Look at the picture


 Have you ever done any similar watersports?
 Read the question
 Why do you think spectators sports are so
popular?
 Would you like to be a professional
sportsperson? Why?/ why not?
B

 Now you are going to watch a short


documentary
 Read sentence 1-6
 Listen out for specific words in red
C

 Summary of the information in the


documentary
 Complete the summary in your note book

You might also like