[issue41528] Use math module in turtle

2020-09-02 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

You could post a suggested replacement for a couple of the expressions, with 
the warning that we would not necessarily use it.  math.hypot has recently be 
worked over so that it is perhaps more accurate than the  standard C version.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41528] Use math module in turtle

2020-09-02 Thread Marek Madejski


Marek Madejski  added the comment:

Complex numbers to be considered, of course.
My first pull request, so I'd rather not make such a revolution this time. :)

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41528] Use math module in turtle

2020-09-01 Thread Terry J. Reedy


Terry J. Reedy  added the comment:


New changeset 6844b56176c41f0a0e25fcd4fef5463bcdbc7d7c by Marek Madejski in 
branch 'master':
bpo-41528: Use math module in turtle (GH-21837)
https://github.com/python/cpython/commit/6844b56176c41f0a0e25fcd4fef5463bcdbc7d7c


--
nosy: +terry.reedy

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41528] Use math module in turtle

2020-08-12 Thread Vedran Čačić

Vedran Čačić  added the comment:

Well, if you want to exploit Python features in full, I'd suggest cmath as even 
better library. Turtle position is just a complex numbers, and cmath has direct 
conversion from and to polar coordinates, which is all that's needed for basic 
commands. :-)

--
nosy: +veky

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41528] Use math module in turtle

2020-08-12 Thread Marek Madejski

New submission from Marek Madejski :

"Turtle" module is closely related to geometry, which is also covered by "math" 
(and "cmath") module. Nevertheless, in many places in "turtle" the wheel is 
being reinvented. Currently, only π and basing trig functions are used.
Performance may be improved by such refactor (for example, by using 
"math.hypot" instead of manual calculation of vector norm).

--
components: Library (Lib)
messages: 375215
nosy: TrangOul
priority: normal
pull_requests: 20965
severity: normal
status: open
title: Use math module in turtle
type: performance
versions: Python 3.10, Python 3.6, Python 3.7, Python 3.8, Python 3.9

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com