Post Reply 
Question. Basic with good math libraries
03-13-2018, 08:34 AM
Post: #1
Question. Basic with good math libraries
I am following the thread about a 71B repair http://www.hpmuseum.org/forum/thread-10300.html that looks like a detective work and I like it.

The thread was also the cause that I looked about the 71B capabilities a bit more. All the other threads so far, even the 71B compendium (n1), were not enough to interest me. One can say that a "door" on a concept can be found in the least probable places.

Anyway reflecting upon the little knowledge that I have, it seems that around the 1980 a series of calculators with basic as main programming language were created by several brands. I remember an article of Valentin Albillo were he shows that a sharp pc-1211 is quite a contender for the hp41. That sharp used basic.

Now those dialect of basic had also good math capabilities. The 71B (and the 75 series) was also a calculator and the library of math functions looks large, with the Math ROM plus other ROMs (see the 71B compendium).

What I notice though is that, aside from emulators, nowadays there is no actively developed open source basic (n2) that has a strong math library readily available as the math libraries in the 71B or other basic calculators of the 80-90 . At least for what I know.

Am I mistaken? Can you point out any basic that is equipped with a math library like the 71B ?

Then another question, in the other way. Those implementation of basic, like the one for the 71B, were also ported for other architectures? Like x86? Is there a chance that were open sourced?

n1: http://www.hpmuseum.org/forum/thread-5286.htmlm that is linked in wikipedia, thanks Sylvain, Joe, Matthiaspaul and all the others contributing in that marvelous work. Also I saw that it was updated again, as some pieces were unreachable when I crawled them. I have to crawl it again and pack it in the hp calc torrent.

n2: Thus no visual basic .net or closed source implementations. Otherwise blitzmax would be great enough. But those closed source environments may "die" or be usable only with emulators or virtual machines/environments.
Also decimal basic, recently discussed, http://hp.vector.co.jp/authors/VA008683/english/ , looks promising but (a) the list of math routines are not that much, the 50g has more, although combining them may be enough, (b) I do not see it is open source and (c) I am not sure whether it is actively developed.

Wikis are great, Contribute :)
Find all posts by this user
Quote this message in a reply
03-13-2018, 11:57 AM
Post: #2
RE: Question. Basic with good math libraries
(03-13-2018 08:34 AM)pier4r Wrote:  Am I mistaken? Can you point out any basic that is equipped with a math library like the 71B ?

Then another question, in the other way. Those implementation of basic, like the one for the 71B, were also ported for other architectures? Like x86? Is there a chance that were open sourced?

Also decimal basic, recently discussed, http://hp.vector.co.jp/authors/VA008683/english/ , looks promising but (a) the list of math routines are not that much, the 50g has more, although combining them may be enough, (b) I do not see it is open source and (c) I am not sure whether it is actively developed.

What math routines are you looking for? Decimal BASIC has all the usual trig functions, hyperbolics. Also you can set degrees or radians as the angle mode so you don't need conversion factors as in some radian-only BASICs.

Decimal BASIC is definitely actively developed. Remember, though, that the aim of Decimal BASIC to implement the ANSI/ISO Full Standard for BASIC which is a fixed document. There are no new features or developments in ANSI Standard BASIC. Decimal BASIC changes are usually limited to bug fixes and will therefore slow down as compatibility with the standard is approached asymptotically. The latest versions are from January 2018. The author is always ready to answer questions and is very active in the Decimal BASIC forum:

Decimal BASIC Forum

I usually use the interpreted version for debugging and then use the compiler version to create the finished program. The compiler translates the program into Pascal which is then compiled to true machine language by the Lazarus Pascal compiler. The process is transparent to the user. All you have to do is click Run. The program is compiled and linked automatically. The resulting EXE file is as fast as any C compiled program I've seen. So much for BASIC being slow!

