Math Is Fun Forum

  Discussion about math, puzzles, games and fun.   Useful symbols: ÷ × ½ √ ∞ ≠ ≤ ≥ ≈ ⇒ ± ∈ Δ θ ∴ ∑ ∫ • π ƒ -¹ ² ³ °

You are not logged in.

#1 2024-04-02 10:47:34

mathxyz
Member
From: Brooklyn, NY
Registered: 2024-02-24
Posts: 1,053

Step Function aka Greatest Integer Function

Given f(x) = int(x/2), find a to c.

a. f(1.2)

b. f(1.6)

c. f(-1.8)

Offline

#2 2024-04-03 09:04:11

Bob
Administrator
Registered: 2010-06-20
Posts: 10,582

Re: Step Function aka Greatest Integer Function

Start with x 1.2, half it, take the integer part of the result.

When x is negative you'll need to check whether to round up or down to get the integer part.

Bob


Children are not defined by school ...........The Fonz
You cannot teach a man anything;  you can only help him find it within himself..........Galileo Galilei
Sometimes I deliberately make mistakes, just to test you!  …………….Bob smile

Offline

#3 2024-04-04 05:45:53

mathxyz
Member
From: Brooklyn, NY
Registered: 2024-02-24
Posts: 1,053

Re: Step Function aka Greatest Integer Function

Bob wrote:

Start with x 1.2, half it, take the integer part of the result.

When x is negative you'll need to check whether to round up or down to get the integer part.

Bob

I am sure what you mean here. Can you show me how this is done?

Offline

#4 2024-04-05 05:13:45

Bob
Administrator
Registered: 2010-06-20
Posts: 10,582

Re: Step Function aka Greatest Integer Function

The int function rounds all numbers down to the integer below the number.

Eg int(1.5) = 1

Int(1) = 1

Int(-1.5) = -2 not -1

For these questions, first you have to half the x input. Then apply the int function to the result.

Eg f(4.6) = int(2.3) = 2

f(-8.4) = int(-4.2) = -5

Bob


Children are not defined by school ...........The Fonz
You cannot teach a man anything;  you can only help him find it within himself..........Galileo Galilei
Sometimes I deliberately make mistakes, just to test you!  …………….Bob smile

Offline

#5 2024-04-05 06:20:51

mathxyz
Member
From: Brooklyn, NY
Registered: 2024-02-24
Posts: 1,053

Re: Step Function aka Greatest Integer Function

Bob wrote:

The int function rounds all numbers down to the integer below the number.

Eg int(1.5) = 1

Int(1) = 1

Int(-1.5) = -2 not -1

For these questions, first you have to half the x input. Then apply the int function to the result.

Eg f(4.6) = int(2.3) = 2

f(-8.4) = int(-4.2) = -5

Bob


Let me see.

a. f(1.2)


f(x) = int(x/2)


f(1.2) = int(1.2/2)


f(1.2) int(0.6) = 0


b. f(1.6)


f(1.6) = int(1.6/2)


f(1.6) = int(0.8) = 0


c. f(-1.8)


f(-1.8) = int(-1.8/2)


f(-1.8) = int(0.9) = 0


You say?

Offline

#6 2024-04-05 08:29:20

Bob
Administrator
Registered: 2010-06-20
Posts: 10,582

Re: Step Function aka Greatest Integer Function

A and b good.

C error.  Half -1.8 is minus

Bob


Children are not defined by school ...........The Fonz
You cannot teach a man anything;  you can only help him find it within himself..........Galileo Galilei
Sometimes I deliberately make mistakes, just to test you!  …………….Bob smile

Offline

#7 2024-04-05 11:23:59

mathxyz
Member
From: Brooklyn, NY
Registered: 2024-02-24
Posts: 1,053

Re: Step Function aka Greatest Integer Function

Bob wrote:

A and b good.

C error.  Half -1.8 is minus

Bob

c. f(-1.8)


f(-1.8) = int(-1.8/2)


f(-1.8) = int(-0.9) = -1


You say?

Offline

#8 2024-04-06 08:40:10

Bob
Administrator
Registered: 2010-06-20
Posts: 10,582

Re: Step Function aka Greatest Integer Function

Now correct.

B


Children are not defined by school ...........The Fonz
You cannot teach a man anything;  you can only help him find it within himself..........Galileo Galilei
Sometimes I deliberately make mistakes, just to test you!  …………….Bob smile

Offline

#9 2024-04-06 11:30:51

mathxyz
Member
From: Brooklyn, NY
Registered: 2024-02-24
Posts: 1,053

Re: Step Function aka Greatest Integer Function

Bob wrote:

Now correct.

B

Perfect.

Offline

Board footer

Powered by FluxBB