Computer Science Canada Programming C, C++, Java, PHP, Ruby, Turing, VB   Username:   Password: Wiki   Blog   Search   Turing   Chat Room  Members
f(x) == f(10x)
Author Message
octopi

Posted: Sun Dec 07, 2003 10:13 pm   Post subject: f(x) == f(10x)

100 bits for someone who solves the following problem:

Find a function f(x), where f(x) is equal to f(10x) for all values of x,
The varible x must be used in the function.

example of how not to do it:
f(x) = 4
f(x) can't be 4 (because, the result would be 4 for all values of x), and x is not used in the function.

f(x) = 4+x-x
NO, because when simplified you get 4, cheap bastards.

Good luck.

Any cheapory in your anwsers will result in me not giving you bits...aka stupid anwser thats not right. but I didn't cover above in my examples of how not to do it.
(like, f(x)= 0x, or f(x)= x^0)

Mazer

Posted: Mon Dec 08, 2003 9:16 am   Post subject: Re: f(x) == f(10x)

octopi wrote:
f(x)= 0x

crap!!! now i have to come up with something else!
McKenzie

Posted: Mon Dec 08, 2003 10:05 am   Post subject: (No subject)

 code: int f(int x) {      while(x % 10 == 0)           x = x / 10;      return x; }
Tony

Posted: Mon Dec 08, 2003 10:13 am   Post subject: (No subject)

wait Is the question about a math function or a programming function

btw, McKenzie - since when do you have those billion bits?
and for that matter... where did half of my bits go?
Tony's programming blog. DWITE - a programming contest.
McKenzie

Posted: Mon Dec 08, 2003 10:36 am   Post subject: (No subject)

I think it is supposed to be a math question. I thought a compsci answer was better bits...what bits?
Tony

Posted: Mon Dec 08, 2003 10:41 am   Post subject: (No subject)

McKenzie wrote:
bits...what bits?

umm... can Andy create bits now that he's a mod

*Tony takes out his sniper rifle and goes to investigate*
Tony's programming blog. DWITE - a programming contest.

Posted: Mon Dec 08, 2003 1:20 pm   Post subject: (No subject)

wow, how quickly topics get changed around from the initial equation..
Andy

Posted: Mon Dec 08, 2003 7:29 pm   Post subject: (No subject)

f(x)=[1/x]

take off the top bar of the square bracket. that is actually a mathematical operator, it means the largest integer smaller than the number contained.... heh that works... but only for integral values of x

AsianSensation

Posted: Mon Dec 08, 2003 7:33 pm   Post subject: (No subject)

actually that one works for every single number except for 1 itself.

[1/1] = 1, [1/10] = 0
Andy

Posted: Mon Dec 08, 2003 7:40 pm   Post subject: (No subject)

dope!

fine [1/x+1]
AsianSensation

Posted: Mon Dec 08, 2003 7:42 pm   Post subject: (No subject)

nope, still another fault.

[1/(-10 + 1)] = -1, [1/(-1 + 1)] = undefined

still not every single number.
Andy

Posted: Mon Dec 08, 2003 8:48 pm   Post subject: (No subject)

okok i think i actually got it...
f(x)=[(x-(|x|/x))/x]

Mazer

Posted: Mon Dec 08, 2003 9:07 pm   Post subject: (No subject)

hey dodge, besides the fact that f(x) != f(10x) with your function, what is f(0)?
Andy

Posted: Mon Dec 08, 2003 9:20 pm   Post subject: (No subject)

yes it does equal... sub in any value... and undefined=undefined rite?
Mazer

Posted: Mon Dec 08, 2003 9:41 pm   Post subject: (No subject)

uh... as we all know, i really suck at math, so feel free to point out my stupidity if i do something that seems incredibly n00bishly stupid.

WW wrote:
f(x)=[(x-(|x|/x))/x]

f(5) = (5 - (|5|/5))/5
= (5 - 1) / 5
= 4/5
= 0.8

right?

f(50) = (50 - (|50|/50))/50
= (50 - 1)/50
= 49/50
= 0.98
 Display posts from previous: All Posts1 Day7 Days2 Weeks1 Month3 Months6 Months1 Year Oldest FirstNewest First

Page 1 of 2  [ 25 Posts ]
Goto page 1, 2  Next
 Jump to:  Select a forum  CompSci.ca ------------ - Network News - General Discussion     General Forums   -----------------   - Hello World   - Featured Poll   - Contests     Contest Forums   -----------------   - DWITE   - [FP] Contest 2006/2008   - [FP] 2005/2006 Archive   - [FP] 2004/2005 Archive   - Off Topic     Lounges   ---------   - User Lounge   - VIP Lounge     Programming -------------- - General Programming     General Programming Forums   --------------------------------   - Functional Programming   - Logical Programming   - C     C   --   - C Help   - C Tutorials   - C Submissions   - C++     C++   ----   - C++ Help   - C++ Tutorials   - C++ Submissions   - Java     Java   -----   - Java Help   - Java Tutorials   - Java Submissions   - Ruby     Ruby   -----   - Ruby Help   - Ruby Tutorials   - Ruby Submissions   - Turing     Turing   --------   - Turing Help   - Turing Tutorials   - Turing Submissions   - PHP     PHP   ----   - PHP Help   - PHP Tutorials   - PHP Submissions   - Python     Python   --------   - Python Help   - Python Tutorials   - Python Submissions   - Visual Basic and Other Basics     VB   ---   - Visual Basic Help   - Visual Basic Tutorials   - Visual Basic Submissions     Education ----------- - Student Life   Graphics and Design ----------------------- - Web Design     Web Design Forums   ---------------------   - (X)HTML Help   - (X)HTML Tutorials   - Flash MX Help   - Flash MX Tutorials   - Graphics     Graphics Forums   ------------------   - Photoshop Tutorials   - The Showroom   - 2D Graphics   - 3D Graphics     Teams ------ - dTeam Public

 Style: Appalachia blueSilver eMJay subAppalachia subBlue subCanvas subEmjay subGrey subSilver subVereor Search: