1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
iVinArrow [24]
3 years ago
13

What is the smallest integer n (stored as a floating point value) such that n + 1.0 - n will produce 0.0 for: a) Single-precisio

n IEEE 754 floating point?

Computers and Technology
1 answer:
Vedmedyk [2.9K]3 years ago
4 0

Answer: The FP-s are stored as sign (1.)111111111111 - number of bits.

Also 24 bits resolution there can be 23 zeros

Explanation:

The –1·2²⁴ might be stored as -1 · 1.00000000000000000000000(1 ←the 2⁰), it depends on how the FFP “engine” manages this, it may also be code specific a n+1–n does return 1 but 1–n+n does not. you should carry out a test for a specific compiler/computer

This is what javascript does with double (k+=1; n-=1) e.g

the (k+=2; n-=2) should be used to pass ±0x20000000000000

You might be interested in
Jakob is stuck in the airport on a long layover while traveling for work. He sees two Wi-Fi’s he can log onto: one says Airport
Andrei [34K]
You should pick Free Airport Wifi bc its free
3 0
3 years ago
Read 2 more answers
PERGUNTA 1
Genrish500 [490]

Answer:hola no conozco el toldo, pero necesito puntos cerebrales tan lo siento

Explanation:

8 0
3 years ago
How many times is the coin tossed?
valina [46]

Answer:

100 times.

Explanation:

The code will loop until i is equal to or greater than roles. I starts at zero and increases by one after each toss.

3 0
3 years ago
Read 2 more answers
Python Code that predicts the amount of money you will have in your IRA when you retire. Inputs are: 1. Number of years until yo
zaharov [31]

Answer:

yearsUntilRetire =0

expectedInterest =-1.00

initialAmount =-1.0

expectedAmountToAdd = -1.00

while yearsUntilRetire < 1 or yearsUntilRetire > 70:

yearsUntilRetire = int(input("Number of year until you retire between 1 to 70: "))

while expectedInterest <0 :

expectedInterest = float(input("enter the expected rate : "))

if expectedInterest >= 10:

doubleCheckRate = input("do you really expect {} interest rate: ".format(expectedInterest)).lower()

if doubleCheckRate == "false":

expectedInterest =-1.00

while initialAmount < 0:

initialAmount = float(input("Enter positive initial amount for IRA: "))

while expectedAmountToAdd < 0 or expectedAmountToAdd > 2500:

expectedAmountToAdd = float(input("Enter positive IRA amount to be added each year between 0 to $2500: "))

finalContribution =initialAmount

for i in range(yearsUntilRetire):

finalContribution = finalContribution + finalContribution * (expectedInterest/100.00) + expectedAmountToAdd

if (i+1) % 5 == 0:

print("Contribution after year {} is ${:,.2f}.".format(i+1,finalContribution))

 

print("Final Contribution is ${:,.2f}.".format(finalContribution))

Explanation:

  • Use a loop to get the valid input from the user for years until retire between 1 to 70 .
  • Get the valid input for expected rate .
  • Check if expected rate is greater than or equal to 10 then ask the user again if one expect such high rate .
  • Use a loop to get valid IRA initial Contribution .
  • Use a loop to get expected Amount to add regularly in IRA .
  • Iterate over numbers of year and print the data after 5 years .
3 0
3 years ago
Which vulnerability can occur if a programmer does not properly validate user input and allows an attacker to include unintended
sergiy2304 [10]

Answer:

SQL injection

Explanation:

SQL injection is a vulnerability in databases that occurs when user input is not properly validated. Hackers are able to input SQL query statements to bypass the use of the actual user name and password to gain access to the account.

Using placeholders in programmed SQL statements mitigates the effects of SQL injection.

6 0
3 years ago
Other questions:
  • Given two Generic variables, A with value "123" and B with value 456, what would the Write Line output of A + B be? 123456 579 A
    5·1 answer
  • Working for the Internal Revenue Service is a career in public safety. A. True B. False
    14·1 answer
  • When searching for an image on your computer, you should look for a file with which of the following extensions?
    8·1 answer
  • Will technology be the destruction or salvation of human-kind
    13·2 answers
  • A user purchased a new smart home device with embedded software and connected the device to a home network. The user then regist
    5·1 answer
  • I just downloaded this song and if any one wants to listen to it then go ahead and do that. It’s called Trap Music 2018 âa bass
    15·2 answers
  • What is the range for copper tape
    15·1 answer
  • Write a program that lets the user perform arithmetic operations on fractions. Fractions are of the form a/b, in which a and b a
    11·1 answer
  • Corey wrote a code that will display his name every time he presses the down arrow key but there is a bug in it. Display letter
    13·1 answer
  • Is it true that if the user log out the computer will turn off automatically​
    9·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!