A place to air possible concerns or difficulties in understanding ProjectEuler problems. This forum is not meant to publish solutions. This forum is NOT meant to discuss solution methods or giving hints how a problem can be solved.
Forum rules
As your posts will be visible to the general public you are requested to be thoughtful in not posting anything that might explicitly give away how to solve a particular problem.
This forum is NOT meant to discuss solution methods for a problem.
In particular don't post any code fragments or results.
Don't start begging others to give partial answers to problems
Don't ask for hints how to solve a problem
Don't start a new topic for a problem if there already exists one
In Euler226 The definition of S(x) defines a function like
* *
* * *
* * *
* *
In electronics this is called a triangular wave form.
This is how a sawtooth is wave form looks like.
* *
* * * *
* * * *
* * *
This would define S(x) as the distance to the preceding integer.
I think this may be need of clarification.
Groetjes Albert
In real life, there are saws with differently shaped teeth, let's call them mathematically shaped and electronically shaped
In mathematics, the distance to the nearest integer is commonly called the saw-tooth function (or Weierstraß' saw-tooth function if one wants to be more precise). Electronics follows a different convention
So, how should we clarify it?
"Note (for electrical engineers): This saw-tooth function is not the one you're used to."?
Il faut respecter la montagne -- c'est pourquoi les gypaètes sont là.
daniel.is.fischer wrote:(..) In mathematics, the distance to the nearest integer is commonly called the saw-tooth function (or Weierstraß' saw-tooth function if one wants to be more precise). Electronics follows a different convention
Not just electronics, the saw-tooth function they teach in my mathematics study is the one shown by albert in the first post..
To be fair, I also thought it meant the jagged sawtooth wave until I realized the function would look nothing like it did in the picture. A quick trip to wiki land gave me the right idea for the curve.
Last edited by quilan on Wed Jan 07, 2009 3:12 pm, edited 1 time in total.