Qbasicnews.com

Full Version: StatLib: SL.multiply$ and SL.format$
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I've released working versions of the two functions mentioned in the subject. One formats inputted numbers to correct form, the other multiplies the two numbers together. SL.multiply$ can take negative numbers, decimals and standard form, so to to the QBNZ forum, sign up (so you can see "the wall" forum), and check it out!

Please tell me what you think, any errors you find etc.
You forgot to provide SL.Add$.

See my comments at QBNZ: http://qbnz.com/pages/forum/viewforum.php?f=9
It's only a demo Smile
Wink lol Of course, or is it already finished? :???: If so, I'd like to see it!
Nope, not finished. In fact, I was having a talk with my cousin just now (I'll post the whole sad story at QBNZ tomorrow) and he has thrown me a couple of ideas that make the range of numbers like:

+- 9.9999... (32,767 9's) X10^(2^32)

That's a wee bit bigger than current, but it involves me starting all over again :roll: But I will start again, cos it's gonna be great experience for me. However, since the actual +-*/ functions for this version are almost there, I will continue with them and release them for the communities enjoyment.
Indeed it is a *wee* bit bigger, but when using numbers in that format, you can't have precise numbers anymore. Because 32000X10^(2^32) is a bit too large to exactly print out in a string.

However, you can switch to this format, no doubt. It will be able to handle much longer numbers, but won't have the 'exact'-side of the story anymore.
It'll still be exact to 32K places... so only less inaccurate for huge and complex numbers. But who cares about accuracy after 32,000 places?

I could, in a future build, store the strings in XMS I suppose, then there could be a lot of strings, with each one corresponding to the nth 32000 characters, but once again nobody would care about accuracy after that many characters.
Ok, you got a point there. But I can imagine people trying to calculate PI to 1000000 decimals and receiving decimal 32001 to 1000000000 as zeros. Wink But that won't matter... Big Grin