Calculate the sum (not the partial sum) of the first 10 million terms in the harmonic series
1/2 + 1/2 + 1/3 + 1/4 + 1/5 + 1/6 + ... + 1/N + ...
using both double-precision and single-precision numbers. Compare the results. Explain why they are different. (You may include your explanation as a comment at the end of the code for this problem.

Answers

Answer 1

This question is incomplete, the complete questions are;

Calculate the sum (not the partial sum) of the first 10 million terms in the harmonic series

1/1 + 1/2 + 1/3 + 1/4 + 1/5 + 1/6 + ... + 1/n + ...

using both double-precision and single-precision numbers. Compare the results. Explain why they are different. (You may include your explanation as a comment at the end of the code for this problem.

Answer:

harsum =

16.6953

harmsum =

16.1122

(harsum is 16.6953  and harmsum is  16.1122) so there is a difference in the sum of double and single type because a double type is more precise than the singe type.

Step-by-step explanation:

Given that;

the terms of the harmonics series are;

1/1 + 1/2 + 1/3 + 1/4 + 1/5 + 1/6 + ... + 1/n + ...

we have to find the harmonic series value for 10 milli0n terms

we have to specify the numbers in both single and double type precision

the MATLAB code used in finding the sum is given by the following expression

n=double( 1:1e7 );

har=1./n;

harsum=sum( har )

m=single( 1:1e7 )

harm=1./m;

harmsum=sum( harm )

MATLAB OUTPUT

harsum =

16.6953

harmsum =

16.1122

Therefore there is a difference in the sum of double and single type because a double type is more precise than the singe type.


Related Questions

Tell whether each sentence about the factors of of 12 is True or False.
A. Allthefactorsof12are2,3,4,6,12.
B. 1 and 12 are a factor pair.
C. 120isafactorbecause10x12=120.
D. An array showing the factor pair of 3 and 4 would have 3 rows of 4 objects.
☐ True ☐ True ☐ True ☐ True
☐ False ☐ False ☐ False ☐ False

Answers

Answer:

A. True, 1 is always a factor too but It wasn't included there

B. True

C. True

D. False, it makes no sense.

Step-by-step explanation:

Have a nice day

HELPPP ASAPP PLEASEE

Answers

Answer:

1 tube of paint = $6

Step-by-step explanation:

check the graph to verify the answer

one tube of pain =$6 check graph to make sure

What is the y-intercept of the graph of -6x -2y =9???

Answers

9514 1404 393

Answer:

  -4.5

Step-by-step explanation:

The y-intercept can be found by setting x=0 and solving for y.

  -2y = 9

  y = -9/2 = -4.5 . . . the y-intercept

__

As an ordered pair, this is (0, -4.5).

eric mows 1/5 acre in 1/4 hour. how many acre does paige mow per hour

Answers

Answer:

2/3

Step-by-step explanation:

Help
Fjdjdjdjdjdjdjdjdjjd

Answers

Answer:

D. -2/5

Step-by-step explanation:

D. -2/5
Hope this is correct. Have a great day!

What are the domain and range of the function represented by the set of
ordered pairs?
K(-10, -6), (-4, -10), (3, 8), (9, -2)}

Answers

Answer:

A

Step-by-step explanation:

Domain is the first number in the ordered pairs and range is the second number. (I'm sorry if it's wrong)

Hope it helps!

Find the difference in SIMPLEST form:
3 1/5 - 1 1/10=

Answers

Answer:

2 1/10

Step-by-step explanation:

Answer:

2 1/10 or 2.1

Step-by-step explanation:

Toby's teacher instructs him to arrange the tiles in ascending order. Which tile should Toby place first in his arrangement?

Answers

Answer:

The smallest one first

Step-by-step explanation:

3^x=1/9

What does x equal?

Answers

Answer: The letter "x" is often used in algebra to mean a value that is not yet known. It is called a "variable" or sometimes an "unknown". In x + 2 = 7, x is a variable, but we can work out its value if we try!

Step-by-step explanation:

You can save a significant amount of mortgage interest paid if you make one additional principal and interest payment a year. This will reduce a 30-year mortgage by around 6 years. It also increases your equity in the home faster. If you choose to pay one additional mortgage payment a year by paying 1/12 of it each month (make certain to note the extra money is to reduce principal), how much will you pay each month for a mortgage of $152,000 at 3.5% for 16 years?

Answers

Answer:

A = $237,120.00

I = A - P = $85,120.00

Equation:

A = P(1 + rt)

Calculation:

First, converting R percent to r a decimal

r = R/100 = 3.5%/100 = 0.035 per year.

Solving our equation:

A = 152000(1 + (0.035 × 16)) = 237120

A = $237,120.00

The total amount accrued, principal plus interest, from simple interest on a principal of $152,000.00 at a rate of 3.5% per year for 16 years is $237,120.00.

Which values of a, b, and c correctly complete the division?

One-sixth divided by three-fifths = StartFraction 1 Over a EndFraction times StartFraction b Over c EndFraction

Answers

Answer:

answer is a

Step-by-step explanation:

thank me later:)

