Lecture 0 - HW & SW requirements public
Lecture 1 - Introduction public
Lecture 2 - Arithmetic operations public
Lecture 3 - Trigonometric functions public
Lecture 4 - Exponent related functions public
Test Section 2 public
Lecture 5 - Conditionals if elif else public
Lecture 6 - Sequential loops for public
Test Section 3 public
Lecture 9 - Conclusion public
If you see this, something is wrong
To get acquainted with the document, the best thing to do is to select the "Collapse all sections" item from the "View" menu. This will leave visible only the titles of the top-level sections.
Clicking on a section title toggles the visibility of the section content. If you have collapsed all of the sections, this will let you discover the document progressively, from the top-level sections to the lower-level ones.
Generally speaking, anything that is blue is clickable.
Clicking on a reference link (like an equation number, for instance) will display the reference as close as possible, without breaking the layout. Clicking on the displayed content or on the reference link hides the content. This is recursive: if the content includes a reference, clicking on it will have the same effect. These "links" are not necessarily numbers, as it is possible in LaTeX2Web to use full text for a reference.
Clicking on a bibliographical reference (i.e., a number within brackets) will display the reference.
Speech bubbles indicate a footnote. Click on the bubble to reveal the footnote (there is no page in a web document, so footnotes are placed inside the text flow). Acronyms work the same way as footnotes, except that you have the acronym instead of the speech bubble.
By default, discussions are open in a document. Click on the discussion button below to reveal the discussion thread. However, you must be registered to participate in the discussion.
If a thread has been initialized, you can reply to it. Any modification to any comment, or a reply to it, in the discussion is signified by email to the owner of the document and to the author of the comment.
The blue button below that says "table of contents" is your tool to navigate in a publication.
The left arrow brings you to the previous document in the publication, and the right one brings you to the next. Both cycle over the publication list.
The middle button that says "table of contents" reveals the publication table of contents. This table is hierarchical structured. It has sections, and sections can be collapsed or expanded. If you are a registered user, you can save the layout of the table of contents.
Lecture 0 - HW & SW requirements public
Lecture 1 - Introduction public
Lecture 2 - Arithmetic operations public
Lecture 3 - Trigonometric functions public
Lecture 4 - Exponent related functions public
Test Section 2 public
Lecture 5 - Conditionals if elif else public
Lecture 6 - Sequential loops for public
Test Section 3 public
Lecture 9 - Conclusion public
First published on Sunday, Feb 22, 2026 and last modified on Sunday, Feb 22, 2026
Fabienne Chaplais Email
Exponent Related Functions
Now let's see the exponent related functions, with numpy package.
First let's see the natural logarithm and the exponential.
The function log of numpy package is the natural logarithm.
log of 1 is 0 and log of e is 1.
e is the number exponential of 1.
The function exp is the exponential.
exp of 0 is 1, exp of 1 is the number e by definition of e, exp of -1 is 1 over e.
The functions exp and log are mutually reciprocal.
For x positive, exp of log of x is x.
For any real number y, log of x of y is y.
But let's see it in practice.
Launch Anaconda in Spyder and follow me.
First we type 'from numpy import *', in order to have the functions available and the number e.
from numpy import *log of 1 is 0.
log(1)And log of 0? It is minus infinity and we have an error.
log(0)log of 10 is not at all 1.
log(10)But log of the number e, that is given in NumPy, is 1.
log(e)The exponential now.
exp of zero is one.
exp(0)exp of one is so.
exp(1)Is it equal to, equal equal, e? Yes, it's true.
exp(1)==eexp of minus one.
It is so.
exp(-1)Is it equal to one over e? Yes, it's true.
exp(-1)==1/eAnd now exp of log of 3.5.
It is 3.5, it is the same.
exp(log(3.5))And log of exp of a negative number, let's say, minus 3.2.
It is minus 3.2, it is also the same.
log(exp(-3.2))Now let's see the decimal logarithm and powers of 10, the generalized powers of 10.
The function log10 is the decimal logarithm.
Log10 of 1 is 0 and log10 of 10 is 1.
It is the usual logarithm.
The function 10**x is 10 to the power x.
10 to the power 0 is 1, 10 to the power 1 is 10, 10 to the power -1 is 0.1.
And 10 to the power 1/2? is the square root of 10.
The functions power of 10 and log10 are mutually reciprocal.
For x positive, 10 to the power log10 of x is x.
And for any y real number, log10 of 10 to the power y is y.
But let's see it in practice.
Launch and Aconda and Spider and follow me.
First we type from numpy import *.
from numpy import *Log10, the decimal logarithm, of 1 is 0.
log10(1)Log10 of 0, there is an error, it's t is minus infinity.
log10(0)Log10 of 10, the decimal logarithm of 10, is 1. That's why it's called the decimal logarithm.
log10(10)log10 of 100 is 2, because 100 is 10 to the power 2.
log10(100)10 to the power 0 is 1.
10**010 to the power 1 is 10.
10**110 to the power -1 is 0.1.
10**(-1)And 10 to the power 3 is 1,000.
10**310 to the power minus 2 is 0.01.
10**(-2)And 10 to the power one half is so.
10**(1/2)Is it equal to sqrt, the square root, (the square root is also given in numpy) the square root of 10? Yes it's true.
10**(1/2)==sqrt(10)10 to the power decimal logarithm of 5.25.
It is 5.25.
10**(log10(5.25))And log10 of 10 to the power, decimal logarithm of 10 to the power 0.3.
It is 0.3.
log10(10**0.3)What's coming now? What's coming now is the control flows, the conditional if elif else, and the loops for.
