CPSC Pascal Brent M. Dingle Texas A&M University Chapter 3

Slides:



Advertisements
Similar presentations
Differentiation of the Exponential Function (e x ) and Natural Logarithms (lnx) Exponential function e x.
Advertisements

Arithmetic in Pascal (2) Arithmetic Functions Perform arithmetic calculations Gives an argument to the function and it returns the result.
Maths & Trig, Statistical functions. ABS Returns the absolute value of a number The absolute value of a number is the number without its sign Syntax ◦
Logarithmic Equations Unknown Exponents Unknown Number Solving Logarithmic Equations Natural Logarithms.
CSE 246: Computer Arithmetic Algorithms and Hardware Design Instructor: Prof. Chung-Kuan Cheng Fall 2006 Lecture 11 Cordic, Log, Square, Exponential Functions.
Solving equations involving exponents and logarithms
Exponential Functions Intro. to Logarithms Properties.
( ) EXAMPLE 1 Evaluating Square Roots a. 36 = 6 6 because 2 = 36 . b.
8.5 Natural Logarithms. Natural Logarithms Natural Logarithm: a natural log is a log with base e (the Euler Number) log e x or ln x.
Exponential FunctionsLogarithms Properties of Logarithms Natural Logarithms Solving Exponential Equations
3.3 Properties of Logarithms Change of Base. When solve for x and the base is not 10 or e. We have changed the base from b to 10. WE can change it to.
Builtin and user defined functions
1 Logarithms Definition If y = a x then x = log a y For log 10 x use the log button. For log e x use the ln button.
Chapter 3.4 Properties of Log Functions Learning Target: Learning Target: I can find the inverses of exponential functions, common logarithms (base 10),
Chapter The Natural base, e.
Aim: How do we solve exponential and logarithmic equations ? Do Now: Solve each equation: a. log 10 x 2 = 6 b. ln x = –3 Homework: Handout.
Natural Exponents and Logs Exponential and Logarithmic Equations.
5-4 Exponential & Logarithmic Equations
Section 4.5 Exp. & Log Equations
1 Functions ผศ. ดร. อนันต์ ผลเพิ่ม Anan Phonphoem
a) y = 3 x b) y = -3 x c) y = (1/2) x d) y = -(1/2) x.
JEOPARDY! Graphing Quadratics Graphing Solving using Square Roots Discriminants GO TO FINAL.
CSC Programming for Science Lecture 7: Math Functions.
Natural Logarithms.
( + ) ÷ ( + ) = ( + ) ( – ) ÷ ( – ) = ( + ) Simplify the following. ( + ) ÷ ( – ) = ( – ) ( – ) ÷ ( + ) = ( – ) 1) – 54 ÷ ( – 9 )= 6 2) – 48 ÷ 6= – 8 3)
Approximating a Square Root Approximate to the nearest integer. Example 2 The perfect square closest to, but less than, 51 is 49. The perfect square closest.
Solving Logarithmic Equations TS: Making decisions after reflection and review. Obj: Be able to solve equations involving logarithms Warm-Up: Solve for.
Arithmetic Expressions Russell Taylor NC Computing Software Application Development.
Introduction to Matlab
Visual Basic I Programming
1 Ordinal types An ordinal data type is an ordered set in which every element, except the first element, has an immediate predecessor, and every element,
Aim: Log Products & Quotients Course: Alg. 2 & Trig. Aim: How do we use logarithms to find values of products and quotients? Do Now: Evaluate to prove.
Learn to estimate square roots and solve problems using square roots.
Chapter 5: Exponential and Logarithmic Functions 5.5: Properties and Laws of Logarithms Essential Question: What are the three properties that simplify.
3.3 Properties of Logarithms Change of base formula log a x =or.
Properties of Logs Objective: Be able to use the properties of logarithms to expand and condense expressions. TS: Make decisions after reflection and review.
 The logarithmic function log b (x) returns the number y such that b y = x.  For example, log 2 (8) = 3 because 2 3 = 8.  b is called the base of the.
Unit 3 Test Review – Identifying Parent Functions October 30, 2014.
Warm-Up 1) Use log 3 5 = and log 3 6 = to approximate log ) Condense 7 log log 4 x + 3 log 4 y.
Remarks on Fast Exp (4/2) How do we measure how fast any algorithm is? Definition. The complexity of an algorithm is a measure of the approximate number.
Logarithms Common Logarithms Integer Logarithms Negative Logarithms Log of a Product Log of a Quotient Log of an Exponential Natural Logarithms.
4.2 Logarithms. b is the base y is the exponent (can be all real numbers) b CANNOT = 1 b must always be greater than 0 X is the argument – must be > 0.
Warm Up Simplify. x 3w z x – 1 1. log10x 2. logbb3w 3. 10log z
Natural Logarithms/Base e Unit 9. Definition The exponential function is called the natural exponential function and e is called the natural base.
CSE 110: Programming Language I Afroza Sultana UB 1230.
Fall 2001(c)opyright Brent M. Dingle 2001 Multidimensional Arrays Brent M. Dingle Texas A&M University Chapter 10 – Section 2, part B (and some from Mastering.
Logarithmic Functions
Chapter 5 Review JEOPARDY -AP Calculus-.
Warm Up WARM UP Evaluate the expression without using a calculator.
Ch. 3 – Exponential and Logarithmic Functions
Examples Solving Exponential Equations
SOLVING (expand and condense)
College Algebra Chapter 4 Exponential and Logarithmic Functions
Math Library and IO formatting
Functions October 23, 2017.
Square Root.
Worksheet Key 1/2/2019 9:28 PM Solving Exp and Log Equations.
Exponential Functions Intro. to Logarithms Properties of Logarithms
Exponential and Logarithmic Functions
Properties of logarithms

Estimate Roots Lesson #9 Pg. 241.
Estimate Roots Lesson #9 Pg. 241.
Warm Up  .
Brent M. Dingle Texas A&M Directory Structure
Section 5.5 Additional Popper 34: Choice A for #1 – 10
Exponential and Logarithmic Functions
Exponential and Logarithmic Functions
Property #1 – Product Property log a (cd) =
Jeopardy Final Jeopardy Cubes Cube Roots Squares Sq. Roots $100 $100
Presentation transcript:

CPSC 110 - Pascal Brent M. Dingle Texas A&M University Chapter 3 Finishing Chapter 3 CPSC 110 - Pascal Brent M. Dingle Texas A&M University Chapter 3

Predefined Functions Pascal, like most programming languages, offers a set of predefined functions. Unfortunately not all languages offer the same set of predefined functions. Some functions Pascal offers are: sqrt(x); - returns the square root of x abs(x); - returns the absolute value of x round(x) - rounds x to the nearest integer trunc(x) - truncates x to the nearest integer sqr(x) - returns x squared (i.e. x*x)

Natural Logarithm and e Pascal also offers the predefined functions: ln(x) exp(z) ln(x) returns the natural log of x. aside: natural log is log base e where e is approximately 2.71828. exp(z) returns e raised to the z power

ln and exp trick Suppose you wanted to set z = xy. We know xy = (eln(x))y = ey*(ln(x)). And ey*(ln(x)) = exp(y*ln(x)). So to set z = xy, we would say: z := exp( y * ln(x) );

End Predefines and ln and e