public static BigRational valueOf ( int integer , int fractionNumerator , int fractionDenominator ) { if ( fractionNumerator < 0 || fractionDenominator < 0 ) { throw new ArithmeticException ( "Negative value" ) ; } BigRational integerPart = valueOf ( integer ) ; BigRational fractionPart = valueOf ( fractionNumerator , fractionDenominator ) ; return integerPart . isPositive ( ) ? integerPart . add ( fractionPart ) : integerPart . subtract ( fractionPart ) ; }
Creates a rational number of the specified integer and fraction parts .