Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

f= float g= double the questions are talking about these variables in java. B. Precision and Range Interestingly some numbers can be perfectly represented in

image text in transcribed

f= float

g= double

the questions are talking about these variables in java.

B. Precision and Range Interestingly some numbers can be perfectly represented in Base 10, but not in Base 2. An example is one-tenth (in Base 10, this is 0.1; in Base 2 this is a repeating decimal. Feel free to try!) Suppose we set both fand g to one-tenth using the statements below. f = 0.1; g = 0.1; = Answer the following questions. For each, mark the best answer. Which will be closer to the actual value of one-tenth? Wh f g g Which can hold higher values? f 3 g Which takes more memory? f g When using real values I should always use type double, to be safe. True False

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Informix Database Administrators Survival Guide

Authors: Joe Lumbley

1st Edition

0131243144, 978-0131243149

More Books

Students also viewed these Databases questions

Question

Prepare project and personal reports

Answered: 1 week ago