Re: If you are running 32-bit 3.6 on Windows, please test this

2017-09-02 Thread Pavol Lisy
On 9/2/17, eryk sun wrote: > On Fri, Sep 1, 2017 at 3:23 AM, Peter Otten <__pete...@web.de> wrote: >> >> I think you have to specify the types yourself: >> > import ctypes > libm = ctypes.cdll.LoadLibrary("libm.so") > libm.sqrt(42) >> 0 > libm.sqrt.argtypes = [ctypes.c_double]

Re: If you are running 32-bit 3.6 on Windows, please test this

2017-09-01 Thread eryk sun
On Fri, Sep 1, 2017 at 2:24 AM, Pavol Lisy wrote: > > I was trying to call sqrt using ctypes from msvcrt but I am not succesful: > > import ctypes > msc = ctypes.windll.msvcrt msvcrt.dll is private to Windows components. It's not intended for applications. See my previous post in this thread for

Re: If you are running 32-bit 3.6 on Windows, please test this

2017-09-01 Thread eryk sun
On Fri, Sep 1, 2017 at 3:23 AM, Peter Otten <__pete...@web.de> wrote: > > I think you have to specify the types yourself: > import ctypes libm = ctypes.cdll.LoadLibrary("libm.so") libm.sqrt(42) > 0 libm.sqrt.argtypes = [ctypes.c_double] libm.sqrt.restype = ctypes.c_double >

Re: If you are running 32-bit 3.6 on Windows, please test this

2017-09-01 Thread Peter Otten
Pavol Lisy wrote: > On 8/31/17, 20/20 Lab wrote: >> >> >> On 08/31/2017 01:53 AM, Pavol Lisy wrote: > [...] >> Valid point, fired up a windows 10 machine and worked as well. >> >> Python 3.6.2 (v3.6.2:5fd33b5, Jul 8 2017, 04:14:34) [MSC v.1900 32 bit >> (Intel)] on win32 >> Type "copyright", "cre

Re: If you are running 32-bit 3.6 on Windows, please test this

2017-09-01 Thread Pavol Lisy
On 8/31/17, 20/20 Lab wrote: > > > On 08/31/2017 01:53 AM, Pavol Lisy wrote: [...] > Valid point, fired up a windows 10 machine and worked as well. > > Python 3.6.2 (v3.6.2:5fd33b5, Jul 8 2017, 04:14:34) [MSC v.1900 32 bit > (Intel)] on win32 > Type "copyright", "credits" or "license()" for more i

Re: If you are running 32-bit 3.6 on Windows, please test this

2017-08-31 Thread 20/20 Lab
On 08/31/2017 01:53 AM, Pavol Lisy wrote: On 8/31/17, Terry Reedy wrote: On 8/30/2017 1:35 PM, Terry Reedy wrote: https://stackoverflow.com/questions/45965545/math-sqrt-domain-error-when-square-rooting-a-positive-number reports the following: - Microsoft Windows [Version 10.0.16251.10

Re: If you are running 32-bit 3.6 on Windows, please test this

2017-08-31 Thread Pavol Lisy
On 8/31/17, Terry Reedy wrote: > On 8/30/2017 1:35 PM, Terry Reedy wrote: >> https://stackoverflow.com/questions/45965545/math-sqrt-domain-error-when-square-rooting-a-positive-number >> >> >> >> reports the following: >> - >> Microsoft Windows [Version 10.0.16251.1002] >> (c) 2017 Microsoft Co

Re: If you are running 32-bit 3.6 on Windows, please test this

2017-08-31 Thread Serhiy Storchaka
31.08.17 08:13, Steven D'Aprano пише: As far as I can see, apart from tests for NAN and ±INF, there are no tests of math.sqrt on floats at all. See test_testfile in test_math.py. -- https://mail.python.org/mailman/listinfo/python-list

Re: If you are running 32-bit 3.6 on Windows, please test this

2017-08-30 Thread Steven D'Aprano
On Wed, 30 Aug 2017 20:46:54 -0400, Terry Reedy wrote: > On 8/30/2017 1:35 PM, Terry Reedy wrote: >> https://stackoverflow.com/questions/45965545/math-sqrt-domain-error- when-square-rooting-a-positive-number [...] > Three people have reported that math.sqrt(1.3) works in 32 bit Python on > 64-bit

Re: If you are running 32-bit 3.6 on Windows, please test this

2017-08-30 Thread Terry Reedy
On 8/30/2017 1:35 PM, Terry Reedy wrote: https://stackoverflow.com/questions/45965545/math-sqrt-domain-error-when-square-rooting-a-positive-number reports the following: - Microsoft Windows [Version 10.0.16251.1002] (c) 2017 Microsoft Corporation. All rights reserved. C:\Users\Adam>python

Re: If you are running 32-bit 3.6 on Windows, please test this

2017-08-30 Thread Chris Angelico
On Thu, Aug 31, 2017 at 6:24 AM, Ian Kelly wrote: > In the Stack Overflow thread, rosuav wrote: >> Quick smoke-test: can you show the value of math.__file__ please? Editing >> your question to add that would eliminate a particular class of issue (or >> reveal the problem, perhaps). > > (Replying

Re: If you are running 32-bit 3.6 on Windows, please test this

2017-08-30 Thread Ian Kelly
In the Stack Overflow thread, rosuav wrote: > Quick smoke-test: can you show the value of math.__file__ please? Editing > your question to add that would eliminate a particular class of issue (or > reveal the problem, perhaps). (Replying here because SO requires 50 reputation to comment, and the

Re: If you are running 32-bit 3.6 on Windows, please test this

2017-08-30 Thread 20/20 Lab
On 08/30/2017 10:35 AM, Terry Reedy wrote: https://stackoverflow.com/questions/45965545/math-sqrt-domain-error-when-square-rooting-a-positive-number reports the following: - Microsoft Windows [Version 10.0.16251.1002] (c) 2017 Microsoft Corporation. All rights reserved. C:\Users\Adam>pyth

Re: If you are running 32-bit 3.6 on Windows, please test this

2017-08-30 Thread Jerry Hill
On Wed, Aug 30, 2017 at 1:48 PM, MRAB wrote: > > On 2017-08-30 18:35, Terry Reedy wrote: >> >> https://stackoverflow.com/questions/45965545/math-sqrt-domain-error-when-square-rooting-a-positive-number >> >> reports the following: >> - >> Microsoft Windows [Version 10.0.16251.1002] >> (c) 2017

Re: If you are running 32-bit 3.6 on Windows, please test this

2017-08-30 Thread MRAB
On 2017-08-30 18:35, Terry Reedy wrote: https://stackoverflow.com/questions/45965545/math-sqrt-domain-error-when-square-rooting-a-positive-number reports the following: - Microsoft Windows [Version 10.0.16251.1002] (c) 2017 Microsoft Corporation. All rights reserved. C:\Users\Adam>python Py

If you are running 32-bit 3.6 on Windows, please test this

2017-08-30 Thread Terry Reedy
https://stackoverflow.com/questions/45965545/math-sqrt-domain-error-when-square-rooting-a-positive-number reports the following: - Microsoft Windows [Version 10.0.16251.1002] (c) 2017 Microsoft Corporation. All rights reserved. C:\Users\Adam>python Python 3.6.2 (v3.6.2:5fd33b5, Jul 8 2017,