Note that (B-A)*RND(1)+A will generate a random number between A and B.

STATEMENT

SYNTAX/FUNCTION

EXAMPLE

SGN

SGN (expression)

230 PRINT SGN(X)

 

Gives 1. If X>0, 0 if X=0, and -1 if

 

X<0.

 

STATEMENT

SYNTAX/FUNCTION

EXAMPLE

SIN

SIN (expression)

190 PRINT SIN(X)

 

Gives the sine of the expression X. X is

 

interpreted as being in radians. Note:

 

COS(X) =SIN(X+3.14159/2) and that

 

1 Radian = 180/PI degrees = 57.2958

 

degrees; so that

the sine of X degrees=

 

SIN(X/57.2958).

 

STATEMENT

SYNTAX/FUNCTION

EXAMPLE

SQR

SQR (expression)

180 PRINT SQR(X)

 

Gives the square

root of the expression X.

 

An FC error will

occur if X is less than zero,

STATEMENT

SYNTAX/FUNCTION

EXAMPLE

TAN

TAN (expression)

200 PRINT TAN(X)

Gives the tangent of the expression X. X is interpreted as being in radians.

DERIVED FUNCTIONS

The following functions, while not intrinsic to BASIC, can be calculated using the existing BASIC functions:

FUNCTION

FUNCTION EXPRESSED IN TERMS OF BASIC FUNCTIONS

SECANT

SEC(X) = 1/COS(X)

COSECANT

CSC(X) = 1/SIN(X)

COTANGENT

COT(X) = 1/TAN(X)

INVERSE SINE*

ARCSIN(X)

= ATN(X/SQR(-X*X+1))

INVERSE COSINE*

ARCCOS(X)

= -ATN(X/SQR(-X*X+1))+1.5708

INVERSE SECANT*

ARCSEC(X)

= ATN(SQR(X*X-1))+(SGN(X)-1)*1.5708

INVERSE COSECANT*

ARCCSC(X)

= ATN(1/SQR(X*X-1))+(SGN(X)-1)*1.5708

INVERSE COTANGENT*

ARCCOT(X)

= -ATN(X)+1.5708

HYPERBOLIC SINE

SINH(X) =

(EXP(X)-EXP(-X))/2

HYPERBOLIC COSINE

COSH(X) =

(EXP(X)+EXP(-X))/2

HYPERBOLIC TANGENT

TANH(X) =

-EXP(-X)/(EXP(X)+EXP(-X))*2+1

HYPERBOLIC SECANT

SECH(X) =

2/(EXP(X)+EXP(-X))

HYPERBOLIC COSECANT

CSCH(X) =

2/(EXP(X)-EXP(-X))

HYPERBOLIC

 

 

COTANGENT

COTH(X) =

EXP(-X)/(EXP(X)-EXP(-X))*2+1

*These functions require the user-defined ATN function. See Appendix H for details.

Page 247
Image 247
Apple II Statement SYNTAX/FUNCTION Example SGN, Print Sgnx, Statement SYNTAX/FUNCTION Example SIN, Print Sinx, Print Sqrx

II specifications

The Apple II, launched in April 1977, was one of the first highly successful mass-produced microcomputer products. It marked a significant leap in personal computing, setting standards for future developments in the industry. Created by Steve Wozniak and Steve Jobs, the Apple II differentiated itself with its user-friendly design, appealing aesthetics, and robust capabilities.

One of the standout features of the Apple II was its open architecture, which allowed users to expand and enhance the computer's functionality. This design enabled hundreds of third-party hardware and software developers to contribute to its ecosystem, resulting in an array of peripherals, including printers, modems, and storage devices. The Apple II utilized a MOS Technology 6502 microprocessor running at a clock speed of 1 MHz. Initially equipped with 4 KB of RAM, the machine could be expanded to 48 KB, accommodating more complex applications and programs.

The Apple II was also notable for its colorful graphics. It was one of the first computers to support color display, offering a 6-color palette with a resolution of 280x192 pixels in 16 colors when using its Color Graphics Card. This feature significantly enhanced the visual appeal of games and educational software developed for the platform, making computing more accessible and entertaining for various audiences.

Apple's commitment to user experience was evident in the design of the machine. It featured an integrated keyboard and a plastic case, which was both durable and visually appealing. The self-contained design included drive bays for floppy disk drives, allowing for quicker data access than traditional tape drives. It also supported audio output, enabling sound effects and music, a novelty at the time.

The introduction of the Apple DOS operating system further underscored the machine's capabilities. DOS streamlined file management and made it easier for users to navigate and manage their data. The combination of hardware and software positioned the Apple II as an educational tool and a gaming platform, fostering a vibrant software ecosystem.

The Apple II family continued to evolve, with variations like the Apple II+, IIe, and IIgs being introduced over the years. These iterations brought enhancements in memory, processing power, and graphics capabilities. The legacy of the Apple II endures, not only as a foundational product in personal computing but also as a symbol of innovation that paved the way for future advancements in technology. Its impact is still felt today, as it inspired countless developers and shaped the trajectory of the computer industry.