I just wanted to point out some custom functions I use regularly, that
others might find useful:
db(x):=float(20*log(x)/log(10));
idb(x):=float(10^(x/20));
INFIX("||")$ "||"(x,y):=x*y/(x+y);
log10(x) := log(x)/log(10);
log2(x) := log(x)/log(2);
ln(x):=log(x);
So this is my maxima-init.mac file, which for my Windows machine is in:
C:\Program Files\Maxima-5.9.0\share\maxima\5.9.1\share
"The search path for maxima-init.mac is file_search_maxima; the search
path for maxima-init.lisp is file_search_lisp. For more info on these
variables, do describe("file_search")."
Explanation:
I do a lot of decibel calculations, so I have a dB and "inverse dB"
function, which converts from a gain (like a voltage gain, not a power
gain) to decibels and vice versa.
Examples:
db(2); --> 6.020599913279623
db(10); --> 20.0
idb(60); --> 1000.0
idb(-20); --> 0.1
Also do a lot of calculations with parallel resistors/impedance. This
infix operator calculates the equivalent resistance for two in
parallel.
Examples:
10 || 10; --> 5
10 || 10 || 10; --> 3.333333333333334
float(10000 || 2); --> 1.999600079984003
(10||10)/(10||10+10); --> 1/3
Log means different things to different people in different programs,
so I disambiguated the various types so I don't have to remember from
one program to another.