> k is calculated in order to force
> -1 <= ai/k <= 1 for every i
You mean for both of them. ;-) But really, sin(x) \in [-1, 1]? Wow! ;-)
> -1 <= bi/k <= 1 for every i
>
> ai and bi are integers (I mean they are stored in java integers)
> in general ai != aj for every i != j and
> the same condition should be verified for bi ...
> so they seems not to be nasty nor complex...
Hey, Gunitus, how much do you know about trigonometry? Or math for that matter?
Specifically... forget the solution for a moment: do you understand the problem
(t.i. "question")?
> The solution I'm looking for is a java one, if eventually someone
> already implemented it,
> otherwise I have to implement it in java ... thus I need some help.
>
> In fact I read something about sin(x) = alpha
Trying to explain those <khm/> unknowns, you introduce new ones. That's helpful!
> on condition -1 <= a <= 1
> that is absolutely my case.
[quoted text clipped - 10 lines]
> f = (bi / k + 2 k pi) / ai
> f = pi - (bi / k + 2 k pi) / ai
Here you go! All you have to do now is translate these two lines into Java. :-)
> that it is not exacly what I was expecting... so I am a little bit
> stuck!!!
What _were_ you expecting? Just curious...
Guntius.GIBLI@gmail.com - 07 Sep 2006 17:19 GMT
I was expecting a
single function capable of giving me all values of "f"
and not two distinct functions...
GG
Guntius.GIBLI@gmail.com - 07 Sep 2006 17:22 GMT
Well anyway I don't really understand the problem...
and I'm not very well suited in math ...
the fact is that I should deliver this function as a small part of a
bigger project
I'm not allowed to know about?!
weird thing I know but the fact is that I only know the input, the
output and the CPU time I have to do the trick...
oooh yes and I have to do the whole thing in a nice java function...
thanks you very much anyway
you really helped me.
GG
M.J. Dance - 08 Sep 2006 07:45 GMT
> Well anyway I don't really understand the problem...
> and I'm not very well suited in math ...
[quoted text clipped - 9 lines]
> thanks you very much anyway
> you really helped me.
I can't help you if I don't know (exactly) what the problem is. As you obviously
don't know either, I suggest you ask your tutor.
And of course, there's the proverbial Usenet reluctance of doing someone elses
homework. In order to get help, the least you should do is show some effort of
trying to solve the problem yourself.
Now, as you found out in another post, your f = f(ai, bj, k). A few additional
conditions (ai and bi being integers and so on) puts a few additional
restrictions on your solution, but that's about it.
Oh, and, "translating" that into Java is the least of your problems.