11-24-2008 10:55 AM - edited 11-24-2008 10:57 AM
craigc wrote:You have just solved a problem I have been having with reading phase difference from a Network analyser. I knew there must be a way of getting the phase's back to (-pi, pi).
Sorry, actually my method only gets you to two quadrants, i.e. [0..pi] for cosine and [-Pi/2..Pi/2] for sine, of course. In order to reconstruct the data for all four quadrants you need more information.
One possibility would be to take the sine and cosine and feed the two outpus to the "Inverse tangent (2 inputs)" (see image)

Of course a simpler solution would be to divide by 2Pi and keep the remainder for an output range of [0..2Pi]. No trigonometry needed. 🙂
You can easily tweak for [-Pi..Pi]. (see image)

11-24-2008 01:50 PM - edited 11-24-2008 01:51 PM
Why a seperate sine and cosine?

Ton
11-24-2008 02:22 PM
Oh ho. Did Altenbach get caught in a minor Rube Goldberg?
Rob
11-24-2008 03:00 PM
TonP wrote:Why a seperate sine and cosine?
Good catch. In this case I had the sin and cos already on the diagram from some earlier editing, so it was easier to recycle them. 🙂
11-25-2008 05:28 AM
Plus that way you know the Sine and Cosine functions can run in Parallel, possible improving performance on multi-core processors.
Shane.
11-25-2008 07:59 AM
Intaris wrote:Plus that way you know the Sine and Cosine functions can run in Parallel, possible improving performance on multi-core processors.
Shane.
Now a benchmark test to prove which method is faster and answer if it will really run in two cores at the same time would be an interesting way to show that here are no chinks (sp?) in our Knight's armour.
But....
So far I have learned that the inverse operations when constructed using mth operations does serve a purpose (In not equal to out).
Ben
11-25-2008 10:16 AM
Intaris wrote:Plus that way you know the Sine and Cosine functions can run in Parallel, possible improving performance on multi-core processors.
I would not make conclusions without benchmarks. I can think of at least two scenarios where the "combo" primitive would be preferable.
I'll do some bechmarks to quantify things. 🙂
11-25-2008 03:22 PM - edited 11-25-2008 03:23 PM
11-25-2008 03:27 PM - edited 11-25-2008 03:30 PM
altenbach wrote:
Random sightings....
But you do have to admit that the top down processing of property nodes means that the value is written before it is read.
Okay, there are definitely better ways of doing these types of things which I won't enumerate.
Rob
11-25-2008 03:46 PM - edited 11-25-2008 03:46 PM
Robert Cole wrote:But you do have to admit that the top down processing of property nodes means that the value is written before it is read.
Yes, you can even expand on the ideas and calculate 2x+1 as follows. 😄