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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.