Physics.njnu.edu.cn

if (i.gt.20) maxexp=maxexp-1if (a.ne.y) maxexp=maxexp-2xmax=one-epsnegif (xmax*one.ne.xmax) xmax=one-beta*epsnegxmax=xmax/(beta*beta*beta*xmin)i=maxexp+minexp+3do 12 j=1,i visit website http://www.nr.com or call 1-800-872-7423 (North America only),or send email to [email protected] (outside North America).
readable files (including this one) to any servercomputer, is strictly prohibited. To order Numerical Recipes books,diskettes, or CDROMs Permission is granted for internet users to make one paper copy for their own personal use. Further reproduction, or any copying of machine- Copyright (C) 1986-1992 by Cambridge University Press.Programs Copyright (C) 1986-1992 by Numerical Recipes Software. Sample page from NUMERICAL RECIPES IN FORTRAN 77: THE ART OF SCIENTIFIC COMPUTING (ISBN 0-521-43064-X) Some typical values returned by machar are given in the table, above. IEEE- compliant machines referred to in the table include most UNIX workstations (SUN,DEC, MIPS), and Apple Macintosh IIs.
are generally IEEE-compliant, except that some compilers underflow intermediateresults ungracefully, yielding irnd = 2 rather than 5. Notice, as in the case of a VAX(fourth column), that representations with a “phantom” leading 1 bit in the mantissaachieve a smaller eps for the same wordlength, but cannot underflow gracefully.
Goldberg, D. 1991, ACM Computing Surveys, vol. 23, pp. 5–48.
Cody, W.J. 1988, ACM Transactions on Mathematical Software, vol. 14, pp. 303–311. [1] Malcolm, M.A. 1972, Communications of the ACM, vol. 15, pp. 949–951. [2] IEEE Standard for Binary Floating-Point Numbers, ANSI/IEEE Std 754–1985 (New York: IEEE, 20.2 Gray Codes
A Gray code is a function G(i) of the integers i, that for each integer N ≥ 0 is one-to-one for 0 ≤ i ≤ 2N − 1, and that has the following remarkable property:The binary representation of G(i) and G(i + 1) differ in exactly one bit. An exampleof a Gray code (in fact, the most commonly used one) is the sequence 0000, 0001,0011, 0010, 0110, 0111, 0101, 0100, 1100, 1101, 1111, 1110, 1010, 1011, 1001, and1000, for i = 0, . . . , 15. The algorithm for generating this code is simply to formthe bitwise exclusive-or (XOR) of i with i/2 (integer part). Think about how thecarries work when you add one to a number in binary, and you will be able to seewhy this works. You will also see that G(i) and G(i + 1) differ in the bit position ofthe rightmost zero bit of i (prefixing a leading zero if necessary).
The spelling is “Gray,” not “gray”: The codes are named after one Frank Gray, who first patented the idea for use in shaft encoders. A shaft encoder is a wheel withconcentric coded stripes each of which is “read” by a fixed conducting brush. Theidea is to generate a binary code describing the angle of the wheel. The obvious,but wrong, way to build a shaft encoder is to have one stripe (the innermost, say)conducting on half the wheel, but insulating on the other half; the next stripe isconducting in quadrants 1 and 3; the next stripe is conducting in octants 1, 3, 5,and 7; and so on. The brushes together then read a direct binary code for theposition of the wheel.
visit website http://www.nr.com or call 1-800-872-7423 (North America only),or send email to [email protected] (outside North America).
readable files (including this one) to any servercomputer, is strictly prohibited. To order Numerical Recipes books,diskettes, or CDROMs Permission is granted for internet users to make one paper copy for their own personal use. Further reproduction, or any copying of machine- Copyright (C) 1986-1992 by Cambridge University Press.Programs Copyright (C) 1986-1992 by Numerical Recipes Software. Sample page from NUMERICAL RECIPES IN FORTRAN 77: THE ART OF SCIENTIFIC COMPUTING (ISBN 0-521-43064-X) Single-bit operations for calculating the Gray code G(i) from i (a), or the inverse (b).
LSB and MSB indicate the least and most significant bits, respectively. XOR denotes exclusive-or.
The reason this method is bad, is that there is no way to guarantee that all the brushes will make or break contact exactly simultaneously as the wheel turns. Goingfrom position 7 (0111) to 8 (1000), one might pass spuriously and transiently through6 (0110), 14 (1110), and 10 (1010), as the different brushes make or break contact.
Use of a Gray code on the encoding stripes guarantees that there is no transient statebetween 7 (0100 in the sequence above) and 8 (1100).
Of course we then need circuitry, or algorithmics, to translate from G(i) to i.
Figure 20.2.1 (b) shows how this is done by a cascade of XOR gates. The idea isthat each output bit should be the XOR of all more significant input bits. To doN bits of Gray code inversion requires N − 1 steps (or gate delays) in the circuit.
(Nevertheless, this is typically very fast in circuitry.) In a register with word-widebinary operations, we don’t have to do N consecutive operations, but only ln2 N .
The trick is to use the associativity of XOR and group the operations hierarchically.
This involves sequential right-shifts by 1, 2, 4, 8, . . . bits until the wordlength isexhausted. Here is a piece of code for doing both G(i) and its inverse.
For zero or positive values of is, return the Gray code of n; if is is negative, return theinverse Gray code of n.
This is the more complicated direction: In hierarchical stages, visit website http://www.nr.com or call 1-800-872-7423 (North America only),or send email to [email protected] (outside North America).
readable files (including this one) to any servercomputer, is strictly prohibited. To order Numerical Recipes books,diskettes, or CDROMs Permission is granted for internet users to make one paper copy for their own personal use. Further reproduction, or any copying of machine- Copyright (C) 1986-1992 by Cambridge University Press.Programs Copyright (C) 1986-1992 by Numerical Recipes Software. Sample page from NUMERICAL RECIPES IN FORTRAN 77: THE ART OF SCIENTIFIC COMPUTING (ISBN 0-521-43064-X) starting with a one-bit right shift, cause each bit to be XORed with all more significant bits.
idiv=ishft(igray,ish)igray=ieor(igray,idiv)if(idiv.le.1.or.ish.eq.-16)returnish=ish+ish Double the amount of shift on the next cycle.
In numerical work, Gray codes can be useful when you need to do some task that depends intimately on the bits of i, looping over many values of i. Then, if thereare economies in repeating the task for values differing by only one bit, it makessense to do things in Gray code order rather than consecutive order. We saw anexample of this in §7.7, for the generation of quasi-random sequences.
Horowitz, P., and Hill, W. 1989, The Art of Electronics, 2nd ed. (New York: Cambridge University Knuth, D.E. Combinatorial Algorithms, vol. 4 of The Art of Computer Programming (Reading, MA: Addison-Wesley), §7.2.1. [Unpublished. Will it be always so?] 20.3 Cyclic Redundancy and Other Checksums
When you send a sequence of bits from point A to point B, you want to know that it will arrive without error. A common form of insurance is the “parity bit,”attached to 7-bit ASCII characters to put them into 8-bit format. The parity bit ischosen so as to make the total number of one-bits (versus zero-bits) either alwayseven (“even parity”) or always odd (“odd parity”). Any single bit error in a characterwill thereby be detected. When errors are sufficiently rare, and do not occur closelybunched in time, use of parity provides sufficient error detection.
Unfortunately, in real situations, a single noise “event” is likely to disrupt more than one bit. Since the parity bit has two possible values (0 and 1), it gives, onaverage, only a 50% chance of detecting an erroneous character with more than onewrong bit. That probability, 50%, is not nearly good enough for most applications.
Most communications protocols [1] use a multibit generalization of the parity bitcalled a “cyclic redundancy check” or CRC. In typical applications the CRC is 16bits long (two bytes or two characters), so that the chance of a random error goingundetected is 1 in 216 = 65536. Moreover, M -bit CRCs have the mathematicalproperty of detecting all errors that occur in M or fewer consecutive bits, for any

Source: http://physics.njnu.edu.cn/~qryuan/online_data/Numerical_Recipes/f20-02.pdf

isijournal.info

International Science and Investigation Journal ANTIMICROBIAL EFFICACY OF Aloe vera JUICE AGAINST MULTI-ANTIBIOTIC RESISTANT BACTERIA STRAINS IN ABEOKUTA, NIGERIA. *Akinduti Paul Akinniyi. Department of Medical Microbiology & Parasitology, Olabisi Onabanjo Universit,P.M.B.2001, Sagamu , Ogun State, Nigeria. e-mail:[email protected] of Medical Microbiology & Parasi

Chromosome ends and longevity

Chromosome Ends and Longevity Elizabeth Blackburn Department of Biochemistry and Biophysics, University of California San Francisco CA Every cell in our bodies that carries genetic information carries it in the form of 46 chromosomes. Chromosomes in cells carry the genetic information of cells, and every chromosome contains a long linear DNA molecule, with ends that must be protected. Telom

Copyright © 2012-2014 Medical Theses