Wish for scientific notation and string functions.

For HanDBase related topics that are not specific to one platform.

Wish for scientific notation and string functions.

Postby Physicist » Wed Feb 12, 2014 12:27 pm

I was a very long time user of a data base product (Smartlist To Go) only available on the Palm Treo and delayed years before updating to a modern smartphone because of the lack of a similar product on newer phones. Handbase is doing a good job as a replacement. It integrates well with Access - which was of critical importance. The forms editor feature now available for the Android is tedious but results in an excellent user interface.
However the product is lacking two features that prevents it from appealing to a larger customer base.
- Scientific notation. The ability to display the number 0.0000543 as 5.43E-05 This is not hard to do as Handbase already has mathematical log and power functions and also allows the user to specify the number of figures to the right of the decimal for floating point numbers. There is not a single serious scientific database application (and I do mean serious) among the ones found on the website.
- String manipulation is another missing feature which prevents the product from being useful to a larger group. In fact the scientific notation ability (I think) could be implemented with the appropriate string functions alone. I would be glad to provide guidance here although high school Algerbra II students could do so as well.
- Perhaps someone would be interested in creating an addin that could accomplish both. The scientific notation issue being the highest priority.
- Such would certainly be worth paying for. The Handbase desktop Access conduit and the Android forms editor are certainly worth the money.
Physicist
 
Posts: 2
Joined: Wed Feb 12, 2014 11:38 am

Re: Wish for scientific notation and string functions.

Postby dhaupert » Fri Feb 14, 2014 11:35 am

Hi there,

Thanks for your input and wish list. HanDBase's float fields and the internal math routines we use for calculations don't have the resolution for anything above 32 bits. I think in order to be used in serious science and math functions you'd need at least 64 bits of resolution. That's certainly not impossible but a matter of the economics of it all- it would take a major reworking of the database storage format, and a lot of work. I don't know that the niche is big enough to justify the cost of this work, especially on Android where the userbase of customers is far smaller to begin with. (Not the userbase of potential customers, but the ones that actually buy our software- Android is a platform with the largest user base, but no where near as big a user base of customers that pay for apps).

Of course you can use scientific notation in a text field, but you're then stuck without the ability to do any math with it. I think the most practical option will be when I release support for the external field type. With any luck, you can write or pay someone to write a plugin for it to do some math routines and store the results in the text field type as Scientific notation. I hope to have an external field that is extensible on the Android version and so this could be possible- this is planned for 2014!
dhaupert
 
Posts: 4113
Joined: Tue May 26, 2009 11:51 am

Re: Wish for scientific notation and string functions.

Postby Physicist » Mon Mar 03, 2014 2:15 pm

Dave,
Thanks for the curtsey of a reply. I certainly understand the economy considerations. However I think the equivalent of scientific notation can be performed with 32 bits and using only string manipulation.

Example:
1.2E+04 x 3.6E+09 = 4.3200E+13

The string process is something like:
Enter 1st number as a string: “1.2E+04” and pars for significand “1.2” and exponent “+04”
Enter 2nd number as a string “3.6E+09” and pars for significand “3.6” and exponent “+09”

Convert string “1.2” to floating point number = 1.2 and take log-base 10 (you already have this implemented as the log function).
log(1.2) = 0.0792 (see my comments on sig figures below) and exponent is converted to integer 4 (or floating point number)

Convert string “3.6” to floating point number = 3.6 and take log.
log(3.6) = 0.5563 and exponent is 13 (integer)

Sum log(1.2) and log(3.6) = 0.6354
Take anti-log of sum (e.g. 10^0.6354) = 4.3200 (significand) and convert to string “4.3200”

Sum exponents: 4 + 9 = 13 and convert to string “13”
Now construct exponential number as string: “4.3200” + ”E+” + “13” (Using “+” to indicate string concatenation). Result being: “4.3200E+13” (a string)

Important note only the 2 digits to the right of the decimal point will be accurate in the example algorithm – but there are ways around that.

Sig Figs: you currently keep only 4 digits to the right to the decimal, but you can “scale” a number to create artificial significant figures: The largest number your float fields handle: 2147483647.9999 so you could scale to 21.474836479999. Here you could represent a number like 1.234567890 easily and use the above approach. There may be a more elegant way to do this but you have the ability to manipulate 14 decimal places – but not all would be useful. 9 significant figures would work wonderfully.

I know your time is very limited so you need not reply. However I wanted you to see just how close you are to being able to implement a scientific notation capability using 32 bits and the ability to do some string manipulation (parse, length, concatenate, trim, text to string and string to text). With string manipulation capability you really do not need 64 bits – just a little “slight-of-hand string magic”. And of course the string manipulation capability would appeal to a much larger client base than the "nerdy" scientific stuff.

Thanks again for a great product ...
Physicist
 
Posts: 2
Joined: Wed Feb 12, 2014 11:38 am

Re: Wish for scientific notation and string functions.

Postby Jay » Fri Mar 16, 2018 3:41 pm

Hi Dave,

I was looking around for information on this funcionality and saw this post. Any more ideas on incorporating the ability to format in scientific notation. I was wondering if it may be more feasible now?

I really liked the latest update, the Touch ID integration is awesome!

Thanks in advance and keep up the great work!

Jay
Jay
 
Posts: 2
Joined: Tue Nov 07, 2017 1:58 pm

Re: Wish for scientific notation and string functions.

Postby ddhsoftwareadmin » Sun Mar 18, 2018 8:08 am

Jay wrote:
I was looking around for information on this funcionality and saw this post. Any more ideas on incorporating the ability to format in scientific notation. I was wondering if it may be more feasible now?



Thanks for writing. I honestly haven't really given this too much thought over the past few years as there haven't been any more requests for this functionality. Typically the changes I can feasibly make don't involve new field types or anything that would change the format of the database itself, only because a database format change requires major updates to about a dozen different programs to support! I don't have the capacity to take on that amount of work unless it's a change that a very large percentage of users are requiring. I wish the situation was different as I'd love to be able to better support the scientific community and all of the great work they do!

I really liked the latest update, the Touch ID integration is awesome!


Thanks Jay- really appreciate the encouragement! Have a great week.
ddhsoftwareadmin
Site Admin
 
Posts: 364
Joined: Tue Dec 09, 2008 2:13 pm


Return to HanDBase General Discussion

Who is online

Users browsing this forum: Google Feedfetcher and 0 guests