Tom L
Cui bono?
Find all posts by this user
Quote this message in a reply
03-13-2018, 12:20 PM
Post: #3
RE: Question. Basic with good math libraries
If we're only excluding VB.NET - which is really more like Pascal or C, and has very little in common with BASIC - based on licensing, then I think Python + numpy + scipy is probably the high-level language of choice these days for math and data science.
Visit this user's website Find all posts by this user
Quote this message in a reply
03-13-2018, 02:54 PM
Post: #4
RE: Question. Basic with good math libraries
(03-13-2018 11:57 AM)toml_12953 Wrote:  What math routines are you looking for? Decimal BASIC has all the usual trig functions, hyperbolics. Also you can set degrees or radians as the angle mode so you don't need conversion factors as in some radian-only BASICs.

Thanks for sharing the info. Good to know that it is actively developed and I understand the idea to close the gap to a fixed document. I do not remember who said something here, maybe Paul Dale, that running behind ever expanding set of features kills the motivation of the dev team.

As you pointed out, the set of routines included in Basic are fixed, but I am not asking for routines only included with the standard library. I am talking also about external libraries. I found several basic libraries of "*.bas" there and there that are partial. I believe that if one works on it, can collect quite a library of routines after porting, testing, polishing. The problem is that it is a lot of work. I was expecting some sort of math routines well collected already. Only this. For this I recalled the 71B that has math libraries already done and packed, that are quite vast (for example, they offer a lot of functions with complex arguments, solvers, etc...).

(03-13-2018 12:20 PM)Dave Britten Wrote:  If we're only excluding VB.NET - which is really more like Pascal or C, and has very little in common with BASIC - based on licensing, then I think Python + numpy + scipy is probably the high-level language of choice these days for math and data science.

Vb.NET is not really like pascal or C, rather like C# or Java. The .net idea is exactly getting away from medium level languages where one has to care about memory management and co.

I know about python or numpy, and I know that they are pretty good, but I cannot really digest the indentation pattern in python. I find it quite clean to read, but it doesn't fit the way I make comments and I highlight little blocks of statements (I highlight them surrounding them with empty lines).

Also in this particular case I am focusing on Basic, since there is the connection with the 71B that had already plenty of useful stuff but it seems that it was not ported in the PC world (aside from 71B emulators).

Wikis are great, Contribute :)
Find all posts by this user
Quote this message in a reply
03-13-2018, 05:35 PM (This post was last modified: 03-13-2018 05:36 PM by Garth Wilson.)
Post: #5
RE: Question. Basic with good math libraries
I got quite proficient at operating the HP-71 including its Math module and programming it in it user language. It was way, way beyond any BASIC I had seen previously. It made sense, I thought, that HP's Rocky Mountain BASIC (RMB), made to run on the big computers and taking 500KB+ (which was a lot of memory back then!), should be yet another big step up in everything good; so for a project at work in the late 1980's to control an automated production test setup, I got RMB 5.1, to run it on a 68000-based Viper board that went into a PC slot and had the IEEE-4888 connector on the back to go to our equipment. I was extremely disappointed. It was so clumsy and limiting, compared to the 71!

There was however HT BASIC which I seem to remember was TransEra's cloning of HP BASIC (RMB) for x86 PCs.

The 71 doesn't just use extensive libraries though. The vast wealth of native complex-number functions and so on in its Math module are written in assembly language for maximum performance, and they actually extend the language, including the functionality of basic operators; for example, if A and B are complex variables (or even if only one of them is complex), A*B yields a complex result, with no complaints. The FFT word FOUR could do a 1024-point complex fast Fourier transform in half the time it took the original IBM PC to do it in GWBASIC, even though the PC had the clock speed advantage by a factor of 7½ times.

http://WilsonMinesCo.com (Lots of HP-41 links at the bottom of the links page, http://wilsonminesco.com/links.html )
Visit this user's website Find all posts by this user
Quote this message in a reply
03-13-2018, 07:32 PM
Post: #6
RE: Question. Basic with good math libraries
(03-13-2018 05:35 PM)Garth Wilson Wrote:  The 71 doesn't just use extensive libraries though. The vast wealth of native complex-number functions and so on in its Math module are written in assembly language for maximum performance, and they actually extend the language, including the functionality of basic operators; for example, if A and B are complex variables (or even if only one of them is complex), A*B yields a complex result, with no complaints. The FFT word FOUR could do a 1024-point complex fast Fourier transform in half the time it took the original IBM PC to do it in GWBASIC, even though the PC had the clock speed advantage by a factor of 7½ times.

