版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、 1.2 Some C Conventions for Scientic Computing 15 if (julian >= IGREG Cross-over to Gregorian Calendar produces this correcjalpha=(long(float (julian-1867216-0.25/36524.25; tion. ja=julian+1+jalpha-(long (0.25*jalpha; else if (julian < 0 Make day number positive by adding integer number of ja=
2、julian+36525*(1-julian/36525; Julian centuries, then subtract them o else at the end. ja=julian; jb=ja+1524; jc=(long(6680.0+(float (jb-2439870-122.1/365.25; jd=(long(365*jc+(0.25*jc; je=(long(jb-jd/30.6001; *id=jb-jd-(long (30.6001*je; *mm=je-1; if (*mm > 12 *mm -= 12; *iyyy=jc-4715; if (*mm >
3、; 2 -(*iyyy; if (*iyyy <= 0 -(*iyyy; if (julian < 0 iyyy -= 100*(1-julian/36525; Sample page from NUMERICAL RECIPES IN C: THE ART OF SCIENTIFIC COMPUTING (ISBN 0-521-43108-5 Copyright (C 1988-1992 by Cambridge University Press.Programs Copyright (C 1988-1992 by Numerical Recipes Software. Perm
4、ission is granted for internet users to make one paper copy for their own personal use. Further reproduction, or any copying of machinereadable files (including this one to any servercomputer, is strictly prohibited. To order Numerical Recipes books,diskettes, or CDROMs visit website or call 1-800-8
5、72-7423 (North America only,or send email to tradecup.cam.ac.uk (outside North America. (For additional calendrical algorithms, applicable to various historical calendars, see 8. CITED REFERENCES AND FURTHER READING: Harbison, S.P., and Steele, G.L., Jr. 1991, C: A Reference Manual, 3rd ed. (Englewo
6、od Cliffs, NJ: Prentice-Hall. Kernighan, B.W. 1978, The Elements of Programming Style (New York: McGraw-Hill. 1 Yourdon, E. 1975, Techniques of Program Structure and Design (Englewood Cliffs, NJ: PrenticeHall. 2 Jones, R., and Stewart, I. 1987, The Art of C Programming (New York: Springer-Verlag. 3
7、Hoare, C.A.R. 1981, Communications of the ACM, vol. 24, pp. 7583. Wirth, N. 1983, Programming in Modula-2, 3rd ed. (New York: Springer-Verlag. 4 Stroustrup, B. 1986, The C+ Programming Language (Reading, MA: Addison-Wesley. 5 Borland International, Inc. 1989, Turbo Pascal 5.5 Object-Oriented Program
8、ming Guide (Scotts Valley, CA: Borland International. 6 Meeus, J. 1982, Astronomical Formulae for Calculators, 2nd ed., revised and enlarged (Richmond, VA: Willmann-Bell. 7 Hatcher, D.A. 1984, Quarterly Journal of the Royal Astronomical Society, vol. 25, pp. 5355; see also op. cit. 1985, vol. 26, pp
9、. 151155, and 1986, vol. 27, pp. 506507. 8 1.2 Some C Conventions for Scientic Computing The C language was devised originally for systems programming work, not for scientic computing. Relative to other high-level programming languages, C puts the programmer “very close to the machine” in several re
10、spects. It is operator-rich, giving direct access to most capabilities of a machine-language instruction set. It has a large variety of intrinsic data types (short and long, signed and unsigned integers; oating and double-precision reals; pointer types; etc., and a concise syntax for effecting conversions and indirections. It denes
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 福建省莆田市2023-2024学年高二下学期7月期末考试历史
- 湖北科技出版社三上生命安全教育教案
- 学校安全教育教案
- JGJ18-2012钢筋焊接及验收规程
- 专利技术转让私人居间合同
- KTV木工修缮合同范本
- 4S店涂装油漆施工合同
- O2O建材家居平台建设运营商业计划书
- 2024年软件公司竞业禁止
- 2024年重庆货运资格证模拟考试题
- 2024-2030年中国工业脱水机行业发展状况及投资方向分析报告
- 网络传播法导论(第2版)课件 第五章 侵害名誉权
- 环评手续转让协议(2篇)
- 上海市高行中学2024-2025学年高二上学期9月质量检测数学试卷
- 医院污水处理运维服务投标方案(技术方案)
- 2024年高考最后一套压轴卷-文综试题(全国甲卷)含解析
- 苏教版数学长方体与正方体表面积解析
- 2024年国家开放大学形考作业答案
- 2024年湖南长沙环境保护职业技术学院招聘专任教师历年(高频重点复习提升训练)共500题附带答案详解
- 中考数学专题训练一元二次方程(50道计算题)(无答案)
- 《百分数(一)》大单元教学设计
评论
0/150
提交评论