The system ROM of the Model 100 laptop has zero known errors within its *logarithm* table (as Ron wrote)--there is one known error in a *trigonometric* table. ATN(1) is also miscomputed for NEC PC-8201 BASIC Ver 1.0 and OLIVETTI M10 BASIC 1.0, in addition to the TRS-80 Model 100.

---------------------------------------
From: Gerson W. Barbosa
Sent: Tuesday, October 19, 2010 1:32 PM
To: m...@list.30below.com
Subject: Re: Model 100 ATN Problem - Software fix (Was: Re:Jake's blog)

Hello Comet,

At first glance, there doesn't appear to be anything wrong in the constants
related to the exponential and logarithmic functions, when comparing the MSX
ROM with the Model 100 ROM, at least the mantissas seem to match.
---------------------------------------

---------------------------------------
From: Gerson W. Barbosa
Sent: Thursday, September 23, 2010 4:06 PM
To: m...@list.30below.com
Subject: Re: Model 100 ATN Problem - Software fix (Was: Re:Jake's blog)

Here are the results for #4*ATN(1), from the ROMs that comes with the latest
version of the Virtual T Emulator:


TRS-80 Model 100            3.141592653*1932*
TRS-80 Model 102            3.1415926535898
Tandy 200                   3.1415926535898
NEC PC-8201 BASIC Ver 1.0   3.141592*979431152*
OLIVETTI M10 BASIC 1.0      3.141592653*1932*
**
KC85                        3.1415926535898

The NEC PC-8201 has a 16-digit precision real type, but apparently the
transcedental functions have only single precision accuracy (I have tested
SIN and LOG). Anyway, the program will affect only the last six least
significant digits which were wrong in the first place. I am not sure if it
is worth creating a specific guard for that machine.

The program below incorporate your idea and Ron's suggest. The guard has
been included in line 20, along with the predefined constants, so that it is
evaluated only once.

------------------------------------------------------------------------------
5  REM *** ATN FIX Test
10 CLS
20 PI=2*ATN(3D13):R3=1.7320508075689:IF PI=4*ATN(1) THEN F%=1 ELSE F%=0
30 FOR TH=-7 TO 7 STEP .1
40   T=TH: GOSUB 1000
50   PRINT USING"###.## ";TH;:PRINT USING"##.############## ";Y;:PRINT
USING"#####";1D14*(Y-ATN(TH))
60 NEXT TH
70 END
0999 REM *** ATN FIX SUBROUTINE ***
1000 IF F% THEN Y=ATN(T):RETURN ELSE IF ABS(T)=1 THEN Y=SGN(T)*PI/4:RETURN
1010 S%=SGN(T):T=ABS(T)
1020 IF T<(2-R3) THEN Y=S%*(ATN(T)-1E-6*T^7):RETURN
1030 IF T<1 THEN T=(T*R3-1)/(T+R3):Y=S%*(PI/6+ATN(T)-1E-6*T^7):RETURN
1040 IF T<(2+R3) THEN T=(R3-T)/(T*R3+1):Y=S%*(PI/3-ATN(T)+1E-6*T^7) ELSE
T=1/T:Y=S%*(PI/2-ATN(T)+1E-6*T^7)
1050 RETURN
Line 20 should be included in the beginning of the program
------------------------------------------------------------------------------
Output (M100 & M10)
.
.
.
0.70  0.61072596438920     -4
0.80  0.67474094222354   -190
0.90  0.73281510178650  -1945
1.00  0.78539816339745   9916
1.10  0.83298126667444   2309
1.20  0.87605805059820    461
1.30  0.91510070055337     72
1.40  0.95054684081207      8
---------------------------------------


-----Original Message-----
From: M100 [mailto:m100-boun...@lists.bitchin100.com] On Behalf Of Ron
Wiesen
Sent: Friday, August 14, 2015 11:20
To: 'Model 100 Discussion'
Subject: Re: [M100] math error

Hello Peter:

The system ROM of the Model 100 laptop has one error within its logarithm
table.  I don't consider this as "weird", but results returned by the
transcendental functions (e.g., COSine functiob) can be deleteriously
influenced by the error.  Rather than "some early model 100s" being
afflicted, my understanding is that the erroneous logarithm table is present
in the system ROM of all Model 100 laptops regardless of manufacturing date.

The system ROM of the Model 102 laptop and Model 200 laptop does not have an
erroneous logarithm table -- Tandy corrected the error when these subsequent
laptop models were manufactured.

----- Original Message ----- From: Gerson W. Barbosa
To: Ron Wiesen
Sent: Sunday, September 19, 2010 3:22 PM
Subject: Re: An Accurate Approximation of the Constant Pi in the Model 100
Laptop -- Was: Re: Jake's blog



The manual that Tandy included with Model 100 sales contains a BASIC
language example with a method of obtaining the constant Pi.  As I recall,
the method Tandy published is based upon the BASIC expression 4*ATN(1).  Due
to the error within the log table of the Model 100, the result is erroneous.
Because Tandy corrected the error in the log table of the Model 102 (and
Model 200), the BASIC expression 4*ATN(1) obtains a correct value of Pi.


-----Original Message-----
From: M100 [mailto:m100-boun...@lists.bitchin100.com] On Behalf Of Peter
Vollan
Sent: Wednesday, August 12, 2015 18:56
To: Model 100 Discussion
Subject: [M100] math error

Refresh my memory about that weird math error that some early model 100s
have



Reply via email to