# Register now to access 7 million high quality study materials (What's Course Hero?) Course Hero is the premier provider of high quality online educational resources. With millions of study documents, online tutors, digital flashcards and free courseware, Course Hero is helping students learn more efficiently and effectively. Whether you're interested in exploring new subjects or mastering key topics for your next exam, Course Hero has the tools you need to achieve your goals.

7 Pages

### Intro1

Course: PHYSICS 509, Fall 2008
School: Rutgers
Rating:

Word Count: 583

#### Document Preview

Physics- KH Computational 2009 Introduction Roundoff error Every data in a computer is a collection of bits (zeros and ones). 8 bits = byte KB=Kbyte = 210 byte=1024byte MB=Mbyte = 220 byte=1048576bytes GB=Gbyte = 230 byte=1073741824byte !! When you buy a computer with 1GB of ram, you get only 109 /230 = 0.93 GB of memory There are two classes of types used by computer: a) xed point (integer and long) and a)...

Register Now

#### Unformatted Document Excerpt

Coursehero >> New Jersey >> Rutgers >> PHYSICS 509

Course Hero has millions of student submitted documents similar to the one
below including study guides, practice problems, reference materials, practice exams, textbook help and tutor support.

Course Hero has millions of student submitted documents similar to the one below including study guides, practice problems, reference materials, practice exams, textbook help and tutor support.
Physics- KH Computational 2009 Introduction Roundoff error Every data in a computer is a collection of bits (zeros and ones). 8 bits = byte KB=Kbyte = 210 byte=1024byte MB=Mbyte = 220 byte=1048576bytes GB=Gbyte = 230 byte=1073741824byte !! When you buy a computer with 1GB of ram, you get only 109 /230 = 0.93 GB of memory There are two classes of types used by computer: a) xed point (integer and long) and a) oating point (oat, double,complex,...) Kristjan Haule, 2009 1 KH Computational Physics- 2009 Introduction Aritmetics with integer is exact ( except when overow occurs) Most of computers are now 32bit (exception are new opterons and some other supercomputer machines with 64bit processors). The natural unit (integer), is 32bit=4byte. Since int needs also sign (takes one bit) it has the range from 231 to 231 1. The example computer program shows you the limits of some of the most often used types. output is Kristjan Haule, 2009 2 KH Computational Physics- 2009 Introduction Aritmetics with oating point numbers is not exact causing many difcultis. In modern computers, the oating point is presented as Sign M antisa Exponent. The largers and the smallest oating point number depends on the type. Most often we will use double, which needs 8bytes=64bits and can store numbers between 2.22507e-308 to 1.79769e+308. The overow error occurs if we want to store x carefull (1/0!!). x < 2.22507 10308 . This is usually not so crucial, although it occurs if one is not > 1.79769 10308 and underow when The rundoff error occurs when : 1+ == 1. For double on 32 bit machine, it occurs around (only!) program!) The rundoff error makes bad algorithms unstable 1016 . (Check the simple example Example: Calculation of spherical Bessel function j(x) with upward and downward recursion. Kristjan Haule, 2009 3 KH Computational Physics- 2009 Introduction Spherical bessel functions are solutions of V = 0 radial equation (1) 1 Schroedinger d2 l(l + 1) + [rRl (r)] = E[rRl (r)] 2 dr2 2r2 and satisfay the following recursion relation jl+1 (x) = 2l + 1 jl (x) jl1 (x). x (2) A three term linear recursion relation two solutions jl (x) and nl (x). If l x, nl (x) is larger than jl (x). For large l and small x the upward recursion does not work. Millers algorithm: Use recursion in the opposite direction to get jl (x) at large l and small x. We also know j0 (x) = sin(x) x j1 (x) = sin(x) cos(x) 2 x x (3) therefore upward recursion is straighforward. Here is the code: Kristjan Haule, 2009 4 KH Computational Physics- 2009 Introduction Few points: The code MUST HAVE enough comments (50/50) The singular points needs to be treated separately (Taylor expansion) lstart = l + 3 l. Starting values jlstart and jlstart 1 are not important. Good guess is 0 and 1, respectively. We always need to continue down to l = 0 and using j0 (x) normalize the result. Kristjan Haule, 2009 5 Downward recursion starts from sufciently higher lstart than desired l. Good choice is KH Computational Physics- 2009 Introduction Here is the code: Few points: To c...

Find millions of documents on Course Hero - Study Guides, Lecture Notes, Reference Materials, Practice Exams and more. Course Hero has millions of course specific materials providing students with the best way to expand their education.

Below is a small sample set of documents:

Rutgers - PHYSICS - 627
Surface and Interface Science Physics 627; Chemistry 541 Lectures 11 Oct. 7 2008 Intro to Electronic Properties: Work Function,Thermionic Electron Emission, Field EmissionReferences: 1) Woodruff &amp; Delchar, Pp. 410-422; 461-484 2) Zangwill Pp. 57 63
Rutgers - PHYSICS - 627
Rutgers - PHYSICS - 507
Bibliography[1] Howard Anton. Elementary Linear Algebra. John Wiley, New York, 1973. QA251.A57 ISBN 0-471-03247-6. [2] V. I. Arnold. Math. Methods of Classical Mechanics. Springer-Verlag, New York, 1984. QA805.A6813. [3] R. Creighton Buck. Advanced
Rutgers - PHYSICS - 627
Surface science lecture 9/30/2008 MEIS Medium Energy Ion Scattering a. Surface crystallography with ion beams b. High resolution depth profilingAdvantages of ion beams Penetrating (can access buried interfaces!) Mass specific Known interaction
Rutgers - PHYSICS - 627
Rutgers - PHYSICS - 509
KHComputational Physics- 2006QMCParallel programming1 OverviewMost widely accepted technique for parallel programming is so called:MPI=Message Passing Interface.This is not a package or program, but rather a standardized collection of r
Rutgers - PHYSICS - 627
Surface and Interface Science Physics 627; Chemistry 541 Lectures 2 Sept 5, 2008 Thermodynamics of Surfaces; Equilibrium Crystal ShapeReferences: 1) Zangwill, Chapter 1 2) A.W. Andersen, Physical Chemistry of Surfaces, Fifth Edition (J. Wiley, New Y
Rutgers - PHYSICS - 627
Surface and Interface Science Physics 627; Chemistry 541 Lectures 3 Sept 9 2008 Surface StructureReferences: 1) 2) 3) 4) 5) 6) Zangwill, Pp. 28 - 32 Woodruff &amp; Delchar, Chapter 2 Masel, Chapter 2 Ertl &amp; Kuppers, 201-207 Luth, 78 94 Attard and Barn
Rutgers - PHYSICS - 509
KHComputational Physics- 2006Basic Numerical AlgorithmsInterpolationThe objective is to nd value of the function at any point x if one has values fi tabulated at certain points xi . Most straightforward (never dramatically fails) and safe met
Rutgers - PHYSICS - 509
KHComputational Physics- 2006ProgrammingShort test of C+ knowledge What is a class? What is virtual function? What is template? What means explicit?class A{ int a; public: explicit A(int a); }; What is implicit type conversion? What is
Rutgers - PHYSICS - 509
KHComputational Physics- 2006Second QuantizationSecond Quantization First quantization in physics refers to the property of particles that certain operators donot commute[x, px ] = i h [Lx , Ly ] = i Lz hIn the rst quantization formalism,
Rutgers - PHYSICS - 509
KHComputational Physics- 2009Optimal use of hardware &amp; softwarePython tricks to speedup the codeWith numpy and scipy package, Python is one of the best languages for numerics. But, its slow! Not, if combined with C+/Fortran! The idea: Write m
Rutgers - PHYSICS - 509
KHComputational Physics- 2006Hartree-Fock MethodHartree-FockIs one of the simplest methods to the many electron problem. The dynamic problem is replaced by an effective one-electron problem: electron is moving in an effective static potential
Rutgers - PHYSICS - 203
Chapter 6: Applications of Newtons Laws15. Picture the Problem: The bucket is lifted straight upward due to the tension in the rope.Strategy: There are two forces acting on the bucket, the rope tension T acting straight upward and the force of grav
Rutgers - PHYSICS - 389
Statistical Analysis of DataRobert DeSerio University of Florida Department of Physics PHY4803L Advanced Physics Laboratoryremain the same. For various reasons, the measurements will not all be the same and a frequency distribution (see Fig. 1) i
Rutgers - CS - 671
Control Software in an AUVHans Christian Woithe hcwoithe@cs.rutgers.eduAUVsAUV ApplicationsMilitary Mine hunting Anti-Submarine Warfare Special forces support Intelligence/Surveillance/Reconnaissance Detect Radiation Generate detailed
Rutgers - CS - 671
CS671: Programming Architectures for Cyber-Physical SystemsFriday 2:00-5:00pm CoreA Ulrich KremerDepartment of Computer Science Rutgers UniversityWhat is a Cyber-Physical System?Applications for cyber-physical systems can be found in health care
Rutgers - CS - 671
CS 671 Graduate Seminar Challenge Problem 2 Sample Solution UD/DU Chains and Constant PropagationExtend constant propagation algorithm discussed in class to only propagate constants from code regions that are not dead code. Here is the outline of on
Rutgers - CS - 671
CS 671 Graduate Seminar Challenge Problem 1 Local Common Subexpression EliminationIn lecture 2, we talked about the DAG construction algorithm for local common subexpression elimination. Show the DAG for the following piece of code 1. 2. 3. 4. 5. a
Rutgers - CS - 671
CS 671 Graduate Seminar Challenge Problem 2 UD/DU Chains and Constant PropagationExtend constant propagation algorithm discussed in class to only propagate constants from code regions that are not dead code.Lattices and MFP1. Show that the bit-ve
Rutgers - FO - 1975
Bi r i c B d f b dd i t v e b d SF&quot; `#U f b x Sx Sh Rb gb b c b b i W f @ x w b i 3 &amp; 3 9 ! #4 !a v `) b &quot;f Xd c t 0 'ab d i x bi qi E h b f f i b S 0 y1
Rutgers - PHYSICS - 681
Rutgers - PHYSICS - 382
Michigan - HIST - 220
Michigan - HIST - 220
History 220: England to 1688Fall Term, 2003Study Questions for the Mid-Term Exam Four of the following questions will be on the mid-term exam. You will be asked to write essays responding to two of them. You will also be asked to identify and brie
Rutgers - MC - 504
ReviewsSynthethic MethodsK. C. Nicolaou et al.Metathesis Reactions in Total SynthesisK. C. Nicolaou,* Paul G. Bulger, and David SarlahKeywords: alkene metathesis alkyne metathesis enyne metathesis natural products total synthesisDedicat
Rutgers - ECON - 394
Statement of John P. Freeman Professor of Law, University of South Carolina Law SchoolBefore the Senate Governmental Affairs Subcommittee on Financial Management, the Budget, and International Security January 27, 2004No issuer of securities is su
Rutgers - ECON - 514
Economics 514 Financial Economics Fall 2007 Bruce Mizrach 303b NJ Hall x2-8261 Oce Hours: TBA mizrach@econ.rutgers.edu snde.rutgers.edu/Rutgers/Econ514/econ514_fall_2007.htmlCourse Motivation: The class will be run like a seminar with required stud
Rutgers - ECON - 514
Journal of Financial Econometrics, 2004, Vol. 2, No. 4, 493530A New Approach to Markov-Switching GARCH ModelsMARKUS HAAS University of Munich STEFAN MITTNIK University of Munich, Center for Financial Studies, and Ifo Institute for Economic Researc
Rutgers - ECON - 394
http:/www.nypost.com/php/pfriendly/print.php?url=http:/www.nypost.COME CLEAN, BEN!By JOHN CRUDELE July 27, 2006 - FEDERAL Reserve Chairman Ben Bernanke revealed that the secretive Plunge Protection Team meets several times a year, but he dodged a
Rutgers - E - 148
RUTGERS COOPERATIVE EXTENSIONNEW J ERSEY AGRICULTURAL E XPERIMENT STATIONNew Jersey4-HLeader Training SeriesWorking with 4-H Youth in 4th to 6th GradesYouth in 4th, 5th and 6th grades are involved in standard 4-H clubs, as well as in-schoo
Rutgers - E - 148
4-H Policy and Procedure for Staffing with VolunteersSAMPLE 4-H Volunteer Position DescriptionPOSITION TITLE: 4-H Club Organizational LeaderPURPOSE: Provide overall leadership for organizing a 4-H club by coordinating the efforts of youth, leader
Rutgers - E - 148
Introduction IntroductionThe New Jersey 4-H Leader Training Series was developed by the NJ Department of 4-H Youth Development Adult Volunteer Training and Support Committee as the result of: an expressed need of 4-H volunteers and salaried sta
Rutgers - E - 148
New Jerse sey New Jersey 4-H Leader Training SeriesGlossary Glossary4-H.the youth development program of Rutgers Cooperative Extension. 4-H Form.must be completed and submitted to county 4-H office by all adult 4-H Adult Volunteer Registration For
Rutgers - E - 148
RUTGERS COOPERATIVE EXTENSIONNEW JERSEY AGRICULTURAL E XPERIMENT STATIONProject Selection Worksheet #2Projects 4-H Projects That Look Interesting To MeName Instructions As you and your parents review different project materials, list the ones t
Rutgers - E - 148
RUTGERS COOPERATIVE EXTENSIONNEW J ERSEY AGRICULTURAL E XPERIMENT STATIONNew Jersey4-HLeader Training SeriesRunning a Smooth 4-H Business MeetingOrder The Order of a Business Meeting4-H club officers conduct a 4-H business meeting with as
Rutgers - E - 148
New Jersey 4-H Event Release/Agreement Form for Adults4H103Both sides of this form must be completed and signed by all adults participating in 4-H overnight activities, field trips, and events requiring group transportation where youth are presen
Rutgers - E - 148
RUTGERS COOPERATIVE EXTENSIONNEW J ERSEY AGRICULTURAL E XPERIMENT STATIONNew Jersey4-HLeader Training SeriesLearn by Doing the 4-H WayPutting a Slogan into PracticeLearn by doing is a commonly used expression in 4-H. Indeed, the 4-H progra
Rutgers - E - 148
RUTGERS COOPERATIVE EXTENSIONNEW J ERSEY AGRICULTURAL E XPERIMENT STATIONNew Jersey4-HLeader Training SeriesSamples of Excellent 4-H by Stories Written by 4-Hers 4-HersExample of a multi-project story that indicates personal growth and ski
Rutgers - E - 148
RUTGERS COOPERATIVE EXTENSIONNEW J ERSEY AGRICULTURAL E XPERIMENT STATIONNew Jersey4-HLeader Training Seriesearly Planning a Yearly CalendarPlanning ahead is the key to a successful 4-H club. It provides a structure that your members can d
Rutgers - E - 148
RUTGERS COOPERATIVE EXTENSIONNEW J ERSEY AGRICULTURAL E XPERIMENT STATIONNew Jersey4-HLeader Training SeriesGUIDELINES FOR 4-H FUNDRAISINGFundraising is one of the major ways to help 4-H clubs financially support their activities. By raisi
Rutgers - E - 148
4-H Club Member Registration FormFor Office Use Only Club Code: _ Member Code: _ Use this form to register as a new 4-H member. Or, you can use the form to tell us any changes in information about yourself, like a new address, new club, or new proje
Rutgers - E - 148
RUTGERS COOPERATIVE EXTENSIONNEW J ERSEY AGRICULTURAL E XPERIMENT STATIONNew Jersey4-HLeader Training SeriesDevising Devising a 4-H Club ConstitutionWhy does a 4-H club need a constitution? For the same reasons our country needs one! By ha
Rutgers - E - 148
RUTGERS COOPERATIVE EXTENSIONNEW J ERSEY AGRICULTURAL E XPERIMENT STATIONNew Jersey4-HLeader Training SeriesCharacter Development in 4-H4-H is NOT about winning. Its NOT about doing better than others. 4-H IS about doing the best you can.
Rutgers - E - 148
RUTGERS COOPERATIVE EXTENSIONNEW J ERSEY AGRICULTURAL E XPERIMENT STATIONNew Jersey4-HLeader Training SeriesPositive for Discipline for ChildrenWorking with youth, especially other peoples children, can be a challenge. While some children
Rutgers - E - 148
RUTGERS COOPERATIVE EXTENSIONNEW J ERSEY AGRICULTURAL E XPERIMENT STATIONNew Jersey4-HLeader Training SeriesBringing the World Closer to Youth in Your ClubGoals of Global Education 4-H Programs ProgramsToday it is important to relate to o
Rutgers - E - 148
RUTGERS COOPERATIVE EXTENSIONNEW J ERSEY AGRICULTURAL E XPERIMENT STATIONNew Jersey4-HLeader Training SeriesPlanning a Successful Field TripDevelop for Develop a plan for 4-H project project learning activitiesField trips can be a great c
Rutgers - E - 148
RUTGERS COOPERATIVE EXTENSIONNEW J ERSEY AGRICULTURAL E XPERIMENT STATIONNew Jersey4-HLeader Training SeriesWorking With Leaders Teen LeadersMany 4-H teens want to become leaders in the 4-H program so they can share what they know learn
Rutgers - E - 148
RUTGERS COOPERATIVE EXTENSIONNEW J ERSEY AGRICULTURAL E XPERIMENT STATIONNew Jersey4-HLeader Training SeriesRecreation/ Play Creative PlayRecreation can be a highlight of your 4-H club meeting, depending on how you conduct it. Creative pla
Rutgers - E - 148
RUTGERS COOPERATIVE EXTENSIONNEW J ERSEY AGRICULTURAL E XPERIMENT STATIONNew Jersey4-HLeader Training SeriesWhat is 4-H?4-H is the youth development program of Rutgers Cooperative Extension. As a 4-H volunteer and part of the county volunt
Rutgers - E - 148
RUTGERS COOPERATIVE EXTENSIONNEW J ERSEY AGRICULTURAL E XPERIMENT STATIONNew Jersey4-HLeader Training SeriesSelecting The 4-H Volunteer Role Right For YouBeing part of the 4-H Youth Development program means not only that you help young pe
Rutgers - CS - 314
PLP 2e Errata10/15/2007 10:43 PMPLP 2e ErrataAs of January 2007 Programming Language Pragmatics is in the second printing of its second edition. To tell which printing you have, check the copyright page. Right above the box at the bottom of the
Rutgers - CS - 314
Cs314 Fall 2007 Midterm 250200median=149 60% of highest grade = 134 average=151midterm grade1501005001 3 5 7 9 11 13 15 17 19 students 21 23 25 27 29 31 33 35 37
Rutgers - CS - 314
Types-2 More on aggregate types Subtypes Union types More on pointer/reference types Type equivalence Structural Name Type equivalence in C Strings Enumeration typesStrings PLs can include strings either as a data type (Algol68) or build
Rutgers - CS - 314
Python - a Scripting PL Taking stock - Prolog vs Scheme Scripting PLs - properties Python Lexical scope Built-in datatypes and their operationsScripting PLs, CS314 Fall 2007 BGRyder1Taking StockDatatypes Prolog Numbers, Literals, Lists,
Rutgers - CS - 314
Python - 2 Walking a directory structure Using the os module Using regular expressions Using the re module Forming regular expressions Doing replacement for regular expressions Forming patterns from regular expressionsPython-2, CS314 Fall 2
Rutgers - CS - 314
Python Basic statements Functions Exceptions Iterators How best to provide them? How to use them? Generators - generalizing iteratorsMany examples from OReilly Learning Python, 2nd Ed, 2003 Or online Python tutorial at python.orgPython, CS3
Rutgers - CS - 314
Functional Programming Pure functional PLs S-expressions cons, car, cdr Defining functions read-eval-print loop of Lisp interpreter Examples of recursive functions Shallow, deep Equality testingFunctional Programming, CS314 Fall 2007 BGRy
Rutgers - CS - 314
A T u t o r i a l on ALGOL 68ANDREW S. TANENBAUMVakgroep Informatica, Wiskund~g Seminarium, Vrije Universiteit, de Boelelaan 1081, Amsterdam, The NetherlandsThis paper is an introduction to the main features of ALGOL68, emphasizing the novel fea
Rutgers - CS - 314
Parameter Passing MethodsProcedural abstraction Parameter passing methods pass pass pass pass by by by by value result value-result reference aliasing pass by name Procedures/functions as argumentsParamPassing, CS314 Fall 2007 BGRyder 1
Rutgers - CS - 314
Prolog - 3 Append on lists Generate and test paradigm n Queens example Unification Informal definition: isomorphism Formal definition: substitutionProlog-3, CS314 Fall 2007 BGRyder1Prolog Nomenclature Unification: (variable bindings) s