I am hoping that you can shed some light on the differences between a definition and an algorithm.

Let’s take an example. Consider the “absolute value” that you learned in elementary school. Is the following a definition of absolute value, or is it an algorithm for computing the absolute value?

|*x*| = (if *x* < 0 then –*x* else *x*)

If it’s a definition, what would an algorithm look like?

If it’s an algorithm, what would a definition look like?

### Like this:

Like Loading...

*Related*

Tags: absolute value, algorithm, definition, difference, understanding

This entry was posted on April 2, 2016 at 2:05 pm and is filed under Uncategorized. You can follow any responses to this entry through the RSS 2.0 feed.
You can leave a response, or trackback from your own site.

## Leave a Reply