MDV Software Reclamation

Anything QL Software or Programming Related.
User avatar
bwinkel67
QL Wafer Drive
Posts: 1196
Joined: Thu Oct 03, 2019 2:09 am

Re: MDV Software Reclamation

Post by bwinkel67 »

stevepoole wrote:Hi all,
I wrote the program above with QPC2, which produced correct random scatter plots.

But on my QL, under QDOS or SMSQ, the scatter plots were not correct.

This is due to different 'BEEPING' polll return speeds, so there can be no universal program for all platforms...... Sorry !

After much experimentation, I cannot find any simple workarounds, so I shall have to throw in the towel.

Steve.
Steve,

I really like the idea of a true random number generator so thank you for turning me on to the idea. I'll pursue this a bit further moving forward. I'll look into this a bit more when my semester is over -- spring break has started but we are moving to online for the remainder and so there goes my spring break as I'll have to do some additional preparation :-/


User avatar
janbredenbeek
Super Gold Card
Posts: 631
Joined: Wed Jan 21, 2015 4:54 pm
Location: Hilversum, The Netherlands

Re: MDV Software Reclamation

Post by janbredenbeek »

The rounding of numbers to 7 digits that occurs when SAVing is because S*Basic programs are saved as ASCII files, so the internal representation of floating point numbers gets lost.
This is indeed a 'feature' of S*Basic I regularly ran across when I wrote programs for astronomical calculations which usually need numbers up to 10 or more digits accurate.
One way to avoid this would be to place the number in quotes, e.g. '36000.76892'. The coercion mechanism will automatically convert this 'string' to floating point, without loss of accuracy but at a slight speed penalty.
Another solution with less speed penalty is to write the number as two numbers which don't get truncated, e.g. (36000+0.76892).

Jan


User avatar
NormanDunbar
Forum Moderator
Posts: 2271
Joined: Tue Dec 14, 2010 9:04 am
Location: Leeds, West Yorkshire, UK
Contact:

Re: MDV Software Reclamation

Post by NormanDunbar »

Try QSAVE perhaps? That stores Floats as the actual internal format and should not affect accuracy.

I'm sure Jan already knows this but others might not.


Cheers,
Norm.


Why do they put lightning conductors on churches?
Author of Arduino Software Internals
Author of Arduino Interrupts

No longer on Twitter, find me on https://mastodon.scot/@NormanDunbar.
User avatar
RalfR
Aurora
Posts: 872
Joined: Fri Jun 15, 2018 8:58 pm

Re: MDV Software Reclamation

Post by RalfR »

NormanDunbar wrote:Try QSAVE perhaps?
That was my thought in the first place. Thanks :)


4E75 7000
User avatar
bwinkel67
QL Wafer Drive
Posts: 1196
Joined: Thu Oct 03, 2019 2:09 am

Re: MDV Software Reclamation

Post by bwinkel67 »

Ralf R. wrote:
NormanDunbar wrote:Try QSAVE perhaps?
That was my thought in the first place. Thanks :)
Is it a program? It doesn't seem part of TK2.


User avatar
tofro
Font of All Knowledge
Posts: 2699
Joined: Sun Feb 13, 2011 10:53 pm
Location: SW Germany

Re: MDV Software Reclamation

Post by tofro »

QSAVE is part of "QLOAD/QSAVE" and QLiberator.

Tobias


ʎɐqǝ ɯoɹɟ ǝq oʇ ƃuᴉoƃ ʇou sᴉ pɹɐoqʎǝʞ ʇxǝu ʎɯ 'ɹɐǝp ɥO
User avatar
NormanDunbar
Forum Moderator
Posts: 2271
Joined: Tue Dec 14, 2010 9:04 am
Location: Leeds, West Yorkshire, UK
Contact:

Re: MDV Software Reclamation

Post by NormanDunbar »

It is also built in to SMSQ if I'm not mistaken.

The Q is for "quick". It used to take forever to load up a largish SuperBASIC program, but not with QSAVE/QLOAD, they save and load the tokenised binary version of the ASCII version that SAVE/LOAD prefer.

Cheers,
Norm.


Why do they put lightning conductors on churches?
Author of Arduino Software Internals
Author of Arduino Interrupts

No longer on Twitter, find me on https://mastodon.scot/@NormanDunbar.
User avatar
RalfR
Aurora
Posts: 872
Joined: Fri Jun 15, 2018 8:58 pm

Re: MDV Software Reclamation

Post by RalfR »

NormanDunbar wrote:It is also built in to SMSQ if I'm not mistaken.
Quite right, TT has rewritten it, because the original version from Liberation SW depends on Sinclair ROMs (SMS - A brief history by TT). TT also implemented a QMERGE. The difference to the original toolkit is the omission to report unloaded extensions used while QSAVEing.


4E75 7000
User avatar
bwinkel67
QL Wafer Drive
Posts: 1196
Joined: Thu Oct 03, 2019 2:09 am

Re: MDV Software Reclamation

Post by bwinkel67 »

Tokenization ala the ZX81 way...cool.


Post Reply