However, division automatically returns the type of its operands, so that,

for example: math.ceil(7/4) returns 1. I can use float, as in:

math.ceil(7/float(4)), except that for very large integers float causes an

unacceptable loss of precision.

What is the best way of finding a ceiling of a quotient of arbitrary sized

integers?

Thanks,

Alasdair

From http Sun Mar 9 00:26:35 2008

From: http (Paul Rubin)

Date: 08 Mar 2008 15:26:35 -0800

Subject: Arbitrary precision integer arithmetic: ceiling?

References: <fqv6ih$jvd$1@news-01.bur.connect.com.au>

Message-ID: <7xhcfg94r8.fsf@ruckus.brouhaha.com>

Status: RO

Content-Length: 81972

Lines: 2301

Alasdair <amca01 at gmail.com> writes:

What is the best way of finding a ceiling of a quotient of arbitrary sized

integers?

ceiling(a/b) = (a+b-1)//bintegers?