Try Brilliant: https://brilliant.org/mCoding/
Complex rational numbers.
Say you wanted to implement your own custom number type in Python, how would you do it? In this video, we'll take a look at a custom implementation of an infinite precision number type for complex numbers with rational components, aka "Gaussian rationals".
― mCoding with James Murphy (https://mcoding.io)
Source code: https://github.com/mCodingLLC/VideosS...
Slots video: • Python __slots__ and object layout ex...
Fast pow video: • Fast pow! A general recursive power a...
New vs init video: • __new__ vs __init__ in Python
Python numbers docs: https://docs.python.org/3/library/num...
Python stdtypes docs: https://docs.python.org/3/library/std...
SUPPORT ME ⭐
---------------------------------------------------
Sign up on Patreon to get your donor role and early access to videos!
/ mcoding
Feeling generous but don't have a Patreon? Donate via PayPal! (No sign up needed.)
https://www.paypal.com/donate/?hosted...
Want to donate crypto? Check out the rest of my supported donations on my website!
https://mcoding.io/donate
Top patrons and donors: Jameson, Laura M, Dragos C, Vahnekie, Neel R, Matt R, Johan A, Casey G, Mark M, Mutual Information
BE ACTIVE IN MY COMMUNITY 😄
---------------------------------------------------
Discord: / discord
Github: https://github.com/mCodingLLC/
Reddit: / mcoding
Facebook: / james.mcoding
CHAPTERS
---------------------------------------------------
0:00 Intro
1:21 Start of implementation
4:00 Arithmetic operations
11:32 Hash and equality
15:13 Thanks to Brilliant
On this page of the site you can watch the video online Extending Python's Number hierarchy with a duration of hours minute second in good quality, which was uploaded by the user mCoding 30 January 2023, share the link with friends and acquaintances, this video has already been watched 28,856 times on youtube and it was liked by 1.3 thousand viewers. Enjoy your viewing!