On Fri, Jun 15, 2018 at 3:56 PM, Andre Roberge <andre.robe...@gmail.com> wrote:
> * people doing heavy numerical work and wanting code as readable as possible

IME serious numerical work doesn't use approximate equality tests at
all, except in test assertions.

> * teaching mostly beginners about finite precision for floating point
> arithmetics

Given that approximate equality tests are almost never the right
solution, I would be worried that emphasizing them to beginners would
send them down the wrong path. This is already a common source of
confusion and trap for non-experts.

> * people wishing to have trigonometric functions with arguments in degrees,
> as in a current discussion on this forum.

AFAICT approximate equality checks aren't really useful for that, no.
(I also don't understand why people in that argument are so worried
about exact precision for 90° and 30° when it's impossible for all the
other angles.)

Python is *very* stingy with adding new operators; IIRC only 3 have
been added over the last ~30 years (**, //, @). I don't think ~= is
going to make it.

-n

-- 
Nathaniel J. Smith -- https://vorpus.org
_______________________________________________
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to