Example: Effective Rate

In this example the effective interest rate is computed given that the nominal rate is 6.0% and that the interest will be compounded quarterly.
using System;
using Imsl.Finance;

public class effectEx1
{
    public static void  Main(String[] args)
    {
        double nominalRate = .06;
        int nper = 4;
        double effectiveRate;
        
        effectiveRate = Finance.Effect(nominalRate, nper);
        Console.Out.WriteLine("The effective rate of the nominal rate,"
                              + " 6.0%, " + "compounded quarterly is "
                              + effectiveRate.ToString("P"));
    }
}

Output

The effective rate of the nominal rate, 6.0%, compounded quarterly is 6.14 %

Link to C# source.