Class Notes (839,541)
York University (35,591)
EECS 1540 (3)
all (3)
Lecture

# Lecture-02.3.doc

2 Pages
154 Views

Department
Electrical Engineering and Computer Science
Course Code
EECS 1540
Professor
all

This preview shows 80% of the first page. Sign up to view the full 2 pages of the document.
Description
CSE 1540.03 Week 2.3 September 16, 2011 Arithmetic Expressions in Fortran - Convert two-dimensional mathematical notation to one-dimensional computer notation Assignment Statement Example: variable = expression 2 − b + b − 4ac 2a Examples: becomes: i = 1 the two most common (-b + sqrt(b*b – 4*a*c))/(2*a) i = i + 1 assignment statements c = 5*(f-32)/9 Built-in Functions (see Appendix 3 of textbook) x = 2.5 Elementary Math y = sin(x) + 3.14159 sqrt(x) square root () z = x / 10 x exp(x) exponential e ) n = m / 10 gives quotient from integer long division abs(x) absolute value alog(x) natural logarithm (base, ln) Worries: alog10(x) base 10 log - unassigned variables Trigonometric Functions - type conversion (on assignment) sin(x) sine of angle x in radians cos(x) cosine of angle x in radians x = i (real← integer) O.K. i = x (integer real) loses fraction part atan(x) arctangent of angle x in radians asin(x) arcsine of angle x in radians … CSE 1540 Week 2.3 – September 16, 2011 page 1 of 2 sinh(x) hyperbolic sine
More Less

Only 80% of the first page are available for preview. Some parts have been intentionally blurred.

Unlock Document

Unlock to view full version

Unlock Document
Me

OR

Join OneClass

Access over 10 million pages of study
documents for 1.3 million courses.

Join to view

OR

By registering, I agree to the Terms and Privacy Policies
Just a few more details

So we can recommend you notes for your school.