202205261415 Arithmetic in Lisp

Given two operands a and b which are real numbers, define the operators,

a+b, a-b, a\times b, a\div b, a^{b}, \sqrt[b]{a}, a\bmod b,

with respect to arithmetic operations such as addition, subtraction, multiplication, division, exponentiation, rooting, and Modulo.

Not so accustomed to these, Lisp cannot interpret or compile them until we have defined those seven primitive functions, better known as symbolic computations; as were newborn infants taught human intelligence by grownup adults between homo sapiens.

To Lisp, arithmetic operations are usually \textrm{\scriptsize{NOT}} predefined. We have in our toolkit \textrm{\scriptsize{ONLY}} three mathematical functors, i.e., list, iteration, and recursion.

The roots of quadratic equation are given by the formula:

\displaystyle{x=\frac{-b\pm\sqrt{b^2-4ac}}{2a}}

the expected outcome of which is calculated by parts, first the discriminant ‘delta’:

\Delta = b^2-4ac;

then the plus-minus ‘pm’:

\pm (x)=(+x,-x);

and hence

will solve for real roots, ignoring the complex though.

\therefore Predefining the seven primitive functions is in order for solving any computational problems by Lisp.

(to be continued)

202205251335 SQL Table 005

202112021138 SQL Table 004

Background. (Equilibrium)

Equilibrium is established by the exchange of energy, volume, or particle number between different systems or subsystems.

Section 2.2. Arovas. (2019). Thermodynamics and Statistical Mechanics


202109291137 SQL Table 003

 

202109281720 SQL Table 002

202109281636 SQL Table 001