fmod
Prev | Orchestra Opcodes and Operators | Next

## fmod

fmod — Compute the floating point remainder operation.

## Description

Computes the remainder of the division of its first argument by the second.

## Syntax

    ires[] fmod iarg1[], iarg2[]

    kres[] fmod karg1[], karg2[]

    ires[] fmod iarg1[], iarg2

    kres[] fmod karg[], karg2

## Initialization

iarg[]1/2, iarg2 -- the operands.

## Performance

karg[]1/2, karg2 -- the operands

## Examples

Here is an example of the fmod opcode. It uses the file fmod.csd.

Example 335. Example of the fmod opcode.

See the sections Real-time Audio and Command Line Flags for more information on using command line flags.

    <CsoundSynthesizer>
    <CsOptions>
    </CsOptions>
    <CsInstruments>

    instr 1

    iArg1[] fillarray 10,8,22
    iArg2[] fillarray 4,5,6
    iRes[] fmod iArg1,iArg2
    ik init 0

    while ik < lenarray(iRes) do
     print iRes[ik]
     ik += 1
    od

    endin

    </CsInstruments>
    <CsScore>
    i1 0 0
    </CsScore>
    </CsoundSynthesizer>

## Credits

Author: Victor Lazzarini
2017

Prev | Up | Next
fmmetal | Home | fmpercfl