A polar bear can run 100 miles in 4 hours .A grizzly can run 222 miles in 6hours

Answers

Answer:

=333 miles in all

Step-by-step explanation:

Answer:

Is that a question or a statement

Step-by-step explanation:

Fill in the blanks to solve the equation.
2 (2 – 14) = } (x – 12)
= {x – 4
N
-7 = -4
2=

Answers

answer: -24

explanation : i was able to solve it but i for got what numbers i used to solve it with

Value of this equation 1.50(8x-12)=30

Answers

Answer:

x=4

Step-by-step explanation:

Answer: x = 4

Work: First, you must distribute the 1.50 to 8x and -12. The new equation you get after doing so is 12x - 18 = 30. Next, we are going to add 18 on both sides, cancelling on the side it was currently on. After cancelling, we get 12x = 48. Divide 12 on both side, and again cancelling on this side it's currently on, and you get x = 4.

Check: 1.50(8(4)-12) = 30. (After solving, you get 30) (check)

I hope this helps, and Happy Holidays! :)

Len bought 12.3 ounces of cashews and 15.2 ounces of almonds.
He calculates that if he and four friends share all the nuts equally, each person will receive 5.1 ounces of nuts.

Is his answer reasonable? Use 3-5 complete sentences to explain why or why not.

Answers

Answer:A manufacturer produces nuts and bolts. It takes 1 hour of work on machine A and 3 hours on machine B to produce a package of nuts. It takes 3 hours on machine A and 1 hour on machine B to produce a package of bolts. He earns a profit of Rsl7.50

Step-by-step explanation:

Answer:

Lens answer is not reasonable because if you do the math she will be able to share 6.875 ounces. I know this because you can add 12.3 and 15.2 to get 27.5. If you divide 27.5 by 4 you get 6.875.

Step-by-step explanation:

Carol successfully increases her business to 200 customers per day. However, her total cost for doing so is 50% greater than the expected $1,600. What percent greater is the actual marginal cost than the expected marginal cost, to the nearest full percent?

Answers

Carol's Steakhouse, the total cost of serving 150 customers per day is $900. Carol is interested in increasing her business, but is concerned about the effect on marginal cost.

Carol successfully increases her business to 200 customers per day. However, her total cost for doing so is 50% greater than the expected $1,600. What percent greater is the actual marginal cost than the expected marginal cost, to the nearest full perc

Answer:

214

Step-by-step explanation:

We have been given

C1 = $900

Q1 = 259

Then c2 = $1600

Q2 = 200

M = 1600-900/50

= 14

For real,

C1 = 900

C2 = 2400

Q1 = 150

Q2 = 50

1500/50 = 30

30/14 x 100

= 214

It is greater by 214 percent

WILL GIVE BRAINLEST 100 POINTS PLZ HELP ME

Answers

Answer:

2

Step-by-step explanation:

Its the only graph that matches.

1 2 b 1 2 bb 1 2 b 1 2 bb 1 2 b 1 2 bb throw em back til i lose count say I'm gonna swing from the chandelier

