Bitwise operations in Macysma derived Computer Algebra Systems?

Click For Summary
SUMMARY

Maxima, a computer algebra system, does not natively support bitwise operators like C++'s & and ^. Users can implement bitwise operations by utilizing Common Lisp functions. Specifically, the function ':lisp boole-and 5 7' demonstrates how to perform a bitwise AND operation. Additionally, defining a custom function in Maxima using ':lisp (defun $logand(i j) (logand i j))' allows users to create a callable LISP function for bitwise operations, which can be included in the maxima-init.mac file for convenience.

PREREQUISITES
  • Familiarity with Maxima computer algebra system
  • Basic understanding of Common Lisp programming
  • Knowledge of bitwise operations in programming
  • Experience with configuring Maxima using maxima-init.mac
NEXT STEPS
  • Explore the implementation of additional bitwise operations in Common Lisp
  • Learn how to extend Maxima functionality with custom LISP functions
  • Research the use of maxima-init.mac for initializing Maxima settings
  • Investigate performance implications of using LISP functions within Maxima
USEFUL FOR

Mathematicians, computer scientists, and developers working with Maxima who need to perform bitwise operations or extend the system's capabilities using Common Lisp.

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
 

Similar threads

Replies
2
Views
2K
Replies
3
Views
1K
Replies
4
Views
4K
Replies
29
Views
6K
  • · Replies 7 ·
Replies
7
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
Replies
3
Views
2K
  • · Replies 19 ·
Replies
19
Views
4K
  • · Replies 5 ·
Replies
5
Views
4K