Re: Some questions: built-in operators and exponent markers
Barton Willis via Maxima-discuss <[email protected]> Mon, 13 Jul 2026 15:00:54 +0000
| Newsgroups | gmane.comp.mathematics.maxima.general |
|---|---|
| Message-ID | <SN6PR07MB795281F5D5CB574EBD1B3276B6FA2@SN6PR07MB7952.namprd07.prod.outlook.com> |
--===============8221309772580854221==
Content-Language: en-US
Content-Type: multipart/alternative;
boundary="_000_SN6PR07MB795281F5D5CB574EBD1B3276B6FA2SN6PR07MB7952namp_"
--_000_SN6PR07MB795281F5D5CB574EBD1B3276B6FA2SN6PR07MB7952namp_
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
If you are open to an option to redefining "!", you might experiment with (=
or replace "~" with your favorite character)
(%i1) prefix("~")$
(%i2) "~"(x) :=3D %i*x$
(%i3) 5 + ~7;
(%o3) 7 %i + 5
You will need to experiment with good values for the left and right binding=
powers for "~". But you still might be plagued with operator ordering pro=
blems.
*
are there any tools or resources that would help me recompile an edited ver=
sion of Maxima's source code?
A good editor and a Common Lisp compiler are all the tools you will need. =
After that, unless you already know Common Lisp and git, you'll need to l=
earn to use these tools. Learning your way around the Maxima code is the mo=
st time-consuming task.
There are plenty of opportunities to contribute to Maxima.
________________________________
From: Astrea Drifter <[email protected]>
Sent: Monday, July 13, 2026 1:31 AM
To: [email protected] <[email protected].=
net>
Subject: [Maxima-discuss] Some questions: built-in operators and exponent m=
arkers
Caution: Non-NU Email
Hello all!
As some of you might have inferred from my previous email, I'm fond of proj=
ects that allow me to tinker around with Maxima's command-line interface. C=
urrently I have two things that I've been wanting to do for a while now, an=
d since my motives are no doubt a bit idiosyncratic and convoluted, I'll in=
clude a TL;DR at the end of the email.
One thing I want to do is be able to reassign the exclamation mark operator=
! to something other than factorial. My reason is that I can access that f=
unction by using "factorial()" already, and I want to be able to write a cu=
stom operator "!"(x):=3D x*%i; so that I can enter imaginary numbers withou=
t so many keystrokes but also without using a letter character in the funct=
ion name (which can cause headaches for me when I accidentally use the same=
letter in function names outside my preamble). My inability to enter this =
definition in the terminal suggests that I would need to edit the source co=
de to make it possible, if such an edit is possible in the first place. I a=
ssume I would have to re-compile the source code after editing it, but I ha=
ve no idea how to do that.
I'm also interested in changing the exponent marker on bigfloats from b to =
p, such that bfloat(1); would give back 1.0p0 for example. The descender in=
the p would make the exponent marker stand out more, helping me visually d=
istinguish mantissas from exponents in floating-point numbers that have hug=
e exponents. This also seems difficult to do without editing the source cod=
e somehow.
So the TL;DR is:
Can the exclamation mark ! be removed from the list of built-in operators w=
ithout editing the source code?
Can the exponent marker on bigfloats be changed from b to p without editing=
the source code?
If the answer to either of these questions is "no", would editing the sourc=
e code allow me to do either of these things in the first place?
If the answer to that question is "yes", are there any tools or resources t=
hat would help me recompile an edited version of Maxima's source code?
Thanks in advance for any responses!
Astrea
--_000_SN6PR07MB795281F5D5CB574EBD1B3276B6FA2SN6PR07MB7952namp_
Content-Type: text/html; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
<html>
<head>
<meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3Dus-ascii"=
>
<style type=3D"text/css" style=3D"display:none;"> P {margin-top:0;margin-bo=
ttom:0;} </style>
</head>
<body dir=3D"ltr">
<div class=3D"elementToProof" style=3D"font-family: Aptos, Aptos_EmbeddedFo=
nt, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; c=
olor: rgb(0, 0, 0);">
<br>
</div>
<div class=3D"elementToProof" style=3D"font-family: Aptos, Aptos_EmbeddedFo=
nt, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; c=
olor: rgb(0, 0, 0);">
<br>
</div>
<div class=3D"elementToProof" style=3D"font-family: Aptos, Aptos_EmbeddedFo=
nt, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; c=
olor: rgb(0, 0, 0);">
If you are open to an option to redefining "!", you might experim=
ent with (or replace "~" with your favorite character)</div>
<div class=3D"elementToProof" style=3D"font-family: Aptos, Aptos_EmbeddedFo=
nt, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; c=
olor: rgb(0, 0, 0);">
<br>
</div>
<div class=3D"elementToProof" style=3D"font-family: Aptos, Aptos_EmbeddedFo=
nt, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; c=
olor: rgb(0, 0, 0);">
(%i1) prefix("~")$</div>
<div class=3D"elementToProof" style=3D"font-family: Aptos, Aptos_EmbeddedFo=
nt, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; c=
olor: rgb(0, 0, 0);">
<br>
</div>
<div class=3D"elementToProof" style=3D"font-family: Aptos, Aptos_EmbeddedFo=
nt, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; c=
olor: rgb(0, 0, 0);">
(%i2) "~"(x) :=3D %i*x$</div>
<div class=3D"elementToProof" style=3D"font-family: Aptos, Aptos_EmbeddedFo=
nt, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; c=
olor: rgb(0, 0, 0);">
<br>
</div>
<div class=3D"elementToProof" style=3D"font-family: Aptos, Aptos_EmbeddedFo=
nt, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; c=
olor: rgb(0, 0, 0);">
(%i3) 5 + ~7;</div>
<div style=3D"font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, =
Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
(%o3) =
7 %i + 5</div>
<div class=3D"elementToProof" style=3D"font-family: Aptos, Aptos_EmbeddedFo=
nt, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; c=
olor: rgb(0, 0, 0);">
<br>
</div>
<div class=3D"elementToProof" style=3D"font-family: Aptos, Aptos_EmbeddedFo=
nt, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; c=
olor: rgb(0, 0, 0);">
You will need to experiment with good values for the left and right binding=
powers for "~". But you still might be plagued with operat=
or ordering problems. </div>
<div class=3D"elementToProof" style=3D"font-family: Aptos, Aptos_EmbeddedFo=
nt, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; c=
olor: rgb(0, 0, 0);">
<br>
</div>
<ul data-editing-info=3D"{"applyListStyleFromLevel":false,"u=
norderedStyleType":4}" style=3D"margin-top: 0px; margin-bottom: 0px;">
<li style=3D"font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, C=
alibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); margin=
-top: 0px; margin-bottom: 0px; list-style-type: "➢ ";">
<div class=3D"elementToProof" role=3D"presentation" style=3D"color: rgb(0, =
0, 0);">are there any tools or resources that would help me recompile an ed=
ited version of Maxima's source code?</div>
<div class=3D"elementToProof" role=3D"presentation"><br>
</div>
<div class=3D"elementToProof" role=3D"presentation">A good editor and a Com=
mon Lisp compiler are all the tools you will need. After that, =
unless you already know Common Lisp and git, you'll need to learn to =
use these tools. Learning your way around the Maxima
code is the most time-consuming task.</div>
<div class=3D"elementToProof" role=3D"presentation"><br>
</div>
<div class=3D"elementToProof" role=3D"presentation">There are plenty of opp=
ortunities to contribute to Maxima.</div>
</li></ul>
<div class=3D"elementToProof" style=3D"font-family: Aptos, Aptos_EmbeddedFo=
nt, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; c=
olor: rgb(0, 0, 0);">
</div>
<div id=3D"appendonsend"></div>
<hr style=3D"display:inline-block;width:98%" tabindex=3D"-1">
<div id=3D"divRplyFwdMsg" dir=3D"ltr"><font face=3D"Calibri, sans-serif" st=
yle=3D"font-size:11pt" color=3D"#000000"><b>From:</b> Astrea Drifter <as=
[email protected]><br>
<b>Sent:</b> Monday, July 13, 2026 1:31 AM<br>
<b>To:</b> [email protected] <[email protected]=
urceforge.net><br>
<b>Subject:</b> [Maxima-discuss] Some questions: built-in operators and exp=
onent markers</font>
<div> </div>
</div>
<div>
<table border=3D"0" cellspacing=3D"0" cellpadding=3D"0" align=3D"left" widt=
h=3D"100%">
<tbody>
<tr>
<td style=3D"background:#ff0000; padding:5pt 2pt 5pt 2pt"></td>
<td width=3D"100%" cellpadding=3D"7px 6px 7px 15px" style=3D"background:#ff=
000; padding:5pt 4pt 5pt 12pt; word-wrap:break-word">
<div style=3D"color:#000000"><span style=3D"color:#000000; font-weight:bold=
">Caution:</span> Non-NU Email
</div>
</td>
</tr>
</tbody>
</table>
<br>
<div>
<div dir=3D"ltr">Hello all!<br>
<br>
As some of you might have inferred from my previous email, I'm fond of proj=
ects that allow me to tinker around with Maxima's command-line interface. C=
urrently I have two things that I've been wanting to do for a while now, an=
d since my motives are no doubt
a bit idiosyncratic and convoluted, I'll include a TL;DR at the end of the=
email.<br>
<br>
One thing I want to do is be able to reassign the exclamation mark operator=
<font face=3D"monospace">
!</font> to something other than factorial. My reason is that I can access =
that function by using "factorial()" already, and I want to be ab=
le to write a custom operator
<font face=3D"monospace">"!"(x):=3D x*%i;</font><font face=3D"ari=
al, sans-serif"> so that I can enter imaginary numbers without so many=
keystrokes but also without using a letter character in the function name =
(which can cause headaches for me when I accidentally
use the same letter in function names outside my preamble). My inability t=
o enter this definition in the terminal suggests that I would need to edit =
the source code to make it possible, if such an edit is possible in the fir=
st place. I assume I would have
to re-compile the source code after editing it, but I have no idea how to =
do that.<br>
<br>
I'm also interested in changing the exponent marker on bigfloats from </fon=
t><font face=3D"monospace">b</font><font face=3D"arial, sans-serif"> t=
o
</font><font face=3D"monospace">p</font><font face=3D"arial, sans-serif">, =
such that </font>
<font face=3D"monospace">bfloat(1);</font><font face=3D"arial, sans-serif">=
would give back
</font><font face=3D"monospace">1.0p0</font><font face=3D"arial, sans-serif=
"> for example. The descender in the
</font><font face=3D"monospace">p</font><font face=3D"arial, sans-serif">&n=
bsp;would make the exponent marker stand out more, helping me visually dist=
inguish mantissas from exponents in floating-point numbers that have huge e=
xponents. This also seems difficult to do
without editing the source code somehow.<br>
<br>
So the TL;DR is:<br>
Can the exclamation mark </font><font face=3D"monospace">!</font><font face=
=3D"arial, sans-serif"> be removed from the list of built-in operators=
without editing the source code?<br>
Can the exponent marker on bigfloats be changed from </font><font face=3D"m=
onospace">b</font><font face=3D"arial, sans-serif"> to
</font><font face=3D"monospace">p</font><font face=3D"arial, sans-serif">&n=
bsp;without editing the source code?<br>
If the answer to either of these questions is "no", would editing=
the source code allow me to do either of these things in the first place?<=
br>
If the answer to that question is "yes", are there any tools or r=
esources that would help me recompile an edited version of Maxima's source =
code?<br>
<br>
Thanks in advance for any responses!<br>
Astrea</font></div>
</div>
</div>
</body>
</html>
--_000_SN6PR07MB795281F5D5CB574EBD1B3276B6FA2SN6PR07MB7952namp_--
--===============8221309772580854221==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
--===============8221309772580854221==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
Maxima-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/maxima-discuss
--===============8221309772580854221==--