4    Decisions and Loops: Which Is Bigger? How Many Times?

images 4.1 Why Comparisons?

Computer programs are typically written to be run with a general range of input values. For example, if a program segment required the solution of a quadratic equation of the form

images

the roots may be real or complex, depending on the value of the discriminant

images

VBA is not capable of taking the square root of a negative number. Therefore, a program to solve a quadratic ...

Get Numerical Methods with VBA Programming now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.