From the chandelier

I'm gonna live like tomorrow doesn't exist

Like it doesn't exist

I'm gonna fly like a bird through the night

Feel my tears as they dry

I'm gonna swing from the chandelier

From the chandelier

But I'm holding on for dear life

Won't look down, won't open my eyes

Keep my glass full until morning light

'Cause I'm just holding on for tonight

Help me, I'm holding on for dear life

Won't look down, won't open my eyes

Keep my glass full until morning light

'Cause I'm just holding on for tonight, on for tonight

Sun is up, I'm a mess

Gotta get out now, gotta run from this

Here comes the shame, here comes the shame

One, two, three, one, two, three, drink

One, two, three, one, two, three, drink

One, two, three, one, two, three, drink

Throw 'em back 'til I lose count

I'm gonna swing from the chandelier

From the chandelier

I'm gonna live like tomorrow doesn't exist

Like it doesn't exist

I'm gonna fly like a bird through the night

Feel my tears as they dry

I'm gonna swing from the chandelier

From the chandelier

But I'm holding on for dear life

Won't look down, won't open my eyes

Keep my glass full until morning light

'Cause I'm just holding on for tonight

Help me, I'm holding on for dear life

Won't look down, won't open my eyes

Keep my glass full until morning light

'Cause I'm just holding on for tonight

On for tonight, on for tonight

'Cause I'm just holding on for tonight

Oh, I'm just holding on for tonight

On for tonight, on for tonight

'Cause I'm just holding on for tonight

'Cause I'm just holding on for tonight

Oh, I'm just holding on for tonight

On for tonight, on for tonight

Identify the constant term in this expression 0.25 + 2x + 4z +0.75y
A) 2x B) 4x C 0.25 D) 0.75y​

Answers

C) 0.25 is the answer because it has the lowest degree and doesn’t have a variable

Answer:

0.25..........................................................

.

The function f(x) = x3 – 7x + bis shown in the figure.
15+

Answers

Answer:

The correct answer is

(x + 2) (x + 1) (x - 3)

Step-by-step explanation:

i give brainlilset nxgbkj,m.d/ed
q

Answers

Hello,

First take both prisms and multiply them. Then subtract A-B=?

Workspace:

A= 20*9*9=1620 in

B=11*5*9=295 in

1620-295= 1325.5 in

The correct answer is H) 1325.5 in

Hope this helps!!
Brainliest?


What is the value of each function composition?

Answers

Answer:

(h o k) (3) = 3

(h o k) (-4b) = -4b

Step-by-step explanation:

the invesre function gives you back the value of argument of function

HELP ME PLEASEEEE :)

Answers

Answer:

I believe it to be C

Step-by-step explanation:

Write 0.37 as a percent.

Answers

Answer:

37

Step-by-step explanation:

Answer:

37%

Step-by-step explanation:

0.37 x 100 = 37%

Plz i NEED HELP ABOUT TO FINISH THIS CLASS! PLZ
17. Does the following system have a unique solution? Why?

Answers

The last one quick quick

Answer:

last one

Step-by-step explanation:

Convert 4/16 to a decimal.
0.1
O
0.25
0.5
0.75

Answers

Answer:

0.25

How to Solve:

Take the denominator of 4/16 and find a number to make it 10, 100, any one followed by zeroes:

16 x 6.25 = 100

Do the same to the numerator:

4 x 6.25 = 25

Now, take 25 and take a decimal point two spaces to the right:

0.25

Eagle Sports Supply had net income of $2,000 on sales this year. The firm paid a dividend of $500 and retained the rest earnings for financing for the next year. Total assets were $100,000, of which $40,000 was financed by debt. The rest were financed by equity.

(a) What is the firm’s internal growth rate?
(b) What is the firm’s sustainable growth rate?
(c) If the firm grows at its sustainable growth rate, how much new debt will be issued in the next year?

Answers

Answer:

089908

Step-by-step explanation:

i dont know lol but wana see

