Math Puzzle (SOLVED by harold aptroot!)
-
y=x+7*(1+x-(x+x+1)/2)*(1-x+(x+x-1)/2)
:)
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
Prolific encyclopedia fixture proof-reader browser patron addict?
We all depend on the beast below.
modified on Tuesday, April 20, 2010 10:12 PM
Good choice to remove the decimals... I can't recall if I stated that in the puzzle, but that was part of the requirement I had in my head. I don't have the time to check your solution, but it looks like harold aptroot beat you anyway. Yours does look a little less tricky (I too was thinking of using "2 * i + 1"), so kudos for possibly finding a simpler solution. :)
-
Good choice to remove the decimals... I can't recall if I stated that in the puzzle, but that was part of the requirement I had in my head. I don't have the time to check your solution, but it looks like harold aptroot beat you anyway. Yours does look a little less tricky (I too was thinking of using "2 * i + 1"), so kudos for possibly finding a simpler solution. :)
no need for \! :)
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
Prolific encyclopedia fixture proof-reader browser patron addict?
We all depend on the beast below.
-
This seems to be correct. Very clever. Looks like you are using the fact that \ and / will only ever differ by 1. Since you flip flop so rounding will occur in the same direction for at least one of the terms to the left and right of the multiply, at least one section of the equation will turn out to be 0, which propogates to make each other terms 0. And you never divide by a variable, so that avoids a divide by 0. A 5 well earned!
-
For some reason I was stuck on thinking in terms of normal math. Still, you should really make sure such a problem has an answer before presenting it as a puzzle.
Gwenio wrote:
you should really make sure such a problem has an answer before presenting it as a puzzle
You might want to tell these guys that. ;) Also, I intuited that it was possible. If it wasn't, then a proof of why it wasn't would have been equally valid. :)
-
Yay :) Usually trying to solve these problems at 4 am doesn't work out so well for me lol
4AM may not be such a bad time for you. You have earned a place on my bookmark list. :)
-
no need for \! :)
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
Prolific encyclopedia fixture proof-reader browser patron addict?
We all depend on the beast below.
Not bad. I added that operator because I wasn't sure it was possible without it. If you have indeed done it without, then great work. :)
-
Not bad. I added that operator because I wasn't sure it was possible without it. If you have indeed done it without, then great work. :)
it is only / one needs, since that one has a singularity at zero, hence it allows to construct C-like functions (resulting in 0 or 1) like x>0 and x<0, x>=0 and x<=0, and therefore also x==0. :)
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
Prolific encyclopedia fixture proof-reader browser patron addict?
We all depend on the beast below.
-
Calm down there cowboy. My "stated usage" was just how I thought up this idea. This is just a fun math puzzle to occupy your time should you choose to let it.
PIEBALDconsult wrote:
it's just integer division
Not sure I agree (mod is the remainder from the division), but no shorthand allowed... show your work please. :)
aspdotnetdev wrote:
PIEBALDconsult wrote: it's just integer division Not sure I agree (mod is the remainder from the division),
Sure it is, since your division rounds: a % b = a - b * (a / b) e.g. 12 % 5 = 12 - 5 * (12 / 5) 2 = 12 - 5 * 2 2 = 2
-
aspdotnetdev wrote:
PIEBALDconsult wrote: it's just integer division Not sure I agree (mod is the remainder from the division),
Sure it is, since your division rounds: a % b = a - b * (a / b) e.g. 12 % 5 = 12 - 5 * (12 / 5) 2 = 12 - 5 * 2 2 = 2
absolutely, and furthermore PIEBALD will claim the use of the C/C++ pre-processor to introduce and define new operators. :)
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
Prolific encyclopedia fixture proof-reader browser patron addict?
We all depend on the beast below.
-
aspdotnetdev wrote:
PIEBALDconsult wrote: it's just integer division Not sure I agree (mod is the remainder from the division),
Sure it is, since your division rounds: a % b = a - b * (a / b) e.g. 12 % 5 = 12 - 5 * (12 / 5) 2 = 12 - 5 * 2 2 = 2
Thanks for the info. :)
-
absolutely, and furthermore PIEBALD will claim the use of the C/C++ pre-processor to introduce and define new operators. :)
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
Prolific encyclopedia fixture proof-reader browser patron addict?
We all depend on the beast below.
Just so long as he shows his work. :)
-
absolutely, and furthermore PIEBALD will claim the use of the C/C++ pre-processor to introduce and define new operators. :)
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
Prolific encyclopedia fixture proof-reader browser patron addict?
We all depend on the beast below.
C++ Preprocessor? That's so kitsch. Prolog operators all the way!
-
it is only / one needs, since that one has a singularity at zero, hence it allows to construct C-like functions (resulting in 0 or 1) like x>0 and x<0, x>=0 and x<=0, and therefore also x==0. :)
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
Prolific encyclopedia fixture proof-reader browser patron addict?
We all depend on the beast below.
Man, all that money wasted on finding the Higgs Boson, when it was hiding in the divide by zero all along!
-
Man, all that money wasted on finding the Higgs Boson, when it was hiding in the divide by zero all along!
it is not only at zero, it is everywhere, we are just too blind to see it. :)
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
Prolific encyclopedia fixture proof-reader browser patron addict?
We all depend on the beast below.
-
it is not only at zero, it is everywhere, we are just too blind to see it. :)
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
Prolific encyclopedia fixture proof-reader browser patron addict?
We all depend on the beast below.
Luc Pattyn wrote:
we are just too blind to see it
That'll teach you to look directly into a singularity. Those accretion discs will get you every time.
-
absolutely, and furthermore PIEBALD will claim the use of the C/C++ pre-processor to introduce and define new operators. :)
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
Prolific encyclopedia fixture proof-reader browser patron addict?
We all depend on the beast below.
:-D I was this close to using C rather than C#... Besides, he invented the
\
operator. X| -
:-D I was this close to using C rather than C#... Besides, he invented the
\
operator. X|PIEBALDconsult wrote:
Besides, he invented the \ operator
I only know \ from several Basic systems including VB. And I don't really like it, so I did not use it. :)
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
Prolific encyclopedia fixture proof-reader browser patron addict?
We all depend on the beast below.
-
aspdotnetdev wrote:
PIEBALDconsult wrote: it's just integer division Not sure I agree (mod is the remainder from the division),
Sure it is, since your division rounds: a % b = a - b * (a / b) e.g. 12 % 5 = 12 - 5 * (12 / 5) 2 = 12 - 5 * 2 2 = 2
Actually, I would likely define it using repeated subtraction; so it should still be allowed. :-D
-
PIEBALDconsult wrote:
Besides, he invented the \ operator
I only know \ from several Basic systems including VB. And I don't really like it, so I did not use it. :)
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
Prolific encyclopedia fixture proof-reader browser patron addict?
We all depend on the beast below.
Huh... I've never heard of it. Turbo BASIC has it. Dartmouth BASIC doesn't seem to. BASIC-Plus doesn't. Seems to be an abomination.
-
Luc Pattyn wrote:
we are just too blind to see it
That'll teach you to look directly into a singularity. Those accretion discs will get you every time.
She was only a particle physicist's daughter, but she had big accretion discs. :cool: