Math Software that supports BCD?



#18

Hello,

Is anyone aware of a mathematical suite that has an option to use BCD math instead of binary? (not something like the IBM BCD library, but more like matlab)

TW

Edited: 1 Apr 2010, 3:44 p.m.


#19

I don't know of any packages outside of the industrial software we use to program machine controllers but you have piqued my curiosity as to why you would want such a thing?


#20

Basically, for doing comparison against other sources when developing new math routines. For example, the FMRR calculation made for the 30b was very difficult to find things to compare against (granted, that is a specialized financial thing, but I've been hoping to find something for general usage for a while now). When you are implementing something new, and you have a slight difference in the last digit or two with what you are comparing against, is it difference in the algorithm? In the encoding? Do you have a bug? And so on. . .

Ideally, something that can be programmed/scripted allows good testing coverage.

TW


Edited: 1 Apr 2010, 8:23 p.m.


#21

what you should do is use a multiprecision library (not necessarily in BCD) and make it work to 50 digits or so. then have it convert to strings and use those to compare your results. ie validate the resultant decimalised strings.

Suppose you want to verify a 12 figure answer, from the high precision library result first add ANS*5e-13 for 12 figure rounding, then convert to a string, then just keep the first 12 figures and compare.


#22

Well, yes. There are definitely plenty of ways to do this. I was thinking it would be quite cool to be able to essentially "simulate" 12 digit, 15, 6 or whatever nicely. :-)

TW


#23

Tim, have you looked at:

bc:

http://en.wikipedia.org/wiki/Bc_programming_language

.. or,

dc:

http://en.wikipedia.org/wiki/Dc_(Unix)

Unix, Linux, or Mac (Darwin).

#24

Quote:
Ideally, something that can be programmed/scripted allows good testing coverage.

What you're actually looking at is "validation", a subset of a complete test plan/program.

Things to beware of:
-Using a single alternative comparison does not prove anything.

- If using more than one alternative source, how independent are they (be aware of: if they are using the same language, compiler, algorithms [e.g. both used snippets of the same publicly available -possibly erroneous- code], or similar coding logic, etc).
#25

source or exe?

here's my windows command line version of reckon. I use this for my own calculations.

www.voidware.com/reckon/reckon.exe

#26

Not really a math suite, but Python supports BCD computation with the decimal module.

$ python
>>> import decimal
>>> help(decimal)

Edited: 2 Apr 2010, 1:49 a.m.

#27

Not exactly Math Software, but PowerBasic has a BCD datatype.

TomC


#28

And if you really want to go old tech - definitely not Math Software - the old Turbo Pascal 3.0 had a BCD version that worked with Reals up to 18 Significant digits.

Bill


#29

Ah Bill ... Turbo Pascal ... those were the days!!!


#30

Hi Namir,


Quote:
Turbo Pascal ... those were the days!!!

What do you mean - I still use Turbo Pascal on a daily basis. Nothing works better for me for one-off utilities - data filter programs, etc. I do a lot of data collection, sometimes as often as every 6 seconds or so, and these generate very large files very quickly. So I use a Turbo Pascal Program to read the data and then output only the data I need at any particular time. Also useful for combining data into more usable subsets - such as hourly, daily or monthly.

Of course my new home computer is running 64 bit Windows 7 - which won't directly run my 16 bit programs. But Dosbox & virtual Machine work fine on it.

Bill


#31

Hi Bill,

Quote:

What do you mean - I still use Turbo Pascal on a daily basis. Nothing works better for me for one-off utilities - data filter programs, etc. I do a lot of data collection, sometimes as often as every 6 seconds or so, and these generate very large files very quickly. So I use a Turbo Pascal Program to read the data and then output only the data I need at any particular time. Also useful for combining data into more usable subsets - such as hourly, daily or monthly.

Of course my new home computer is running 64 bit Windows 7 - which won't directly run my 16 bit programs. But Dosbox & virtual Machine work fine on it.






Then you might be interested in FreePascal.
This is a modern Pascal compiler with excellent compatibility with TP 7.0. A native Win64 version can be found at:
www.freepascal.org/

Herbert


#32

Herbert,

Thanks for the link to Free Pascal. I just downloaded it and the supporting documentation. I'll give it a try this weekend.

Thinking of Turbo Pascal 7.0, I remember when we upgraded to it at work, we paid "$45 Freight" instead of "shipping" charges due to the large amount of documentation that came with it. Man, those were the days - when computer programs came with full printed documentation.

Bill


#33

Bill,

You might also consider trying Delphi. It's a Pascal language with fabulous windows support.


#34

David,

Thanks for tip on Delphi. I don't really need or want "windows" support. A line oriented in/out batch file works great, and when assiged to the windows scheduler, can occur at a convient time each day. It's part of an automated data logging procedure. I usually create an excel spreadsheet that can directly load the resulting data files for any further viewing/manipulation.

I loaded Free Pascal last night and it's perfect for my application.

Bill


Possibly Related Threads...
Thread Author Replies Views Last Post
  Need help understanding math.... cyrille de Brébisson 9 1,837 12-13-2013, 02:23 AM
Last Post: Didier Lachieze
  Hook-µP software by Rush Systems Lute Kamstra 5 1,160 11-29-2013, 01:30 AM
Last Post: Lute Kamstra
  Prime: Pedagoguery Software pop up banner Matt Kernal 1 694 10-20-2013, 01:54 AM
Last Post: Mic
  latest prime software release? Geoff Quickfall 3 869 10-12-2013, 03:53 PM
Last Post: Tim Wessman
  Does the HP Prime software only work with Win 7/ 8 ? Michael de Estrada 3 927 10-12-2013, 02:52 PM
Last Post: John Ioannidis
  Prime Software Buttons kris223 2 673 09-21-2013, 08:19 PM
Last Post: Jonathan Cameron
  OT: a math competition site Pier Aiello 0 505 09-16-2013, 06:03 AM
Last Post: Pier Aiello
  Latest HP Prime "emulator" software available :) Adrien Bertrand 46 5,132 08-21-2013, 10:48 PM
Last Post: Joe Horn
  Simple Math Question Namir 2 698 08-09-2013, 06:13 PM
Last Post: Eddie W. Shore
  hp 35s programs in software library Andrew Nikitin 7 1,276 05-30-2013, 11:55 AM
Last Post: Dave Hicks

Forum Jump: