|
Post by B+ on Jun 6, 2020 15:29:19 GMT
Thanks for your feedback John, Yeah, and your nudge pushed me to test more thoroughly which lead to an independent method and 2nd Function I have complete confidence. I still wouldn't be surprised if there is a first number when the triN function using formula will break down. I also like comparing Basics, only not all of a family
|
|
|
Post by tenochtitlanuk on Jun 7, 2020 10:36:24 GMT
I come from a mix of backgrounds. As an applied scientist I was glad to get measurements to say 4 significant figures, so 'precision' in calculating was not relevant. My maths and physics background often wants much higher precision- among the glories of modern physics is the ability to predict to 10sf or better some of the basic constants of our universe.
Beginners in computer coding are not always aware of the errors involved in converting to binary coded decimals. Code like the following may give them pause for thought!
data 1.23456789, 12.3456789,123.456789,1234.56789,12345.6789 for j =1 to 5 read i print i print "*"; using( "######.##########", i); "*" print next j
1.2345678806305 * 1.2345678806* 12.345679283142 * 12.3456792831* 123.45679473877 * 123.4567947388* 1234.5678710937 * 1234.5678710938* 12345.6796875 * 12345.6796875000*
|
|
|
Post by tsh73 on Jun 7, 2020 16:48:36 GMT
John, in what BASIC it was? JB 1/2 gives like
123.456789 * 123.4567890000* , all with proper zeros.
|
|
|
Post by tenochtitlanuk on Jun 7, 2020 20:55:39 GMT
LB5 under Linux native. As said earlier, I get different results under JB2, LB4.5 and LB5 under Wine and native. Not done a systematic check. I get your result on JB under Wine.. EDIT It's LB5 which behaves differently on this particular example code. Hope you like my screen backdrop! Can't get back to our favourite beach- month 3 of lockdown...
|
|
|
Post by B+ on Jun 7, 2020 21:05:11 GMT
I get same as tsh73 on JB and same as John with LB5 32 bit alpha 351 Windows 10-64 laptop (64 bit not working? are we allowed to talk about LB 5 alpha 351 here? because I tried some JB programs and getting errors with OPEN? no help ready yet for it.)
|
|
|
Post by carlgundel on Jun 8, 2020 15:40:12 GMT
LB5 under Linux native. As said earlier, I get different results under JB2, LB4.5 and LB5 under Wine and native. Not done a systematic check. I get your result on JB under Wine.. EDIT It's LB5 which behaves differently on this particular example code. Hope you like my screen backdrop! Can't get back to our favourite beach- month 3 of lockdown..
I'll have a look at this. I expect it's merely a numeric presentation difference. The math underneath should be fine. Try some generations of computation to compare accuracy to see if LB4 (JB2 is LB) and LB5 diverge in any meaningful way.
|
|