Java How to Program, Early Objects (11th Edition) (Deitel: How to Program)
Java How to Program, Early Objects (11th Edition) (Deitel: How to Program)
11th Edition
ISBN: 9780134743356
Author: Paul J. Deitel, Harvey Deitel
Publisher: PEARSON
Expert Solution & Answer
Book Icon
Chapter 3, Problem 1.15SRE
Program Description Answer

Float type variables represent “single-precision” floating point numbers.

Blurred answer
Students have asked these similar questions
int and float are examples of
HELP NEEDED ASAP!  Language: JAVA The following code sequence is supposed to compare a float and a double with the same value and output that they are equal. What is wrong with the following code sequence? Why is it not showing the correct answer? Write your code to fix the problem. float piF = 3.141592653589793f; double piD = 3.141592653589793; if(piF == piD)    System.out.println("piF and piD are equal"); else     System.out.println("piF and piD are not equal");
a) What is "Approximation Error" in floating-point representation?  Approximation Error - Since in floating point representation we can not represent all real numbers so there occurs an error.It is difficult to represent some decimal numbers in binary form. b) Why is it happening?  Floating point Approximation error occur because it uses fixed no. of bits to represent decimal numbers. It is difficult to represent real numbers with the help of fixed bits of binary numbers. Also some decimal numbers are difficult to represent in binary form.  c) How can we minimize it? We can minimise it by- 1.Changing radix 2.Adding numbers of different magnitude value. 3.overflow 4. underflow 5.Subtracting numbers of same magnitude value.   Dont use answers from other websites please! Please type your answer not picture      d) How can the character codes be a solution for this?

Chapter 3 Solutions

Java How to Program, Early Objects (11th Edition) (Deitel: How to Program)

Knowledge Booster
Background pattern image
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
Text book image
Microsoft Visual C#
Computer Science
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Cengage Learning,
Text book image
C++ for Engineers and Scientists
Computer Science
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Course Technology Ptr
Text book image
C++ Programming: From Problem Analysis to Program...
Computer Science
ISBN:9781337102087
Author:D. S. Malik
Publisher:Cengage Learning