/Symbolic-Algebra-SICP

Basic symbolic algebra modules inspired from SICP book's sections on the topic.

Primary LanguageRacket

Symbolic Algebra - SICP

Basic symbolic algebra modules inspired from SICP book's sections on the topic.

Details

This project implements the generic arithmetic system from sections 2.4 and 2.5 of the book. It implements all the exercises from sec 2.5. It support doing operations on: integers, rational numbers, real numbers, complex numbers and polynomials. Operations can be performed on different types.

There are polar and rectangular representations for complex numbers. There are dense and sparse representations for polynomials. Rational numbers can have polynomials as numerators and denominators, and they are automatically reduced to lowest terms.