Documentation of 'edu.rit.hyb.prime.Prime32File' Java class
Prime32File
edu.rit.hyb.prime

Class Prime32File



  • public class Prime32File
    extends java.lang.Object
    Class Prime32File is a sequential program that stores a list of 32-bit prime numbers in a file.

    Usage: java edu.rit.hyb.prime.Prime32File primefile
    primefile = Output prime file

    The program calculates all odd primes less than 232. The program stores a series of values in the output prime file. Each value is stored as an unsigned byte. Each value is the difference between two consecutive odd primes, divided by 2.

    The odd primes are 3, 5, 7, 11, 13, 17, 19, 23, . . .

    The differences between consecutive odd primes are 2, 2, 4, 2, 4, 2, 4, . . .

    The bytes stored in the output prime file are the differences divided by 2, namely 1, 1, 2, 1, 2, 1, 2, . . .

    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method and Description
      static void main(java.lang.String[] args)
      Main program.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • main

        public static void main(java.lang.String[] args)
                         throws java.lang.Exception
        Main program.
        Throws:
        java.lang.Exception

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.