Determine the volume of the parallelepiped with one vertex at the origin and the three vertices adjacent to it at (2, â1, â1), (2, 4, â2), and (2, â6, 1).

Answers

Answer:

23

Step-by-step explanation:

Here is the complete question

Find the volume of the parallelepiped with one vertex at the origin and adjacent vertices at (1, 0, -3), (1, 2, 4), and (5, 1, 0).

Solution

We find the volume of the parallelepiped by making a 3 × 3 column matrix whose columns are the corresponding coordinates of the vertices of the parallelepiped.

So, (1, 0, -3), (1, 2, 4)  and (5, 1, 0)

[tex]A = \left[\begin{array}{ccc}1&1&5\\0&2&1\\-3&4&0\end{array}\right][/tex]

The determinant of A is the volume of the parallelepiped. So,

detA = 1(2 × 0 - 4 × 1) - 1(0 × 0 - (-3) × 1) + 5(0 × 4 - (-3) × 2)

= 1(0 - 4) - 1(0 + 3) + 5(0 + 6)

= 1(-4) - 1(3) + 5(6)

= -4 - 3 + 30

= 23

So the volume of the parallelepiped is 23

what is 1 1/5 X 3 3/4 ?

Answers

Answer:

4.5

Step-by-step explanation:

which pairs of lines were parallel?
A. a and b
B. a and c
C. c and d
D. b and d

Answers

The lines that were parallel were C and D they can never touch

Answer:

c and d

Step-by-step explanation

cause they can never intersect

A certain computer can perform a maximum number of operations per second. If this computer is running at 23% of the maximum and is performing 105 operations per second, what is the maximum number of operation the computer can perform per second

Answers

Answer:

I believe 457 operations

Other Questions
George Washington was chosen commander of the Continental Army uponthe recommendation ofA. Sam Adams. B. Thomas Gage. C. John Adams. D. Ben Franklin. Nineteen less than four times a number is greater than forty-seven.Please i will give away all my points to the person that answers this in number form thanks In 1984, what are Winston Smiths character traits? True or False: The painting above is by Diego Rivera.Please select the best answer from the choices provided Was the American Reconstruction a revolution? Why or why not? Please help ASAP You buy five books that are equal inprice and a DVD for $8. Your talcomes to $26.50. Write an equationthat would help you determine the costof one book. Some characters in Through the Looking Glass could appear only in a fantasy. Other characters are realistic. Place each character into the correct category Alice The Tiger-lily Dinah, the cat| The White Queen: CORRECT ANSWER GETS BRAINLIEST "Although important strides were made, Reconstruction failed to provide lasting guaranteesof the civil rights of the freedmen."Which evidence best supports this statement:A. passage of Jim Crow laws in the latter part of the 19th centuryB. ratification of the 13th, 14th, and 15th amendmentsc. refusal of Southern States to allow sharecroppingD. passage of the Civil Rights Acts of 1866 Which jazz-rock fusion artist played drums with Miles Davis and formed the trio Emergency with John McLaughlin and Larry Young What is cell differentiation? help meh pls I will give Brainliest to the first person to answer What is Imperialism and how did it impact the various countries involved? i wanna give yall points what is your fave artists? Bonita Company's inventory records show the following data: Units Unit Cost Inventory, January 1 10900 $8.00 Purchases: June 18 8700 8.10 November 8 5700 5.00 A physical inventory on December 31 shows 5700 units on hand. Under the FIFO method, the December 31 inventory is:_______ If prisoners didnt have any items to build a shelter, what else would they do? A picture is originally 3 inches wide and 5 inches long. If Elizabeth wants to have a picture that is 6 inches wide, then how long will the picture be? Write a function for the following table X. Y-1. -40. -21. -12. -0.5Please help I only have 20 minutes ILL MARK AS BRAINLESS PLS HELP What causes the atrioventricular valves to close during a heartbeat? a Pressure in the atria is higher than in the ventricles. b Pressure in the atria is lower than in the ventricles. c Pressure in the arteries is higher than in the ventricles. d Pressure in the arteries is lower than in the ventricles. What is the domaingraph