complex numbers in Python
|
10-12-2024, 06:04 PM
Post: #4
|
|||
|
|||
RE: complex numbers in Python
Here's something interesting.
Python on NumWorks has the same behavior as the Prime: complex("1.2") and complex("3.4j") both work, but complex("1.2+3.4j") fails with the exact same error message as the Prime. This would lead me to think that this is a microPython issue. However, on both the TI 84+ CE Python Edition and on the TI Nspire CX II CAS, complex("1.2+3.4j") returns (1.2+3.4j) as expected. This would lead me to think that the issue is related to the implementation. NumWorks does not recognize "import sys", but on the TI 84, sys.implementation returns (name='tipython', version=(3, 2, 4, 2)). On the TI Nspire, it returns (name='micropython', version=(1, 11, 0)) Since the Prime is using version=(1, 9, 4), perhaps this issue was fixed with the later (1, 11, 0). Or, maybe TI patched it for their own use. |
|||
« Next Oldest | Next Newest »
|
Messages In This Thread |
complex numbers in Python - Wes Loewer - 10-12-2024, 01:18 PM
RE: complex numbers in Python - komame - 10-12-2024, 02:25 PM
RE: complex numbers in Python - Wes Loewer - 10-12-2024, 05:51 PM
RE: complex numbers in Python - Wes Loewer - 10-12-2024 06:04 PM
RE: complex numbers in Python - Wes Loewer - 10-12-2024, 06:34 PM
|
User(s) browsing this thread: 2 Guest(s)