Homework 5, due October 16, 2008.

Due Thursday, October 16, 2008.
Post Reply
goodwine
Site Admin
Posts: 1596
Joined: Tue Aug 24, 2004 4:54 pm
Location: 376 Fitzpatrick
Contact:

Homework 5, due October 16, 2008.

Post by goodwine »

Reading: Chapter 5 from the course text.

Individual Problem: Complete the exam and correct any mistakes you think you may have made. Also do the "extra credit" problem. In this homework both problems are required and are worth the same credit. If you think you got the exam completely correct, then submitting the same thing is o.k., but please submit it again.
Bill Goodwine, 376 Fitzpatrick
jcorona

Re: Homework 5, due October 16, 2008.

Post by jcorona »

Julian Corona
Homework 5

posting.php?mode=reply&f=156&t=296#
You do not have the required permissions to view the files attached to this post.
rcasiano

Re: Homework 5, due October 16, 2008.

Post by rcasiano »

I have a problem with my variables pertaining to the input value of the number of decimals. I defined my variable(prec1) as the amount of decimals(ranging from one to six), then I made another variable(prec2) with is 10^(-prec1). My problem is that I defined prec1 as an integer and prec2 as a real number so when I do my if statement to check the decimal places to kick out of the do loop, my prec2 is calculated as zero. The problem is the conflict of real and integer numbers and my program works only when I set BOTH equal to real numbers, but this doesn't make sense because one cannot have a decimal place of 4.532 etc., only a decimal place of an integer. My only option to fix this is to do if statements to see if the real number entered was between a certain range(like >1 and <1.5 for example), then redefine it in accordance with that range(one in this example but still being a real number of course),THEN use newly "calculated" value as my decimal place to obtain my second variable(prec2 which is 10^-prec1), and finally use prec2 in my if statement inside my do loop to check for the level of precision defined by the user. Is this absolutely necessary or am I just nitpicking?
ngeraci

Re: Homework 5, due October 16, 2008.

Post by ngeraci »

Nicholas Geraci
AME 20214 HW 5
Exam 1
prog1.f
prog2.f
You do not have the required permissions to view the files attached to this post.
satkinso

Re: Homework 5, due October 16, 2008.

Post by satkinso »

Homework 5:
problem one prog1.f
"extra credit" prog2.f
You do not have the required permissions to view the files attached to this post.
pranade

Re: Homework 5, due October 16, 2008.

Post by pranade »

Piyush Ranade
Attachment: Program with the extra credit portion within the code.
You do not have the required permissions to view the files attached to this post.
ereinecc

Re: Homework 5, due October 16, 2008.

Post by ereinecc »

Homework 5
You do not have the required permissions to view the files attached to this post.
goodwine
Site Admin
Posts: 1596
Joined: Tue Aug 24, 2004 4:54 pm
Location: 376 Fitzpatrick
Contact:

Re: Homework 5, due October 16, 2008.

Post by goodwine »

rcasiano wrote:I have a problem with my variables pertaining to the input value of the number of decimals. I defined my variable(prec1) as the amount of decimals(ranging from one to six), then I made another variable(prec2) with is 10^(-prec1). My problem is that I defined prec1 as an integer and prec2 as a real number so when I do my if statement to check the decimal places to kick out of the do loop, my prec2 is calculated as zero. The problem is the conflict of real and integer numbers and my program works only when I set BOTH equal to real numbers, but this doesn't make sense because one cannot have a decimal place of 4.532 etc., only a decimal place of an integer. My only option to fix this is to do if statements to see if the real number entered was between a certain range(like >1 and <1.5 for example), then redefine it in accordance with that range(one in this example but still being a real number of course),THEN use newly "calculated" value as my decimal place to obtain my second variable(prec2 which is 10^-prec1), and finally use prec2 in my if statement inside my do loop to check for the level of precision defined by the user. Is this absolutely necessary or am I just nitpicking?
Have you resolved this? I'm sorry I didn't see it sooner. I don't immediately see why prec2 would evaluate to zero.
Bill Goodwine, 376 Fitzpatrick
jhollan3

Re: Homework 5, due October 16, 2008.

Post by jhollan3 »

Jonathan Holland

prog1.f
prog2.f
You do not have the required permissions to view the files attached to this post.
kbeltran

Re: Homework 5, due October 16, 2008.

Post by kbeltran »

Homework 5

Thanks!

Katherine Beltran
You do not have the required permissions to view the files attached to this post.
Post Reply

Return to “AME 20214, Homework 5”