Thanks for the info! And yes, I am asking exactly about some basic with such a vaste and flexible math library. Maybe not optimized in assembler, but present and working.

In my little experience I was thinking that such work had been ported to other systems (and in particular on PC/mainframes with extensions), since it is valuable. Instead it seems that a lot of effort went into those little gems (71B and others), and then stayed there.

I can understand that RPL was not ported - although RPL/2, newRPL and other exists - as it is not that user friendly. But basic!

Wikis are great, Contribute :)
Find all posts by this user
Quote this message in a reply
03-13-2018, 07:53 PM
Post: #7
RE: Question. Basic with good math libraries
(03-13-2018 05:35 PM)Garth Wilson Wrote:  The FFT word FOUR could do a 1024-point complex fast Fourier transform in half the time it took the original IBM PC to do it in GWBASIC, even though the PC had the clock speed advantage by a factor of 7½ times.

A friend of mine worked in a university lab in the mid-80's, and they used an HP-71 and HPIL card as a "coprocessor" for an IBM XT because it was much faster and more capable than anything they had for the PC. IIRC they were using this setup mostly for matrix operations.
Find all posts by this user
Quote this message in a reply
03-13-2018, 09:06 PM
Post: #8
RE: Question. Basic with good math libraries
(03-13-2018 07:32 PM)pier4r Wrote:  Thanks for the info! And yes, I am asking exactly about some basic with such a vaste and flexible math library. Maybe not optimized in assembler, but present and working.

The best such BASIC I ever had the pleasure to work with was RMB ("Rocky Mountain Basic") on an HP series 9000 workstation - can't remember the numbers of the hardware units - in the early 1990ies. Not only did it control the hardware of the laboratory where we did microwave imaging, but it downloaded, calibrated and pre-processed the measured data in real time, all double precision complex numbers, with calculations that involved multiple FFTs and lots of vector arithmetic. Dead easy to program and debug with incredible powerful commands. No memory management to worry about and hardware control and data transfer that basically looked after itself. The only component that sucked was the graphics library (called "Starbase" if I remember correctly) which we chose not to use but use Sun workstations for the data presentation instead. RMB really invokes some fond memories!
Find all posts by this user
Quote this message in a reply
03-13-2018, 09:24 PM (This post was last modified: 03-13-2018 09:26 PM by pier4r.)
Post: #9
RE: Question. Basic with good math libraries
Reading a bit more about Rocky mountain basic - thanks wikipedia - if I am not wrong it is still living, or evolved, in the HTbasic that is developed and sold also nowadays (maybe the "old" versions are given away as freeware?). http://transera.com/htbasic/

It is interesting how different is the comparison RMB vs 71B between Maximilian and Garth.

Wikis are great, Contribute :)
Find all posts by this user
Quote this message in a reply
03-13-2018, 09:32 PM
Post: #10
RE: Question. Basic with good math libraries
(03-13-2018 09:24 PM)pier4r Wrote:  It is interesting how different is the comparison RMB vs 71B between Maximilian and Garth.

I guess that is because we had the "deluxe" version of RMB running on it's dedicated machine (at the cost of a decent 3-beedroom appartment of that era) versus some embedded solution on a PC card. Included in the price was a technician of HP who came to Italy for a week and installed and configured everything so all we had to do was doing the science.
Find all posts by this user
Quote this message in a reply
03-13-2018, 10:32 PM
Post: #11
RE: Question. Basic with good math libraries
(03-13-2018 02:54 PM)pier4r Wrote:  [...] but I cannot really digest the indentation pattern in python. I find it quite clean to read, but it doesn't fit the way I make comments and I highlight little blocks of statements (I highlight them surrounding them with empty lines).

Sorry, but I think I do not understand your comment about highlighting with blank lines in Python. In fact, I also use blank lines in Python to better organize my code and never fooled the indentation in such way.

But, if using multiline strings as comments, then, yes, you can break the indentation.

Regards.
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)