package math.kombi;

import java.math.BigDecimal;

public class Kombi09 {
    public static void main(String[] args) {
        BigDecimal t1 = KombiUtil.bernoulli(4, 3, new BigDecimal("0.5"),
                new BigDecimal("0.5"));
        System.out.println("1: " + t1.toString());
        Fraction t2 = KombiUtil.bernoulli(4, 3, new Fraction(1, 2),
                new Fraction(1, 2));
        System.out.println("2: " + t2.toString());
        //
        BigDecimal t3 = KombiUtil.bernoulli(5, 2, new BigDecimal("0.16666"),
                new BigDecimal("0.83334"));
        System.out.println("3: " + t3.toString());
        Fraction t4 = KombiUtil.bernoulli(5, 2, new Fraction(1, 6),
                new Fraction(5, 6));
        System.out.println("4: " + t4.toString());
        System.out.println("5: (po podzieleniu)" + t4.getAsBigDecimal(25));
    }
}
