(48G/49/50) Conversion To and From Base i-1 +- HP Forums (https://www.hpmuseum.org/forum) +-- Forum: HP Software Libraries (/forum-10.html) +--- Forum: General Software Library (/forum-13.html) +--- Thread: (48G/49/50) Conversion To and From Base i-1 (/thread-19598.html) |
(48G/49/50) Conversion To and From Base i-1 - John Keith - 02-25-2023 04:11 PM Complex base i-1 enables positive and negative integers, and Gaussian integers, to be represented by a nonnegative integer. More information in this paper. The programs listed here convert between integers or complex numbers and their base i-1 representation. The programs are in the form of a directory because there are several sub-programs and several dependencies. The directory includes the programs I→DL and DL→I from this thread. These two programs can be removed from this directory if they are already in your path. The programs I→Bi1 and Bi1→I are for the conversion of positive or negative integers. They are short and fast because they take advantage of simple bit patterns. The programs Z→Bi1 and Bi1→Z are for the conversion of complex numbers (or imaginary numbers in the form of (0, n)). These programs are considerably larger and more.. complex. ![]() Code:
|