Package proposal: Number_Base

From: Date: Sat, 19 Apr 2003 22:41:30 +0000
Subject: Package proposal: Number_Base
Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-15250@lists.php.net to get a copy of this message
Hello! If this message appears two times, I'm sorry. I wrote a small class with some functions that allow converting numbers from any base to another, as long as a long enough list of digits is provided (The standard list Has 62 digits, 0-9A-Za-z). The list can be changed at any point. The functions PHP provides only allows converting binary, octal, decimal and hexadecimal numbers into each other, and are limited to numbers up to 0x7FFFFFFF. If the bcmath library is enabled, this limit doesn't exist in my class. Currently, only integers are supported. I'm proposing this package for the category `Number', package name `Number_Base'. Planned features are: * Addition, multiplication, subtraction, division and modulus for numbers in any base. * The previous would allow to get rid of the 0x7FFFFFFF limit, using the functions as a fallback for bcmath. * Ability to use different sets of digits for the input/output numbers * Support for floats, including a precision setting phpDocumentor documentation: http://fuer-et.de/doc/ sourcecode: http://fuer-et.de/doc/Number_Base_source.html Regards, Stefan Walk

« previous php.pear.dev (#15250) next »