Re: mathlink integer overflow
- To: mathgroup at smc.vnet.net
- Subject: [mg94823] Re: mathlink integer overflow
- From: David Bailey <dave at removedbailey.co.uk>
- Date: Sat, 27 Dec 2008 07:03:35 -0500 (EST)
- References: <gj2cai$fsj$1@smc.vnet.net>
Sebastien Roy wrote: > Hello everyone, > > (i hope this is the right forum for this question) > > Using mathlink, if an expression evaluates to a very large integer > that would not fit 32 or 64 bits, mathematica sends > back an integer with error code MLEOVLF (overflow in integer). The > integer is truncated to its first 8 or 9 digits. > > It seems there is no function like MLGetInteger for arbitrary size > integers... > So, is there an elegant way to retreive a very large integer through > mathlink? > > Sincerely, > > Sebastien > > Beyond 64 bits, the most obvious way to transfer an integer would be as a character string, which you could then convert using ToExpression. David Bailey http://www.dbaileyconsultancy.co.uk