Home >> Science >> Math >> Number Theory >> Software >> UBASIC




UBASIC occurs as freeware BASIC interpreter written by Yuji Kida at Rikkyo University in Japan, specialized in mathematical computing. Essential features consists of the resulting: Strong emphasis in number theory Has quick-processed application like primality test, factoring, Bernoulli numbers, zeta work, etc. Versions from either Eighter.74 stand graphics Can act by owning prices as much as 2600 digits (bignums), but by using functions & complex numbers the digit limit is less Has in-line context-sensitive help

UBASIC is suitable for complete beginners (fresh pack & corrected serve version) to agent mathematicians.

UBASIC features and discussion

UBASIC occurs as quick-to-process language that doesn't require to exist as insteverthing by using another advanced language (an all-as well-most common condition using multi-digit math languages). It diarrhethe witharound DOS or even in a DOS pack under DOS shell, Windows, etc. These are unquestionably a language to utilize for to test blunt theory, primality touching, factorisation, and/or really big many digits for yourself. Existence an implementation of BASIC makes it super real life to review computer software forswearing getting to wash extensive learn, when BASIC is the language that is nighest to average algebra. Therein aspect these are better than FORTRAN & lot better than PASCAL. A facilitate has articles & lessons if you want the two.

UBASIC has the built-integral in-line editor by having many helps for debugging. It potty indicate cross information to calling lines, lines containing the variable, & lists of variables/arrays. It may renumber lines, vary variable list, & append extra software online. It could trace, lone step, & period by msec to help determine a fastest way to wash extremely insistent sections. It may redefine work keys, either to provide an easily of these-keypress work or even to stop the standard work from either existence inadvertently utilized after it shouldn't. It potty casing to DOS or even execute the DOS command. It may convert between individual-byte character placed & double-byte character placed, however to keep close at hand great deal utilize for these that you would probably want an caring operating formulas. Documents can be added to or even modified within UBHELP.HLP.

