# ARIBAS

Appeared in:
1996
Influenced by:
File extensions:
.ari
Versions and implementations (Collapse all | Expand all):
Programming language

ARIBAS is an interactive interpreted language for big integer arithmetic and multi-precision floating point arithmetic.

ARIBAS syntax resembles syntax of Pascal and Modula.

It has several builtin functions for algorithmic number theory like greatest common divisor, Jacobi symbol, Rabin probabilistic prime test, factorization algorithms, etc.

## Examples:

### Factorial:

Example for versions ARIBAS 1.53

This example uses built-in `factorial` function.

ARIBAS uses integer type for variables by default, so type declaration can be omitted.

`group(0)` is used to cancel digit groups separation by underscores during output.

``````function fac0_16();
var n;
begin
for n := 0 to 16 do
writeln(n, "! = ", factorial(n): group(0));
end;
end;

fac0_16().
``````

### Factorial:

Example for versions ARIBAS 1.53

This example uses recursive factorial definition.

Function name `fac` is used because `factorial` is reserved function name in ARIBAS.

ARIBAS uses integer type for variables by default, so type declaration can be omitted.

`group(0)` is used to cancel digit groups separation by underscores during output.

``````function fac(n);
begin
if (n = 0) then
return(1);
end;
return(n * fac(n - 1));
end;

function fac0_16();
var n;
begin
for n := 0 to 16 do
writeln(n, "! = ", fac(n): group(0));
end;
end;

fac0_16().
``````

### Hello, World!:

Example for versions ARIBAS 1.53
``````writeln("Hello, World!");
``````

### Fibonacci numbers:

Example for versions ARIBAS 1.53

This example uses recursive definition of Fibonacci numbers.

ARIBAS uses integer type for variables by default, so type declaration can be omitted.

`group(0)` is used to cancel digit groups separation by underscores during output.

``````function fib(n);
begin
if (n < 3) then
return(1);
end;
return(fib(n-1)+fib(n-2));
end;

function fib1_16();
var n;
begin
for n := 1 to 16 do
write(fib(n): group(0), ", ");
end;
writeln("...");
end;

fib1_16().
``````