{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

# Postlab04_Task2_team16 - notation 0.0E 0 = 1.0 1.0 = 1.0...

This preview shows pages 1–2. Sign up to view the full content.

Team 16 Due: February 6, 2008 Matt Ziolkowski Ryan Felde Justin Jantzen Postlab04_Task2_team16.pdf Part A) The largest integer that may be used to correctly calculate a factorial using this code is 12 and it gives a correct answer of 479001600. The program begins to behave erratically after this because the number begins to have too many digits, causing the program to be unable to store the entire number. This creates radically different results than what the answer should be. Part B) The largest number that can be input and still output the correct results is 34. Any higher than that and the program gives an arithmetic exception error. This number is much higher than the highest integer value that can be used because the program can use scientific notation to express the values of the numbers, instead of regular integer

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: notation. 0.0E+0 ! = 1.0 1.0 ! = 1.0 2.0 ! = 2.0 3.0 ! = 6.0 4.0 ! = 24.0 … 31.0 ! = 8.2228384E+33 32.0 ! = 2.6313083E+35 33.0 ! = 8.683318E+36 Team 16 Due: February 6, 2008 Matt Ziolkowski Ryan Felde Justin Jantzen Postlab04_Task2_team16.pdf 34.0 ! = 2.9523288E+38 Part C) The largest number that can have its factorial computed in Fortran using a high precision real variable is 1754, which outputs the number 1.98 E 4930. Code excerpt: real (kind = selected_real_kind(1, 4931)) :: Fac = 1. Output excerpt: 1750.0 ! = 2.0983189826483834924882295676310111E+4917 1751.0 ! = 3.674156538617319495346889972921897E+4920 1752.0 ! = 6.437122255657543755847751232559163E+4923 1753.0 ! = 1.1284275314167674204001107910676187E+4927 1754.0 ! = 1.979261890105010055381794327532597E+4930...
View Full Document

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern