|
Ask A Scientist
Mathematics Archive
|
|
Standard DOS Algebra
Question:
What is the standard way of writing algebraic functions (square roots, X to
the power of, etc.) in standard DOS text?
jason p brechin
Answer:
Operating systems (like DOS) generally do not support any math functions
more complex than +, -, *, and /. It's programming languages where you
find powers, exponentiation, and roots; and the notation varies from
language to language. FORTRAN uses "**" as in x=y**z; C uses a power
function as in x=power(y,z). Roots are, of course, just fractional
powers, but most languages use "SQRT" for square-root as in x=SQRT(y)
because the square-root function is the most commonly used root.
The particular case of "e" to a power is usually denoted x=EXP(y).
In ASCII text you usually see "**" or "^" to denote powers, as in:
x=y**z or x=y^z.
hawley
NEWTON is an electronic community for Science, Math, and Computer Science K-12 Educators.
Argonne National Laboratory, Division of Educational Programs, Harold Myron, Ph.D., Division Director.