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]
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
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
>
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
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
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
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
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
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
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
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
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
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
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
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
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,
16 matches
Mail list logo