<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<p>This does the trick:</p>
<p><br>
</p>
<p>if($a*$d > 0){<br>
$answer = inf;<br>
}else{<br>
$answer = -inf;<br>
}<br>
sub toLowerCase {<br>
my ($response) = @_;<br>
# Remove spaces<br>
$response =~ s/ //g;<br>
$response = lc $response;<br>
return $response;<br>
}<br>
</script><br>
<br>
<startouttext /><br>
Evaluate the limit. <br /><br /><br>
<m eval="on">$$ $lim1 $$</m><br>
<endouttext /><br>
<br>
<p /><br>
<formularesponse answer="$answer" id="12"
preprocess="toLowerCase"><br>
<textline /><br>
Enter a number, reduced fraction, or "inf" for <m>$
\infty</m>, "-inf" for <m>$ -\infty</m>, or
"DNE" if a limit does not exist.<br>
</formularesponse><br>
<br>
</p>
<div class="moz-cite-prefix">On 5/27/20 8:24 AM, Rex Abert wrote:<br>
</div>
<blockquote type="cite" cite="mid:55273afa-927b-d9d4-bbab-a4ec87330092@tcc.fl.edu">
<p>I was just wondering about whether there is (or should be) a
"standardized" way to do it. I have decided that what I will do
is use a formula response with preprocessing to make student
responses case-insensitive.</p>
<p>Rex<br>
</p>
<div class="moz-cite-prefix">On 5/26/20 6:13 PM, Justin Gray
wrote:<br>
</div>
<blockquote type="cite" cite="mid:CALZ44BVu2fno8YQ3Wtd=EcVGpXY-J_BO4emRCTO=UabOMYuazg@mail.gmail.com">
<div style="background-color: rgb(255, 235, 156); border: 1pt
solid rgb(156, 101, 0); padding: 2pt; font-size: 10pt;
line-height: 12pt; font-family: Calibri; text-align: left;" class=""> <span style="color: rgb(156, 101, 0); font-weight:
bold;" class="">CAUTION:</span><span class="Apple-converted-space"> </span>This email originated
from outside of the college. Do not click links or open
attachments unless you recognize the sender and know the
content is safe.</div>
<br>
<div>
<div dir="ltr">Hi Rex,
<div><br>
</div>
<div>I see that Purdue has a guide on Entering Math
Expressions in LON-CAPA at</div>
<div><a href="https://www.math.purdue.edu/academic/files/courses/2016summer/MA16010/EnteringMathExpressionsinLON-CAPA.pdf" moz-do-not-send="true">https://www.math.purdue.edu/academic/files/courses/2016summer/MA16010/EnteringMathExpressionsinLON-CAPA.pdf</a><br>
</div>
<div><br>
</div>
<div>While it is possible to author questions in LON-CAPA
that accept this syntax, I do not believe that this is
strict Maxima syntax:</div>
<div><br>
</div>
<div>Infinity is written as inf</div>
<div>Negative infinity is written as minf (though I think
-inf will still work)</div>
<div>The constant pi is written %pi</div>
<div>The exponential function is written as %e^(x) or exp(x)</div>
<div><br>
</div>
<div>ln(x) is written as log(x) - this is confusing to
students but you could write a mathresponse problem to
redefine ln(x) to be log(x) in the answer algorithm if you
want.</div>
<div>ln(x) is otherwise interpreted as l*n*x which makes
accepting equivalent answers difficult.</div>
<div><br>
</div>
<div>Best,</div>
<div>Justin<br clear="all">
<div>
<div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature">
<div dir="ltr">
<div>
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div style="border:0px;margin:0px;padding:0px">
<div style="border:0px;margin:0px;padding:0px">
<h3 style="border:0px;margin:1.5rem
0px;padding:0px">
<div style="color:rgb(0,0,0);font-family:"Source
Serif
Pro",sans-serif;font-size:16px;border:0px;margin:0px;padding:0px">
<div style="border:0px;margin:0px;padding:0px">
<p style="border:0px;margin:1rem
0px
1.5rem;padding:0px;font-stretch:normal;font-size:12px;line-height:18px;font-family:Arial,Helvetica,sans-serif"><span style="font-weight:normal">--</span></p>
<p style="font-weight:100;border:0px;margin:1rem
0px
1.5rem;padding:0px;font-stretch:normal;font-size:12px;line-height:18px;font-family:Arial,Helvetica,sans-serif"><b>Justin
Gray</b><br>
Senior Lecturer |
Department of
Mathematics<br>
Simon Fraser
University | SCK
10531<br>
8888 University
Dr., Burnaby, B.C.
V5A 1S6<br>
Canada<br>
T: 778.782.4237<br>
</p>
</div>
</div>
<span style="font-weight:normal"><font size="1">Simon
Fraser University is
located on the
Unceded Coast Salish
Territories of the
xʷməθkʷəy̓əm
(Musqueam),
Səl̓ílwətaʔ/Selilwitulh
(Tsleil-Waututh),
Kwikwitlem, and
Skwxwú7mesh Úxwumixw
(Squamish) Peoples<br>
</font></span></h3>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<br>
</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Tue, May 26, 2020 at
5:34 AM Rex Abert <<a href="mailto:abertr@tcc.fl.edu" moz-do-not-send="true">abertr@tcc.fl.edu</a>> wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left:1px solid
rgb(204,204,204);padding-left:1ex"> I am developing some
<formularesponse> questions for Calculus I limits<br>
at infinity. Sometimes the answer is +infinity or
-infinity, sometimes<br>
a constant (horizontal asymptote). If I set the correct
response as<br>
"inf" (lowercase), the previewer correctly interprets the
symbol as<br>
expected. A guide published by Purdue suggests that all
caps should be<br>
used, "INF." I had the answer in a question set as "-inf"
and a student<br>
entered "-INF" and it was marked incorrect, as Maxima
should, because<br>
uppercase and lowercase symbols are different to Maxima.<br>
<br>
I guess I am just looking for clarification on a standard
way to do this<br>
in LC, given the behavior of the javascript previewer.<br>
<br>
--<br>
Rex Abert<br>
Professor of Mathematics<br>
Tallahassee Community College<br>
<br>
<br>
<br>
***Due to Florida's very broad public records law, most
written communications to or from Tallahassee Community
College employees regarding College business are public
records, available to the public and media upon request.
Therefore, this email communication and your response may
be subject to public disclosure.***<br>
_______________________________________________<br>
LON-CAPA-users mailing list<br>
<a href="mailto:LON-CAPA-users@mail.lon-capa.org" target="_blank" moz-do-not-send="true">LON-CAPA-users@mail.lon-capa.org</a><br>
<a href="http://mail.lon-capa.org/mailman/listinfo/lon-capa-users" rel="noreferrer" target="_blank" moz-do-not-send="true">http://mail.lon-capa.org/mailman/listinfo/lon-capa-users</a><br>
</blockquote>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
LON-CAPA-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:LON-CAPA-users@mail.lon-capa.org" moz-do-not-send="true">LON-CAPA-users@mail.lon-capa.org</a>
<a class="moz-txt-link-freetext" href="http://mail.lon-capa.org/mailman/listinfo/lon-capa-users" moz-do-not-send="true">http://mail.lon-capa.org/mailman/listinfo/lon-capa-users</a>
</pre>
</blockquote>
<pre class="moz-signature" cols="72">--
Rex Abert
Professor of Mathematics
Tallahassee Community College</pre>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
LON-CAPA-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:LON-CAPA-users@mail.lon-capa.org">LON-CAPA-users@mail.lon-capa.org</a>
<a class="moz-txt-link-freetext" href="http://mail.lon-capa.org/mailman/listinfo/lon-capa-users">http://mail.lon-capa.org/mailman/listinfo/lon-capa-users</a>
</pre>
</blockquote>
<pre class="moz-signature" cols="72">--
Rex Abert
Professor of Mathematics
Tallahassee Community College</pre>
</body>
</html>