Commit Graph

20 Commits

Author SHA1 Message Date
Valentin Lorentz
169824a9d2 Math: make @icalc fail early when result is too large
This avoids inconsistent errors between CPython 3.10.7 and older
versions; and the result would not be readable anyway.

Closes GH-1517.
2022-09-18 20:06:34 +02:00
Valentin Lorentz
c0d033ff84 Math: Fix crash in @convert on small/large single-digit numbers
str() converts them to the exponent notation, which makes split('.')[1]
crash, since there is no decimal part in the exponent notation when there
is a single significant digit.
2021-11-28 18:00:58 +01:00
Valentin Lorentz
63eb6672ea Revert generic 'The Limnoria Contributors' in copyright notices
This commit reverts db7ef3f025
(though it keeps the year updates)

After discussion with several people, it seems better to mention
copyright owners explicitly. eg. https://reuse.software/faq/#vcs-copyright
explains the issue of using VCSs to track copyright.

As db7ef3f025 only replaced mentions
of my name with 'The Limnoria Contributors', this commit only needs
to undo that + add one person who contributed to setup.py.
2021-10-17 09:57:55 +02:00
Valentin Lorentz
db7ef3f025 all: Add generic 'The Limnoria Contributors' to copyright notices.
No need to bother with details (that are all outdated / out of sync
anyway), just look up the git history.
2021-08-01 21:54:49 +02:00
Valentin Lorentz
6da0e7fc5f Math: Fix test on Python 3.10 (nightly) 2020-09-19 10:38:07 +02:00
Valentin Lorentz
1a69a7b892 Math: Fix test on Pypy. 2019-11-11 12:38:27 +01:00
Valentin Lorentz
78a50c81bd Math: Display a nicer error in case of MemoryError. 2019-11-11 12:12:10 +01:00
Valentin Lorentz
3848ae78de Math: Rewrite calc functions with a proper evaluator.
Instead of hacking around eval(), which everyone knows is a bad idea
even with prior expression sanitizing.
2019-11-09 15:49:31 +01:00
jacksonmj
97c7d0a9c3 Math.calc: allow factorial for smallish numbers 2015-08-29 01:27:50 +00:00
Valentin Lorentz
216c5d213f Replace sys.version_info[0] usages with minisix.PY{2,3}. 2015-08-09 00:23:03 +02:00
nyuszika7h
9f059b91ba Add missing future imports for print_function
There are some places where `print()` is used to print a blank line.
However, unless the future feature `print_function` is imported,
that will print `()` in Python 2.
2015-06-12 22:22:16 +02:00
Valentin Lorentz
c1c23f66f4 Continue accelerating the 2to3 step (remove fix_print). 2014-01-20 15:31:09 +01:00
Valentin Lorentz
ee4690ea18 Math: Skip tests of negative integers exponentiation on Python 2. 2013-12-15 18:44:11 +00:00
Valentin Lorentz
0ff58db4f0 Math: Fix tests to allow higher precision. 2013-01-11 18:15:02 +01:00
James McCoy
82ecf36fcd Update my name/contact information
Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
2012-09-01 10:16:48 -04:00
Valentin Lorentz
7593edb6fc Math: Allow 'factorial()' in icalc.
Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
2012-05-23 06:04:51 -04:00
James Vega
62897a9663 Workaround Python's idiocy with float -> str -> float conversions 2009-03-11 13:37:26 -04:00
James Vega
a3e4fc5b1d Change the modeline to use softtabstop instead of tabstop. 2006-02-11 15:52:51 +00:00
James Vega
9971e991fe Fix the modelines. 2005-03-23 20:07:45 +00:00
Jeremy Fincher
d9df5136cd Added the Math plugin in the new plugin package format. 2005-01-19 23:29:28 +00:00