Re: [Numpy-discussion] Large numbers into float128

2011-10-30 Thread Matthew Brett
Hi, On Sun, Oct 30, 2011 at 2:38 AM, Berthold Höllmann wrote: > Matthew Brett writes: > >> Hi, >> >> Can anyone think of a good way to set a float128 value to an >> arbitrarily large number? >> >> As in >> >> v = int_to_float128(some_value) >> >> ? >> >> I'm trying things like >> >> v = np.float

Re: [Numpy-discussion] Large numbers into float128

2011-10-30 Thread Berthold Höllmann
Matthew Brett writes: > Hi, > > Can anyone think of a good way to set a float128 value to an > arbitrarily large number? > > As in > > v = int_to_float128(some_value) > > ? > > I'm trying things like > > v = np.float128(2**64+2) > > but, because (in other threads) the float128 seems to be going t

Re: [Numpy-discussion] Large numbers into float128

2011-10-30 Thread Nadav Horesh
t in a pure python code via ctypes? Nadav From: numpy-discussion-boun...@scipy.org [numpy-discussion-boun...@scipy.org] On Behalf Of Charles R Harris [charlesr.har...@gmail.com] Sent: 30 October 2011 05:02 To: Discussion of Numerical Python Subject: Re: [Numpy-discu

Re: [Numpy-discussion] Large numbers into float128

2011-10-29 Thread Charles R Harris
On Sat, Oct 29, 2011 at 8:49 PM, Matthew Brett wrote: > Hi, > > On Sat, Oct 29, 2011 at 3:55 PM, Matthew Brett > wrote: > > Hi, > > > > Can anyone think of a good way to set a float128 value to an > > arbitrarily large number? > > > > As in > > > > v = int_to_float128(some_value) > > > > ? > > >

Re: [Numpy-discussion] Large numbers into float128

2011-10-29 Thread Matthew Brett
Hi, On Sat, Oct 29, 2011 at 3:55 PM, Matthew Brett wrote: > Hi, > > Can anyone think of a good way to set a float128 value to an > arbitrarily large number? > > As in > > v = int_to_float128(some_value) > > ? > > I'm trying things like > > v = np.float128(2**64+2) > > but, because (in other threa

[Numpy-discussion] Large numbers into float128

2011-10-29 Thread Matthew Brett
Hi, Can anyone think of a good way to set a float128 value to an arbitrarily large number? As in v = int_to_float128(some_value) ? I'm trying things like v = np.float128(2**64+2) but, because (in other threads) the float128 seems to be going through float64 on assignment, this loses precisio