Texas Instruments TI-89 Tip List page 244

Graphing calculator
Hide thumbs Also See for TI-89:
Table of Contents

Advertisement

! We cannot even conclude that one calculator is more accurate than any other, even for these
functions, because we have not actually tested function evaluation accuracy. Instead, we have
tested the combined accuracy of three functions (tangent, e^x and square root) and their inverses.
It is possible (though unlikely) that errors in one function evaluation are compensated by opposite
errors in the inverse function.
To use the HP-49G and the TI-92 Plus as an example, all we have shown is that either calculator may
or may not be faster and more accurate than the other.
There is much data missing from the table above, and this also precludes a fair comparison. We don't
know, in each case, which versions of operating systems and compilers were used. We don't know
which hardware versions were used. Running changes in hardware and software design may mean
that clock rates and algorithms may have been changed. For a truly meaningful benchmark, all these
variables must be specified.
In regards to the execution time, we have not really measured the function evaluation time, anyway.
Instead, we have measured the combined execution time of the function evaluation and the loop
overhead. For the TI-89 / TI-92 Plus TI Basic programs, this distinction is significant because the loop
overhead is significant: 46 seconds for the TI-89 HW1, and 31 seconds for the TI-92 Plus HW2. This
amounts to about 18 mS/iteration for the TI-89, and 12 mS/iteration for the TI-92 Plus.
This is the TI Basic code used for the TI-89 / TI-92 Plus benchmarks:
savage2()
Func
local a,n
1→a
for n,1,2499
tan(tan(ℯ^(ln(√(a*a)))))+1→a
endfor
(a-2500)/2500
EndFunc
This is the GCC C code used for the TI-89/92+ benchmarks:
// C Source File
// Created 3/22/2001; 12:21:38 PM
#define RETURN_VALUE
// #define OPTIMIZE_ROM_CALLS // Use ROM Call Optimization
#define SAVE_SCREEN
#include <tigcclib.h>
short _ti89;
short _ti92plus;
// Main Function
void _main(void)
{
float a=1.0;
int k;
a=1.0;
for(k=1;k<2500;k++) a=tan(atan(exp(log(sqrt(a*a)))))+1.0;
push_Float ((a-2500.0)/2500.0);
}
The C version was written by Artraze (http://www.angelfire.com/pa3/cartethus/).
Note that the C version is 641 bytes, and the TI Basic version is only 83 bytes.
// Redirect Return Value
// Save/Restore LCD Contents
// Include All Header Files
// Produce .89Z File
// Produce .9XZ File
6 - 86

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Ti-92+

Table of Contents