SLIDE 1
CPSC 3200 Practical Problem Solving University of Lethbridge
✬ ✫ ✩ ✪
Some Basics
- Use integer arithmetic as much as possible.
- When using floating-point variables, compare by fabs(a-b) < EPS.
- Use some “small” EPS (e.g. 1e-8).
- Be aware of degrees vs. radians.
- There are many special cases: parallel lines, colinear points, point on a
line, etc.
- Often solves linear or quadratic equations in two unknowns (2D).
- Reduce problem to previously solved problems.