Search All of the Math Forum:

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

Topic: Help with creating a function
Replies: 12   Last Post: Nov 19, 2013 3:48 AM

 Messages: [ Previous | Next ]
 Richard Tobin Posts: 1,436 Registered: 12/6/04
Re: Help with creating a function
Posted: Nov 18, 2013 7:03 AM

In article <ugnj89poilcj8f2uot0qjhqnk8um0dhmjp@4ax.com>,
quasi <quasi@null.set> wrote:

> f(x) = ((x-1)*(((2*x-1)/abs(2*x-1))+1)/2)+1

Extracting the more generally useful function out of this,

(x-0.5) / abs(x-0.5)

is 1 for integer x > 0, -1 for integer x <= 0

Using Knuth's [] notation, the original function can be written as

x + [x=0]

See http://arxiv.org/abs/math/9205211 (which coincidentally has some
comments on the definedness of 0^0).

-- Richard

Date Subject Author
11/18/13 Robert Crandal
11/18/13 quasi
11/18/13 Robert Crandal
11/18/13 quasi
11/18/13 David Hartley
11/18/13 quasi
11/18/13 Roland Franzius
11/18/13 quasi
11/18/13 quasi
11/19/13 quasi
11/18/13 Richard Tobin
11/18/13 Stuart M Newberger
11/18/13 Peter Percival