S1 / S2
Overview
Divides sample values of all channels of the front input by the sample values of the same channels on the bottom input.Operator ports
Input S1: Floating point valuesInput S2: Floating point values
Output S1/S2: Floating point values
Properties
Find more information about changing properties here: "Properties Viewer"Caption
type: Word or phraseThe name of the object in the project. This name must not contain '.', '$' nor '@' characters.
For more information about the rules and usage of the Caption property, please refer to "Caption property - background and usage".
Documentation
type: See descriptionOptional documentation of this object. If this object is an operator, the Documentation text is displayed below the operator symbol.
Details
Case 1: equal number of input channelsIf both input buses contain an equal number of channels, the sample value of every channel at input S1 is divided by the value of the channel with the same number at input S2 and the result is put to the same output channel.
Case 2: input with one channel
If one input bus contains one channel and the other input contains more than one channel, the sample value of the single channel input is divided by the value of every channel of the other input.
Case 3: unequal number of channels
If the two input buses contain an unequal number of channels, and neither has one channel, then the operator outputs no data and a warning is displayed below the symbol.
The calculation is also performed on constant values (e.g. from a Constant ("K"); either if one of the inputs is a constant or both.
Divide by Zero
The Divide operator allows divisions by zero, although it will issue a warning. During digital signal processing of noisy signals, it is well possible that a division by zero occurs every now and then. Statistically this does not necessarily have to be significant for the calculation results. Therefore, Polybench chooses to allow this error to happen, but will give the programmer a warning below the operator symbol. The warning says: "Division by zero was detected N times", where N is the number of divisions by zero since the last system reset.
If the S2 input sample is zero on one of the channels (causing Divide by Zero), the operator will put out the last valid value on that channel.
Connection rules
It is allowed to connect a signal that feeds back from the output to one of the inputs that originates from the output. It is however recommended to only feed back on the lower (S2) input.
It is not allowed to directly divide signals from two different sources. You need to synchronize the signals first, using the Synchronizer ("Synchronizer").