Package org.nevec.rjm

Class Bernoulli


  • public class Bernoulli
    extends java.lang.Object
    Bernoulli numbers.
    Since:
    2006-06-25
    Author:
    Richard J. Mathar
    • Constructor Summary

      Constructors 
      Constructor Description
      Bernoulli()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      Rational at​(int n)
      The Bernoulli number at the index provided.
      protected void set​(int n, Rational value)
      Set a coefficient in the internal table.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Bernoulli

        public Bernoulli()
    • Method Detail

      • set

        protected void set​(int n,
                           Rational value)
        Set a coefficient in the internal table.
        Parameters:
        n - the zero-based index of the coefficient. n=0 for the constant term.
        value - the new value of the coefficient.
      • at

        public Rational at​(int n)
        The Bernoulli number at the index provided.
        Parameters:
        n - the index, non-negative.
        Returns:
        the B_0=1 for n=0, B_1=-1/2 for n=1, B_2=1/6 for n=2 etc