// return the smallest integer not less than r. If r is too large or divided by 0,
// nomeans is true, and x is meaningless
return the smallest integer not less than r. If r is too large or divided by 0,
nomeans is true, and x is meaningless
// return the smallest integer not less than r . If r is too large or divided by 0 // nomeans is true and x is meaningless
func RatToInt64(r *big.Rat) (x int64, nomeans bool) {
	f, _ := r.Float64()
	if math.IsNaN(f) || math.IsInf(f, 0) || f > float64(math.MaxInt64) || f < float64(math.MinInt64) {
		return 0, true
	}
	x = int64(f)
	if float64(x) < f {
		x += 1
	}
	return x, false
}
func RatToInt64 ( r * big . Rat ) ( x int64 , nomeans bool ) { f , _ := r . Float64 ( ) if math . IsNaN ( f ) || math . IsInf ( f , 0 ) || f > float64 ( math . MaxInt64 ) || f < float64 ( math . MinInt64 ) { return 0 , true } x = int64 ( f ) if float64 ( x ) < f { x += 1 } return x , false }
return the smallest integer not less than r. If r is too large or divided by 0,
nomeans is true, and x is meaningless
return the smallest integer not less than r . If r is too large or divided by 0 nomeans is true and x is meaningless