Outline for April 13, 2009
Reading: §3.5–3.7
- Biggest and smallest integer
- More about bits
- Show 32 bit maximum, minimum signed integer
- Show largest floating point number that, when added to 1, is ignored
(see eps.py)
- Type conversion review
- Assignment
- Use of float(), int()
- In arithmetic
- Built-in functions
- type()
- range()
- round()
- Math library
- Making library available to program: “import math”
- With above form of inclusion, must prefix with “math.”
- With “from math import *”, don’t need “math.”
- Constants: pi, e
- Functions: log(), log10(), exp(), pow()
- Functions: sin(), cos(), tan(), asin(), acos(), atan(); arg in radians
- Program to compute sin2(x) + cos2(x)
(see trig.py)