2025-01-18 11:05:58 -05:00
2025-01-18 10:41:54 -05:00
2025-01-14 13:59:26 -05:00
2024-12-14 20:35:36 -05:00
2024-11-09 04:37:56 -05:00
2024-12-28 09:30:35 -05:00
2025-01-18 11:05:58 -05:00
2025-01-16 11:59:34 -05:00

SCL: Simple CAS Language

Version v1.0-alpha

Usage

git clone https://git.signorovitch.org/jacob/scl -b stable
cd scl
make release
./scl.out

For Development

git clone git@signorovitch.org:jacob/scl --recurse-submodules && cd scl
make all test
./scl.out

If you wish to run tests, make sure to run git clone --recurse-submodules to include the Unity test framework.

Current State

See STATUS.md. Currently, one is able to use scl as a basic, interactive, four-function calculator.

Syntax (Planned)

As one would expect, you can evaluate simple infix expressions:

> 1 + 1
= 2

You can also define your own functions:

> f(x) = 2x
> f(2)
= 4

Symbolic algebra is done in the following manner:

> f(x) = x^4
> diff(f, x:sym, 2)
= 12x^2

SCL will dynamically decide on types, but you can state them explicitly as well:

> f(x:int) = 2x
> f(2.2)
! f(x:int): x must be of type int.

Variables can be defined, with several attributes:

> a = 1             // Interpret type automatically.
> b:int = 1         // Must be int.
> c:const:int = 1   // Constant: value can never change.
> x:sym             // Treated symbolicaly.
Description
Simple CAS Language
c
Readme 334 KiB
Languages
C 72.8%
Makefile 12.8%
Yacc 9%
Shell 5.4%