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

You are not logged in.

- Topics: Active | Unanswered

Pages: **1**

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

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

a. f(1.2)

b. f(1.6)

c. f(-1.8)

Offline

**Bob****Administrator**- Registered: 2010-06-20
- Posts: 10,588

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

Offline

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

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

**Bob****Administrator**- Registered: 2010-06-20
- Posts: 10,588

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

Offline

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

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

**Bob****Administrator**- Registered: 2010-06-20
- Posts: 10,588

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

Offline

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

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

**Bob****Administrator**- Registered: 2010-06-20
- Posts: 10,588

Now correct.

B

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

Offline

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

Bob wrote:

Now correct.

B

Perfect.

Offline

Pages: **1**