Postlab04_Task2_team16 - notation. 0.0E+0 ! = 1.0 1.0 ! =...

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

View Full Document Right Arrow Icon
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
Background image of page 1

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

View Full DocumentRight Arrow Icon
Background image of page 2
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

This note was uploaded on 10/05/2009 for the course ENGR 117 taught by Professor Staff during the Spring '08 term at Purdue University-West Lafayette.

Page1 / 2

Postlab04_Task2_team16 - notation. 0.0E+0 ! = 1.0 1.0 ! =...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online