Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Replies: 49   Last Post: Jan 13, 2012 2:37 PM

 Messages: [ Previous | Next ]
 kirby urner Posts: 3,690 Registered: 11/29/05
Posted: Dec 10, 2011 5:14 PM

Lets think more about how to marry Dolciani type
math functions with the mundane workaday print( ),
called a function by those who use it.

>>> print("Hello","world")
Hello world

What's interesting about computer based math is
you have a more complicated geography than just
a piece of paper. One has an interactive surface,
or surfaces listing instructions. Where do results
display? We have left the simple ecosystem of
paper and pencil.

The print( ) function is defined to send "strings"
to "the console". A "string" is a type of object,
like an integer or floating point number. Math
already focuses on objects having type. An object
of the triangle type has three angles, while an
object of the integer type may engage in (or "has")
various binary operations with other integers.

Focusing on "the console" for a sec: why don't
mathematicians have to care about their media more,
like artists? Why is the notation so unaware of
"devices"? One could say a musical score is unaware
of instruments, in the sense that the instrument
is already assumed. On the other hand, music
notation is quite instrument-aware and knows of
geography. Orchestras have left and right. Music
has location.

School math textbooks already assume an environment
of workbook, notebook, showing work, answers, doing
exercises. Published math does have to worry about
location in other respects. In Wolfram's 'A New Kind
of Science' we find meticulous use of figure and
page numbers to keep the reader oriented.

Mathematica may then be added, and the full
technology of a computer keyboard and console
(i/o devices).

>>> print("Education","Mafia", sep=str())
EducationMafia

Here the function has been modified, not just by
different string inputs, but by what's called a
keyword argument. str() is actually another
function-like piece of notation, in that it may be
imagined to 'return' (stand for, evaluate to)
an 'empty string' (like an empty set, but a string
object).

sep is short for "separator" and here we see the
effect: "Education" and "Mafia" come out conjoined,
as one string, because the default separator, a
single space, has been over-written by the new
value, str().

Do we have a domain and range, ala Dolciani? I would
argue that we do. Mathematics has its conditionals.
"Do this if x is negative", "do that if x is positive".

The sep argument may be seen as providing a rule,
whether explicitly invoked or not. The full
explanation of print( ) requires attention to
this rule.

print( ) also has an end= option, which may be used
to govern how a the printed string ends, by default
with a new line, and a file= option, for sending
strings somewhere else besides the console.

Is print( ) still a function then, in the mathematical
sense?

I would argue yes, in that the inputs determine the
output. One may model its behavior in terms of
(domain, range) pairs, or (before, after) if thinking
in terms of time.

A function is like a verb between two states, an
alias for a transformation. Mathematics should not
pretend innocence of a time dimension, this late
in the game.

Obviously print( ) is but one of a small vocabulary
will be defining our own functions quite soon, using
any pre-defined functions as available grist, as
components.

Our functions will grow quite sophisticated, like
biological creatures, and will then morph, evolve,
into other types of object, some of which "eat"
(consume) arguments, just as functions do.

Welcome to STEM.

Kirby

Date Subject Author
12/11/11 kirby urner
12/12/11 Dan Christensen
12/12/11 kirby urner
12/12/11 Dan Christensen
12/13/11 kirby urner
12/13/11 Dan Christensen
12/13/11 kirby urner
12/13/11 Dan Christensen
12/13/11 kirby urner
12/13/11 Joe Niederberger
12/13/11 Dan Christensen
12/13/11 kirby urner
12/13/11 Dan Christensen
12/15/11 Joe Niederberger
12/15/11 kirby urner
12/15/11 Joe Niederberger
12/15/11 kirby urner
12/15/11 Joe Niederberger
12/15/11 kirby urner
12/15/11 Joe Niederberger
12/15/11 kirby urner
12/15/11 Joe Niederberger
12/15/11 kirby urner
12/16/11 Joe Niederberger
12/16/11 kirby urner
12/16/11 Dan Christensen
12/16/11 Joe Niederberger
12/17/11 Joe Niederberger
12/17/11 kirby urner
12/17/11 Dan Christensen
12/18/11 Wayne Bishop
12/18/11 Joe Niederberger
12/18/11 kirby urner
12/23/11 Dan Christensen
12/23/11 Wayne Bishop
12/24/11 Louis Talman
12/23/11 Joe Niederberger
12/23/11 kirby urner
12/23/11 Wayne Bishop
12/24/11 Joe Niederberger
12/24/11 Wayne Bishop
12/24/11 Joe Niederberger
12/24/11 kirby urner
12/24/11 Joe Niederberger
12/24/11 Wayne Bishop
12/24/11 Dan Christensen
12/25/11 Dan Christensen
12/25/11 Dan Christensen
1/13/12 Joe Niederberger
1/13/12 kirby urner