- 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
- 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
- 4、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
- 5、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们。
- 6、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
- 7、VIP文档为合作方或网友上传,每下载1次, 网站将根据用户上传文档的质量评分、类型等,对文档贡献者给予高额补贴、流量扶持。如果你也想贡献VIP文档。上传文档
查看更多
FORTRAN语言题解及分析(FORTRAN language and analysis)
FORTRAN语言题解及分析(FORTRAN language and analysis)
The solution and analysis of FORTRAN language
Professor Su Minsheng
1994-07-08
Read the following procedures and FORTRAN procedures, to be filled the blank words written in the corresponding column of the answer.
[program description]
This procedure calculates the approximate value of Sin X according to Taylor expansion. The Taylor expansion of Sin X is
SinX=x_/_1! - x3_/__3! + x5_/__5! - x7_/__7! +... =
The computational accuracy is 10-6. In the program, T is used to store one item in the Taylor expansion.
[procedure]
EPS=1E-6
READ (*, 5) X
5 FORMAT (F5.2)
SINX=0.0
T=X
N=1
10 IF ((1)) THEN
SINX= (2)
N=N+1
T= (3)
(4)
(5)
WRITE (*.20) X, SINX
20 FORMAT (1X,SIN (F5.2, ) = , F14.6)
STOP
END
[answer]
(1) ABS (T).GE.EPS or ABS (T).GE.1E-6
(2) SINX+T
(3) -T* * * * / (2.0*N-2.0) / (2.0*N-1.0)
(4) GOTO 10
(5) ENDIF
[analysis]
The problem of summation of series is that a cycle should be done by summing and moving before the loop, and then output after the loop. By the program, the loop consists of a block IF structure and related statements, (5) should be block IF structure termination statement ENDIF, and (4) should be GOTO 10 to form the while-do loop structure. (1) a condition that requires continued circulation. By the description of the procedures, the calculation requires accumulation T T=10-6 and T10-6 T, to. Thus, (1) should be ABS (T).GE.EPS, or ABS (T).GE.E-6. If you do not use the function ABS, you can be (T.GE.EPS).OR. (T.LE.-EPS).
(2) accumulate and SINX+T.
(3) is a new expression by expansion before and after the relationship should be T=-T* / (2.0*N-2.0) * * * / note by (2.0*N-1.0) (4), (5) while-do structure, can also be written as ENDIF (4), and (5) in IF (ABS (T).GE.EPS) GOTO 10, but this is the judgment and the judgment of IF IF logic block repeat, is not good.
Test questions two (programmer level, afternoon question ten)
Reading program
[procedure specification] (omitted)
[procedure]
SUBROUTINE, EXEC (A, M, N,
您可能关注的文档
- 考拉小巫的阅读经验(The koala's reading experience).doc
- 考点17 有机化合物的组成与结构(Table 17 composition and structure of organic compounds).doc
- 考前准备(重要)(Preparation before exam (important)).doc
- 考点一基本概念(算法、数据结构、线性表)1200(Test site 1 basic concepts (algorithms, data structures, linear tables) 1200).doc
- 考点一基本概念(算法、数据结构、线性表)329(Test site 1 basic concepts (algorithms, data structures, linear tables) 329).doc
- 考好数学并不难(It's not difficult to do well in maths).doc
- 考点一基本概念(算法、数据结构、线性表)4550(Test site 1 basic concepts (algorithms, data structures, linear tables) 4550).doc
- 考点一基本概念(算法、数据结构、线性表)5354(Test site 1 basic concepts (algorithms, data structures, linear tables) 5354).doc
- 考点一基本概念(算法、数据结构、线性表)5421(Test site 1 basic concepts (algorithms, data structures, linear tables) 5421).doc
- 考研 化工原理 必备课件第九章 蒸发(PubMed essential courseware courseware, ninth chapters evaporate).doc
- foobar2000 均衡器 设置 频段 影响(Foobar2000 equalizer set frequency influence).doc
- FPGA小组(The FPGA team).doc
- FreeMarker macro(宏)的使用(The use of FreeMarker macro (macro)).doc
- friends人物介绍(friends).doc
- FR地理-科米尔(FR geographic - cormier).doc
- FR地理-西土(FR geosisols).doc
- ftp地址及重点资源(FTP addresses and key resources).doc
- FTP服务器架设教程(FTP server erecting tutorial).doc
- FTP的典型错误(建议想做网管的记住)(Typical error of FTP (remember to do network management)).doc
- friends目录(Friends list).doc
最近下载
- 法律职业资格(主观题)历年真题摘选附带答案2024.docx VIP
- 用于皮秒脉冲产生的级联阶跃二极管电路.pdf VIP
- 课外古诗词诵读《梁甫行》课件(共24张ppt)2025-2026学年统编版语文八年级上册.pptx VIP
- 2023高考诗歌鉴赏专项练习:表达技巧4-写景手法(典例引领+方法技巧+巩固训练+答案解析).docx VIP
- 纪念九一八主题班会课件学习资料.ppt VIP
- 佛山市教育局1.pdf VIP
- 基于场效应管与阶跃恢复二极管的皮秒级脉冲源设计.PDF
- 2025法律职业资格(主观题)历年真题摘选附带答案.docx VIP
- 贵阳机场通行证考试试题及答案.doc VIP
- 学校类物业管理投标文件技术部分完整规范模板.doc VIP
文档评论(0)