Date: Nov 20, 2013 4:27 AM
Author: Jussi Piitulainen
Subject: Re: Help with formula (revised question)
William Elliot writes:

> On Wed, 20 Nov 2013, Robert Crandal wrote:

>

> > Here is the new data set:

> >

> > X Y

> > -- --

> > 0.0 1

> > 0.1 1

> > 0.5 1

> > 0.9 1

> > 1.0 1

> > 1.03 2

> > 1.5 2

> > 1.8 2

> > 2.0 2

> > 2.3 3

> > 3.0 3

> > 3.2 4

> >

> > Can this data be represented with a formula

> > that only uses either addition, subtraction,

> > multiplication, division, modulus, or the power (^)

> > function, or any combination of these?

>

> No, the function is ceiling x = -floor -x. It's a well accepted

> function even availible in some computer languages. Before

> computers, mathematicians used [x] for the greatest interger <= x,

> which computer languages call floor or int(), as in basic.

Define "x mod y" for arbitrary reals, y not 0, by

x mod y = x - y * floor(x/y)

and pretend this is what the question referred to as "modulus"[1]. It

probably isn't, but for a moment, pretend.

Then x mod 1 is the fractional part, floor(x) = x - (x mod 1) and:

ceiling(x) = -floor(-x)

= -((-x) - ((-x) mod 1)) = x + ((-x) mod 1)

[1] The book I'm following calls floor(x/y) the quotient and (x mod y)

the remainder; the modulus is y, aka "the number after mod".