Although interpreted these are quite convenient.
Primality researching by having APRT-CLE (to 884 digits) (these are better to begin this under UBASIC version Octonary.8F or even afterwards): D digits said to choose V hours in the PP-200, 150 digits will require astir Xvi proceedings in the 486-100, just all about 2¼ minutes in the K6@233; 250 digits will require about 13½ minutes in the K6@233. Recent machines may be as much as X days sooner. APRT-CLE is typically A program-of-guide of agent & amateur mathematicians in the world for researching primality of whole number in its range.
Factorisation sustaining software download like ECMX is besides quite convenient. It potty locate factors to great-20's digits fairly well, mid-20's somewhat less well, & upper-20's by owning (s)lower risk of profits. It has obtained the Xxx-digit factor. (Choosing factors by owning Ovoid Curve Method is universally chancy for big factors. A greater a total of curves that come tested a greater a chances of profits, however a total required (on a average - we could every now and again acquire lucky or even ill-omened) increases speedily by having the size of the factors. Utilize a fastest machine your family potty call for.) ECMX utilizes a accepted standards for restricts of once to prevent working by owning 1 curve & switch to the next. It has preliminary primality researching, searching for little factors, & powers.
Existence interpreted allows modifying a program so restarting (applying GOTO) midmost of a multi-day do forgoing losing accumulated information (non recommended unless the program has already been saving the information safely someplace or even if we forgot to write how else to save information whenever quitting (mayhap you didn't require to call for any & were trying to prove it)). After doing anything that may lose priceless information, or even if professional people want to launder something else awhile, so you can FREEZE a todays program to a file & late Melting it (when yearn when the moo memory configuration is the equivalent).

This BASIC has line prices. It doesn't have indentation to control structure. It has function & user functions by having passed parameters & local variables. Parameters may be pass value or even by title. User functions & procedure can be passed when parameters. It has limited labels. It has various choices for mislead functions. Busy people could indent up to busy people such as or even non the least bit. That wise shoppers could develop when much structure as you please or even sum spaghetti. It would become the mistake to assume this implementation when "not modern" (every bit will exist as inferred by the reader of articles that confuse indentation by having structure & don't favor line statistics). With line prices allows easily jumping to an medium point around the routine, which could periodically save duplication of lines.

Version 8 of UBASIC hwhen a high preciseness real & complex arithmetical (as much as 2600 digits) of former versions, & adds precise rational arithmetic & arithmetic of only-variable multinomial by using complex, rational, or even modulo p coefficients, too as string treating & limited listings treating capabilities. Additionally UBASIC has context-sensitive in-line documentation (scan UBHELP.DOC for trading tools). the file that this utilizes is ASCII & may be printed for a paper document.
North.B.: A presently available versions of the aid file keep close at hand numbers of errors. The 10-month plan to rewrite/correct these are about quick for publication (probably by late summertime 2005): search serve file by having freshly extension '.hlp' , & yet pack title u3d748f*. There exists an available names of updates however numbers of changes remain unreported.

Version 8.Eighter from decatur has different preciseness than Octonary.74

There are however a bit of commands that own there is no documentation: SCHOOL KEYSCAN MODMUL( There is a freshly command from either version Octet.8C POLYCONV( that converts multinomial between modulus=Cipher & modulus=prime. No formatting specifications. WARNING: Never line 1 text retired any one whilst spell anything significant is (or even even can become) going or suspended someplace else, when lockups can be required, particularly for KEYSCAN. Understand: FREEZE, ROLL, MELT. (for similar warning)

UBASIC has many types of arrays, logical operators, bit operators, Quaternion standard loop structures, & conjunct operators. It potty call for machine language routines for increased speed (ECMX does this), however that you must see assembly language to potentially understand the instructions - merely existence take a breath to write TSR's around DEBUG is non plenty.

That you might compute the string's value whenever it is the maths formula.
That you potty ordinarily execute the string in case it is the UBASIC command.
Variables holding strings can commonly exist as substituted for the strings.
Strings may be alphabetized utilizing MIN or even MAX .

UBASIC may be utilized to run about any kinda information. For instance: .WAV files. It potty run document to convert tabs to spaces or even spaces to tabs (a select few computer program may't generate tabs & occasionally actually choke in the babies).

Variable types include: Unity: integer Ii: rational Tierce: real Tetrad: complex number Fivesome: string Half a dozen: packet (mixed from either any types including more packets) Seven: polynomial Ogdoad: mod multinomial (coefficients whole number modulo the prime)

An early 2005 cyberspace seek turned higher versions Viii.74(32), Eight.74(Xvi), Octonary.71(4000(Sixteen)), Nina from carolina.0ZE, [9.0ZC, 9.0E,] Ogdoad.8F(32), Octonary.8F(Xvi), Eighter.8F(C), [8.7E(32), 8.7E(16), 8.30(32), 8.30(16), 7.25(32), 7.25(16), 8.8A(32), 8,8A(16), 8.8A(C), 8.8C(32), 8.8C(16), 8.8C(C), 8.8E(32), 8.8E(16), 8.8E(C)]. Xii versions away from 52 known totals. Numbers of one are non directly identified. (A (Sixteen) & (32) refer to the total of bits in the multiplication engine. (4000) refers to favorite versions that potty last as much as complete 4000 digits (a few users might want one of these, like to generate a foremost 792 Bernoulli statistics to double stock 1584: a latest version could merely develop 540/1080). A (C) is for CGA machines. A versions within brackets are non recommended.)
Virtually all users would just want Eight.8F.
Should you be already applying the version in the future than Eighter from decatur.74 & especially should you be applying the version late than Octonary.7E so your family is strongly advised to switch to the latest version (Ogdoad.8F). A few software (fancy display, for instance) written for Octad.74 might not operate inside Octad.8F forswearing considerable revising. A latest versions don't strip carriage returns/line provender from either ASCII files, & computer program like UBH (possibly a a single within Ogdoad.8F) require added lines to strip the babies. Any program written for a single version should non become utilized in another version while forgoing checking.

Certain software like NFS might single do in experimental version Niner.**.
A ppmpx36e version of the multi-polynomial quadratic screen needs Eighter from decatur.8F & Windows.

Occasionally versions of UBASIC come sustaining the defective UBCONST7.DAT file. Wise shoppers should prevent yours against a a single supplied within Octad.8F. In case these are non monovular so that you should switch.

UBASIC is available for I: IBM-PC/AT & compatibles Two: NEC PC-9801 Ternary: NEC PC-H98 Quatern: Fujitsu FM-R V: Toshiba J-3100 Captain hicks: AX Seven: DOS/V

For obtaining a latest version of UBASIC, understand external links sections. Numbers of net mathematics places stand a language/packages in their have web sites.

As well clean an cyberspace lookup for "UBASIC" to buy a homepage & thomas more. Many mathematicians use their have software download using your internet browser.

UBASIC was written by: Prof. Yuji Kida Department of Mathematics Rikkyo University Nishi-Ikebukuro Trio, Tokyo 171, JAPAN. (e-electronic mail: kida@rkmath.rikkyo.ac.jp)

Sample program
A resulting occurs as short elementary program for the partition count work. Although it doesn't develop several of the fancier structures, these are the very program, non invented for this article. inside a modern convenient Athlon it should calculate the partition numbers from either p(Nought) to p(Grand) in astir ½ 2nd. Direct contrast that to above ½ century a foremost instance across. To save the symptom to a file, uncomment line Forty (dislodge leading apostrophe).

Tenner console:console 1,24,0:locate 1,0 Twenty print chr(Ii);"n","p(n)","Partition Count" 30 word -19:point -8:H%=Xi:'for North as much as ~1200 Xl 'print=print+"partn5.txt":'output redirect L North=Cypher:'input N Sixty clr time Seventy Mu=pi(sqrt(24*N-One)/6) Eighty clr S Xc for K=Unity to H% One c '110 to 160 is Selberg formula 110 clr C Great hundred for L=Zero to 2*K-1 130 whenever ((3*L^2+L)\2)@K=(-North)@K 140 :C+=(-I)^L*cos(pi((6*L+1)/(6*K))) 150 next 160 'for The(K,N), multiply Hundred by sqrt(K/3) 170 U=exp(Mu/K) 180 R=(Mu+K)/U:'Rademacher's convergence term 190 S+=((Mu-K)*U+R)*C 200 next 210 S=spherical(acrylonitrile-butadiene-styrene(S*2/(Mu*(24*N-One)))) 220 print cutspc(str(North)); 230 make contact with 38-alen(S):print S 240 iNorth case N<1000:inc N:goto 70 250 Tt=time1000:print=print:print Tt/1000 260 '~1.7% sooner in case N,K,L changed to N%,K%,L%

Accuracy

A big accuracy of UBASIC allows system to exist as strikingly apparent. C. F. Gauss, utilizing upright pencil & paper, is said to keep close at hand universally worked to at least Twenty fraction digit accuracy. This aids a system to have out from either a mud. Numerous or even virtually all discoveries inside mathematics & science came from either recognizing that the pattern lives.

After working by having continued fractions, a total of terms is limited per available accuracy & per size of both term. An approximate formula is Two decimal fraction digit accuracy for both (term days a base tenner log of the term). A simply way to run such operate safely is to sleep sustaining twice, around parallel, with a initial input to of these dithered in the final many digits (at least Single word). So after them calculations don't give monovular terms, prevent at a former term. UBASIC is very convenient for continued fraction operate.

UBASIC may calculate a partition count work to across p(1330521). (Within Octonary.74 as much as p(1361911) & a 4000 digit versions should make their way numbers of extra.) It was found by trial & error that there are numbers of congruity inside numerous groups that were non widely published and non known to maine.

UBASIC Programs
Simple examples for use in a Number Theory course.

UBASIC
Version 8.8f download from the official site.

UBASIC
Rather-old version (8.74) of this package.

UBASIC Home
Downloads for version 8.8f, help files, bug reports, benchmarks, timings, and links. (Much in Japanese).

Babbage Difference Engine
Emulator in UBASIC.

DOS Beowulf
Simple, inexpensive Beowulf supercomputing clusters for DOS using UBASIC.

MALM
A collection of UBASIC programs which can be used in number theoretic investigations.






© 2005 GeneralAnswers.org