Example: Nominal Rate

In this example the nominal interest rate is computed given that the effective rate is 6.14% and that the interest has been compounded quarterly.
import com.imsl.finance.*;
import java.text.NumberFormat;

public class nominalEx1 {
    public static void main(String args[]) {
        double effectiveRate = .0614;
        int nper = 4;
        
        double nominalRate = Finance.nominal(effectiveRate, nper);
        NumberFormat nf = NumberFormat.getPercentInstance();
        nf.setMaximumFractionDigits(2);
        System.out.println("The nominal rate of the effective rate, 6.14%, " +
        "compounded quarterly is " + nf.format(nominalRate));
    }
}

Output

The nominal rate of the effective rate, 6.14%, compounded quarterly is 6%
Link to Java source.