1007')
Otherwise 'partial' has an error that is too large when you pass it to
the ln() function. Since decimal mostly follows IEEE 754 with arbitrary
precision extensions, it cannot behave differently.
Stefan Krah
--
https://mail.python.org/mailman/listinfo/python-list
l#arbitrary-precision-libraries
Stefan Krah
--
https://mail.python.org/mailman/listinfo/python-list
ml#refpower
Why exactly the decision was made I cannot say.
Stefan Krah
--
http://mail.python.org/mailman/listinfo/python-list
ne version behind the latest.
I wouldn't attempt it. For Python 3.3 the conversion has been done and the diff
was enormous.
Stefan Krah
--
http://mail.python.org/mailman/listinfo/python-list
O builds
> or not.
I remember that some versions of Visual Studio silently completed the PGO build
without actually having PGO capabilities. :)
I think for VS 2008 at least "Professional" is needed, for VS 2010 "Ultimate".
Stefan Krah
--
http://mail.python.org/mailman/listinfo/python-list
s in with the PGO build in 3.3.
Stefan Krah
--
http://mail.python.org/mailman/listinfo/python-list
d, since ß does not occur at the beginning
of a word. As far as I know, most Germans wouldn't even know that it has
existed at some point or how to write it.
Stefan Krah
--
http://mail.python.org/mailman/listinfo/python-list
zero-fault software world: Several verification
tools do exist and Leroy et al. are writing a certified compiler for
C to plug the hole between the verified source code and the generated
assembly.
Stefan Krah
--
http://mail.python.org/mailman/listinfo/python-list
ve-vuln-in-ruby/
Stefan Krah
--
http://mail.python.org/mailman/listinfo/python-list
For C, I think the why3 tool should be a good approach:
http://why3.lri.fr/
The verification of the L4 kernel allegedly took 30 man-years, so
it might take a while...
Stefan Krah
--
http://mail.python.org/mailman/listinfo/python-list
Hi,
I'm pleased to announce the release of cdecimal-2.3. cdecimal is a fast
drop-in replacement for the decimal module in Python's standard library.
Blurb
=
cdecimal is a complete implementation of IBM's General Decimal Arithmetic
Specification. With the appropriate context parameters, cdec
Neil Cerutti wrote:
> On 2012-01-03, Stefan Krah wrote:
> > $ ./python -m timeit -n 100 '"%s" % 7.928137192'
> > 100 loops, best of 3: 0.0164 usec per loop
>
> % is faster, but not by an order of magnitude.
>
> On my machine:
>
> C:
t;...
> outfil_write(append_newline(t))
>...
Did you profile this? I did, and it still adds 22% to the runtime.
Stefan Krah
--
http://mail.python.org/mailman/listinfo/python-list
cing the single line
outfil.write("%s\n" % t)
with
outfil.write("{}\n".format(t))
adds 23% to the runtime. I think %-style formatting should not be
deprecated at all.
Stefan Krah
--
http://mail.python.org/mailman/listinfo/python-list
utable on Solaris:
>
>% file ./python
>./python: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV),
>dynamically linked (uses shared libs), not stripped
./configure CFLAGS=-m64 LDFLAGS=-m64 should work with a reasonably
recent revision.
Stefan Krah
--
http://mai
.5 is no longer maintained.
Stefan Krah
--
http://mail.python.org/mailman/listinfo/python-list
1178, in __add__
ans = ans._fix(context)
File "/usr/lib/python3.2/decimal.py", line 1652, in _fix
context._raise_error(Inexact)
File "/usr/lib/python3.2/decimal.py", line 3836, in _raise_error
raise error(explanation)
decimal.Inexact: None
Stefan Krah
--
http://mail.python.org/mailman/listinfo/python-list
e OP did not specify the base:
>>> bin(2**1000).count('1')
1
Or just:
>>> print(1)
1
Stefan Krah
--
http://mail.python.org/mailman/listinfo/python-list
her with a feature request:
http://bugs.python.org/issue12555
I think the whole concept makes a lot of sense and is really worth
taking a look at.
Stefan Krah
--
http://mail.python.org/mailman/listinfo/python-list
lz -lcrypt -lm -o
> >> build/lib.freebsd-7.0-RELEASE-i386-2.7/_mysql.so
> >> gcc: ${LDFLAGS}: No such file or directory
> >> error: command 'gcc' failed with exit status 1
> >
> > where should I be looking to fix this problem?
Try the patch from http://bugs.python.org/issue10547 or use an svn checkout.
The patch didn't make it into 2.7.1.
Stefan Krah
--
http://mail.python.org/mailman/listinfo/python-list
ave the proper function
> signature.
I suggest that you reconsider, since this appears to work:
def from_param(self):
return ctypes.c_void_p(self.c_ptr)
Stefan Krah
--
http://mail.python.org/mailman/listinfo/python-list
aefa00fef
cdecimal-2.2-no-thread.win-amd64-py2.7.msi
413724ff20ede7b648f57dd9a78a12e72e064583
cdecimal-2.2-no-thread.win-amd64-py3.1.msi
Stefan Krah
--
http://mail.python.org/mailman/listinfo/python-list
.o
> -L/usr/local/lib *-lpython2.6* -o build/lib.aix-5.3-2.6/cStringIO.so
Try these flags: -L. -L/usr/local/lib
If this solves the problem and the issue is also present in Python-2.7,
you should report a bug at http://bugs.python.org/ .
Stefan Krah
--
http://mail.python.org/mailman/listinfo/python-list
the most annoying warnings of the
Intel compiler. See:
http://software.intel.com/en-us/forums/showthread.php?t=62308
The problem is that the compiler issues this warning even when there is
no way that significant bits could be lost.
Stefan Krah
--
http://mail.python.org/mailman/listinfo/python-list
1e-6 and 1e-7.
Try:
>>> format(Decimal("0"), ".11f")
'0.000'
Stefan Krah
--
http://mail.python.org/mailman/listinfo/python-list
Mark Dickinson wrote:
> On Jul 8, 2:59 pm, Stefan Krah wrote:
> > pow() is trickier. Exact results have to be weeded out before
> > attempting the correction loop for correct rounding, and this is
> > complicated.
> >
> > For example, in decimal this expressi
apparent
in the "impossible" paragraph that Mark responded to.
I think asking for strictly bounded resource usage is reasonable. In cdecimal
there is a switch to turn off correct rounding for exp() and log().
Stefan Krah
--
http://mail.python.org/mailman/listinfo/python-list
lts have to be weeded out before
attempting the correction loop for correct rounding, and this is
complicated.
For example, in decimal this expression takes a long time (in cdecimal
the power function is not correctly rounded):
Decimal('100.0') ** Decimal('-557.71e-74288')
Stefan Krah
--
http://mail.python.org/mailman/listinfo/python-list
.2/decimal.py", line 3836, in _raise_error
raise error(explanation)
decimal.InvalidOperation: Invalid literal for Decimal: 'wrong'
>>>c.traps[InvalidOperation] = False
>>> Decimal("wrong", c)
Decimal('NaN')
Stefan Krah
--
http://mail.python.org/mailman/listinfo/python-list
al/decarith.pdf
> (to-engineering-string is on page 20 if you're interested)
The module is correct. Printing without exponent follows the same rules
as to-scientific-string:
"If the exponent is less than or equal to zero and the adjusted exponent
is greater than or equal to -6,
c = Decimal(str(random.uniform(100, 5000))).quantize(Decimal('0.01'))
var = Decimal('8.314').quantize(Decimal('0.01'))
# calc d
d = (a * b)/ (c * var)
if ((c*var*d) / b).quantize(Decimal('0.01')) != a:
print a, (c*var*d) / b
every
> possible user input a single formula. And also it should be possible for a
> computer, my calculator at home does the same and is much smaller and slower.
d = (a * b)/ (c * var)
d = Decimal(d).quantize(Decimal('0.01'))
By quantizing d, the above equality does not hold any l
tly good version numbers. If I don't
> change the number, I get a condescending message "Upload failed (400):
> A file named "Morelia-0.0.10.tar.gz" already exists for
> Morelia-0.0.10. To fix problems with that file you should create a new
> release."
It is qui
Mark Dickinson wrote:
> On Oct 2, 8:53 pm, Stefan Krah wrote:
> > Hi,
> >
> > today I have released the following packages for fast arbitrary precision
> > decimal arithmetic:
> >
> [...]
>
> Nice! I'd been wondering how you'd been finding a
her information and downloads at:
http://www.bytereef.org/libmpdec.html
Stefan Krah
--
http://mail.python.org/mailman/listinfo/python-list
>
> Comments welcome.
No real comment, just to point out an alternative that works well for me:
http://docs.python.org/dev/lib/xmlrpc-client-example.html
Stefan Krah
--
http://mail.python.org/mailman/listinfo/python-list
e) >> 8
if retval == 0:
eclient.submit_chunk(sys.argv[1], int(sys.argv[2]))
eclient.get_chunk(sys.argv[1], int(sys.argv[2]))
elif retval == 1:
eclient.get_chunk(sys.argv[1], int(sys.argv[2]))
time.sleep(10)
else:
"""./enigma has caught a signal
37 matches
Mail list logo