Đang chuẩn bị nút TẢI XUỐNG, xin hãy chờ
Tải xuống
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 | 1.2 Some C Conventions for Scientific Computing 15 if julian IGREG Cross-over to Gregorian Calendar produces this correc-jalpha 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 julian 36525 1-julian 36525 Julian centuries then subtract them off 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 2 iyyy if iyyy 0 -- iyyy if julian 0 iyyy - 100 1-julian 36525 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. Englewood Cliffs NJ Prentice-Hall . Kernighan B.W. 1978 The Elements of Programming Style New York McGraw-Hill . 1 Yourdon E. 1975 Techniques ofProgram Structure andDesign Englewood Cliffs NJ Prentice- Hall . 2 Jones R. and Stewart I. 1987 The ArtofCProgramming New York Springer-Verlag . 3 Hoare C.A.R. 1981 Communications of the ACM vol. 24 pp. 75-83. 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 Programming 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 ofthe RoyalAstronomical Society vol. 25 pp. 53-55 see also op. cit. 1985 vol. 26 pp. 151-155 and 1986 vol. 27 pp. 506-507. 8 1.2 Some C Conventions for Scientific Computing The C language was devised originally for systems programming work not for scientific computing. Relative to other high-level programming languages C puts the programmer very close to the machine in several respects. It is operator-rich .