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
System memory is on a computer motherboard?
Leya [2.2K]
Is this a true or fales question

8 0
3 years ago
Read 2 more answers
Write a function DrivingCost with input parameters drivenMiles, milesPerGallon, and dollarsPerGallon, that returns the dollar co
jolli1 [7]

Answer:

the brainly thing is saying that i can't put the answer so i screenshotted it and put it down below

Explanation:

4 0
1 year ago
"Write a program that calculates the balance of a savings account at the end of a period of time. It should ask the user for the
Akimi4 [234]

Answer:

#include <iostream>

#include <fstream>

using namespace std;

int main() {

// Definitions

       double annualInterest;          // The annual interest rate

       double balance;                 // The account balance

       int months;                     // Total number of months

       double totalDeposit  = 0.0;     // Total deposited value

       double totalWithdraw = 0.0;     // Total withdrawn value

       double earnedInterest= 0.0;     // The earned amount

       double deposited;               // Monthly deposited value

       double withdrawn;               // Monthly withdrawn value

// Get the initial required data.

       

       cout<<"Please enter the annual interest rate,\n";

       cout<<"   Interest rate: ";

       cin >>annualInterest;

       cout<<"--------------------------------------------\n";

       cout<<"Please enter the starting balance,\n";

       do{

           cout<<"[the number could not be negative]\n";

           cout<<"Starting Balance: ";

           cin >>balance;

       }while(balance<0);

       cout<<"--------------------------------------------\n";

       cout<<"Please enter the number of months,\n";

       do{

           cout<<"[the number could not be less than 0]\n";

           cout<<"Number of months: ";

           cin >>months;

       }while(months<0);

// Iterated Loop to get all the months data.

       for(int month=1; month <= months; month++){

// Get the deposited value during that month.

           cout<<"Enter the deposited value during month "

               <<month<<",\n";

           do{

               cout<<"[the value could not be less than 0]\n";

               cout<<" Deposited value: ";

               cin >>deposited;

           }while(deposited<0);

           

           totalDeposit += deposited;

           balance += deposited;

// Get the withdrawn value during that month.

           cout<<"Enter the withdrawn value during month "

               <<month<<",\n";

           do{

               cout<<"[the value could not be less than 0]\n";

               cout<<" Withdrawn value: ";

               cin >>withdrawn;

           }while(withdrawn<0);

           

           totalWithdraw += withdrawn;

           balance -= withdrawn;

// Negative balance close the program.

           if(balance < 0){

               cout<<"Sorry, the account has been closed due to\n";

               cout<<"the negative balance.\n";

                 break;

// Calculate value due to the interest rate.

           }

      else {

               earnedInterest += (annualInterest/12) * balance;

               //        monthly interest rate

               balance += (annualInterest/12) * balance;

           }

       }

  // Display the statistics,

      ofstream file;

      file.open ("Report written to Report.txt");

      file << "Report written to Report.txt\n";

       file.close();

       cout<<"The ending balance: "<<balance<<std::endl;

       cout<<"   Total deposited: "<< totalDeposit<<std::endl;

       cout<<" Total withdrawals: "<< totalWithdraw<<std::endl;

       cout<<"   Earned interest: "<< earnedInterest<<std::endl;

       cout<<"============================================\n";

 return 0;

   }

   

6 0
3 years ago
Select the correct answer.
Veronika [31]
I think it’s c. llS....
6 0
3 years ago
Read 2 more answers
if a person walks 10 metres due to south in 10 seconds 10 due east in the next 10 seconds and transmitted you're not in the next
Scorpion4ik [409]

Answer:

\frac{1}{3}\ m/s

Explanation:

The computation of the velocity by using the following formula is

As we know that

Velocity = \frac{Displacement}{Total\ time\ taken}

where,

Displacement is 10 meters

Total time taken is 30 seconds

Now placing these values to the above formula

So, the velocity of Dash is

= \frac{10\ meters}{30\ seconds}

= \frac{1}{3}\ m/s

We simply applied the above formula so that we can get the velocity and the same is to be considered

5 0
3 years ago
Other questions:
  • You are training to complete in a local 5K run. You record your time scores in minutes after completing seven practice runs. Wri
    5·1 answer
  • Difference between implicit and explicit type casting
    7·2 answers
  • In a transaction-processing system (TPS), if the TPS database can be queried and updated while the transaction is taking place,
    12·1 answer
  • Which would increase electric current? increasing the resistance increasing the size of the wire decreasing the voltage
    6·1 answer
  • /*
    8·1 answer
  • What are lexical errors?<br> and fi(a==b)<br> will it be a lexical error or a syntactical error?
    8·1 answer
  • Kim is creating a PowerPoint
    13·1 answer
  • In what form do the hexadecimal numbers need to be converted for a computer’s digital circuit to process them?
    10·1 answer
  • Kevin needs to get his data from a database into a text file to send to another group. He needs to _____.
    12·2 answers
  • ................. are used to summarize data (option) (a) report (b) action ​
    12·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!