Square Root: Digit by Digit Algorithm
|
11-25-2022, 02:28 PM
Post: #7
|
|||
|
|||
RE: Square Root: Digit by Digit Algorithm
(11-25-2022 10:59 AM)Thomas Klemm Wrote: The usage is rather clumsy but could be improved by wrapping these "lazy numbers" in a class. Personally, I like the "clumsy" approach. It reminds user the delayed evaluation part. mpmath does use the "clean" approach with many constants, by wrapping it in a class. >>> import mpmath >>> mpmath.ln2 <ln(2): 0.693147~> >>> type(_) <class 'mpmath.ctx_mp_python.constant'> ctx_mp_python.py: Code: class _constant(_mpf): |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 2 Guest(s)