- JavaScript can be used in:
- Internet Explorer, version 4 or later;
- Netscape Navigator, version 4 or later.
Make sure Navigator (or Communicator) has Javascript enabled in your Preferences:

in Edit, Preferences, Advanced, check the box marked*Javascript*.

- Select a
**series**:

Fibonacci(i), Lucas(i), Rabbit(i).

- For Fibonacci(i) and Lucas(i) you have a choice of Precision: exact or approximate.

**Exact**: the calculator will find Fibonacci(i) and Lucas(i) for i into the thousands. However, if i is too large, the browser may quit unexpectedly! (Sorry - I cannot predict or prevent this! 'i' values up to i=2000 (Fib(2000) has 400+ digits) should be OK.

**Approximate**: Immediate result. The length of the answer decreases as i gets larger, but the index i itself may have up to digits!

The*Eval*box lets you input an expression which uses i. Details below. - Type in a whole number value for i, which can be negative except for Rabbit(i), in the
*From i=*box. - If you want to find all the values in a certain range, type a value in the
*To i=*box also. -
- Select an
*Show series*- outputs the numbers in the selected series for i in the chosen range.
*Initial digits*- Benford's Law relates to the distribution of the initial digits of Fibonacci and Lucas numbers. (Precision buttons are ignored.)
*Amaze me!*- produces a correct, random expression equal to 1 and involving two nth-roots, as mentioned on The Lucas numbers page.
*Clear all*- clears all values and the output area.

**action**:

## Netscape Navigator:

Make sure JavaScript is enabled in Navigator version 4 or later:

In Edit Menu - Preferences - Advanced, make sure the box marked 'JavaScript' is checked.## Microsoft Internet Explorer 4+

Make sure Scripting is enabled in version 4 or later:

In Edit Menu - Preferences - Web Content, make sure 'Enable Scripting' is checked in the "Active Content" section.

#### Constants

- E , PI, Phi, phi
#### Operations

+ - * /- % ( x%y is the integer remainder when integer x is divided by integer y)

< > <= >=**equal to**is == and**not equal to**is !=

NB There is no "to-the-power-of" operator - see**pow**function below. #### Functions

**abs(x)**the absolute value of x (always positive) **acos(x)**the angle (in radians) whose cosine is x **asin(x)**the angle (in radians) whose sine is x **atan(x)**the angle (in radians) whose tangent is x **ceil(x)**round up to the next integer (if not already an integer) **cos(x)**the cosine of angle x (x in radians) **exp(x)**E to the power of x; same as pow(E,x) **Fib(i)**Fibonacci(i) **floor(x)**x, if x is an integer, otherwise the next integer less than x **log(x)**the natural log of x (log to the base E) **log10(x)**the common log of x (log to base 10) **Luc(i)**Lucas(i) **pow(x,p)**x ^{p}**Rab(i)**Rabbit(i) **randint(LO,HI)**a random integer between LO and HI (inclusive) **random()**a random number between 0.0 and 1.0 **round(x)**the nearest integer to x **sin(x)**the sine of angle x (x in radians) **sqrt(x)**the square root of x **tan(x)**the tangent of angle x (x in radians) #### Conditional Expressions

**(***C***?***T***:***E***) C is an expression with a****true**or**false**result;

T is the value returned if C evaluates to**true**;

E is the value returned if C evaluates to**false**