




版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
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. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 室内设计承包合同书
- 投资合作意向协议书
- 优化办公效率实施方案大全
- 网络安全服务合作框架协议
- Unit 6 Section A (1a-2c) 教学设计2024-2025学年人教新目标八年级英语下册
- 鲁教版九年级化学第十单元《化学与健康》(同步教学设计)
- 第12课《台阶》教学设计-2023-2024学年统编版语文七年级下册
- 第24课《寓言四则》之《赫尔墨斯和雕像者》读写课教学设计 2024-2025学年 统编版(2024)七年级上册语文
- 北京市家庭居室装饰装修工程合同8篇
- 第八单元课题3金属资源的利用和保护教学设计-2024-2025学年九年级化学人教版(2024)下册
- 髋关节置换术后并发症
- 我的家乡安徽淮北城市介绍课件
- 2024年青田中小学教师招聘真题
- 技术标编制要求及注意事项
- 部编人教版八年级语文下册全册课件
- 2024电动汽车用锂离子动力电池包和系统电性能试验方法
- DZT 0447-2023 岩溶塌陷调查规范(1:50000)
- 洗煤厂安全规程培训
- JC-T 746-2023 混凝土瓦标准规范
- 企业微信指导手册管理员版
- 实践教学与实训教学
评论
0/150
提交评论