floor(x) and ceiling(x)

Simon Woodhead writes:

Floor and ceiling functions are not available in the current version of Autograph, but will be in a future version. The y = int(x) function is actually a truncation function so int(-3.2) = -3 and int(3.2) = 3. This is not the most useful function, but can be used to define ceiling and floor functions.

Open a 2D graph page and click on Function Definitions. Define:
  f(x) = ((int(x) + |int(x)|) + (int(x − 1) − |int(x − 1)|))/2
  g (x) = f(x) + 1
Then f(x) is the floor function and g(x) is the ceiling function.

floot

Advertisements
Post a comment or leave a trackback: Trackback URL.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s