Bitwise operations in Macysma derived Computer Algebra Systems?

AI Thread Summary
Maxima does not have native bitwise operators similar to those in C++, prompting users to consider alternatives. One suggested method is to use the Common Lisp (CLisp) environment by calling the built-in function `boole-and` with the syntax `:lisp boole-and 5 7`. Additionally, users can define a custom LISP function for bitwise AND operations by using `(defun $logand(i j) (logand i j))`, which allows it to be invoked from within Maxima. This custom function can be included in the `maxima-init.mac` file for convenience.
dsmith1974
Messages
4
Reaction score
0
I can't see any native bitwise operators (like C++'s & and ^) in Maxima, is the right way to drop down into CLisp something like this?

:lisp boole-and 5 7

Many thanks,

Duncan
 
Technology news on Phys.org
':lisp (defun $logand(i j) (logand i j))' creates a LISP function that can be called from Maxima and can be placed in maxima-init.mac
 
Dear Peeps I have posted a few questions about programing on this sectio of the PF forum. I want to ask you veterans how you folks learn program in assembly and about computer architecture for the x86 family. In addition to finish learning C, I am also reading the book From bits to Gates to C and Beyond. In the book, it uses the mini LC3 assembly language. I also have books on assembly programming and computer architecture. The few famous ones i have are Computer Organization and...
I have a quick questions. I am going through a book on C programming on my own. Afterwards, I plan to go through something call data structures and algorithms on my own also in C. I also need to learn C++, Matlab and for personal interest Haskell. For the two topic of data structures and algorithms, I understand there are standard ones across all programming languages. After learning it through C, what would be the biggest issue when trying to implement the same data...
Back
Top