Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
new approach to base conversion system and math library
#1
here is what I got so far it handles up to 512 digits of any number in any base the number you enter starts with the base the number is in you can give a sign and it should interpret that correctly and the number is terminated by a symbol # this can handle bases up to base 81 here it is so far:
Code: (Select All)
Dim nmbr$1(63, 511)
Dim avail$1(80)
Dim cnvtbk~%(255)
For s = 0 To 255
    cnvtbk~%%(s) = 255
Next s
For s = 0 To 78
    cnvtbk~%%(s + 48) = s
Next s
cnvtbk~%%(38) = 79
cnvtbk~%%(47) = 80
cnvtbk~%%(45) = 99
cnvtbk~%%(43) = 101
cnvtbk~%%(46) = 124
For s = 0 To 78
    avail$1(s) = Chr$(s + 48)
Next s
avail$1(79) = "&"
avail$1(80) = "/"
Print "    0123456789"
For s = 0 To 7
    Print Chr$(s + 48); "  ";
    For t = 0 To 9
        Print avail$1(s * 10 + t);
    Next t
    Print ""
Next s
Print Chr$(56); "  "; avail$1(80)

Print "enter each number using the format Base sign(+ or -) whole part . then fractional part terminat the number with a #"
Print "use a decimal point as a decimal point the sign be included if omitted the number is assumed to be positive"
Print "use the chart shown to determine digits in the number , for the base use the actual symbol or number that corresponds"
Print "to the highest number reachable in the base used so a 1 for base means base 2 6 for base 7  9 for base 10 and so on"
Print "this can handle up to base 81 for example pi in base 81 is given as /3.;U/# this to 4 base 81 places"
Print " or thata same value pi in base 81 can be /+3.;U/# a negative value would be like this 9-57.94# to indicate -57.94 in base 10"
Print "this program will take 2 numbers you enter in and multiply them max number of digits is 512 total and will output"
Print " the answer in whatever base you chose"
Input "target base : "; tbas$1
Input "first number : "; data1$
Input "second number : "; data2$
If (Len(data1$) + Len(data2$)) > 512 Then Print "numbers are too large"

Reply


Messages In This Thread
new approach to base conversion system and math library - by Dragoncat - 07-05-2025, 05:26 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Keyhit to Inkey Conversion Project Pete 7 595 01-11-2026, 01:26 AM
Last Post: Pete
  3D Sun-Earth-Moon System (_MAPTRIANGLE3D) Magdha 8 747 11-11-2025, 10:09 AM
Last Post: Magdha
  QB UI Library aadityap0901 6 1,187 08-02-2025, 05:13 PM
Last Post: aadityap0901
  Everything Date Library in progress SMcNeill 2 719 05-14-2025, 08:36 PM
Last Post: SMcNeill
  universal base conversion program possibly for a base conversion library later on Dragoncat 22 3,068 04-24-2025, 02:08 AM
Last Post: Dragoncat

Forum Jump:


Users browsing this thread: 1 Guest(s)