Hello Rex, The LON-CAPA javascript previewer available for forumularresponse items will display Unicode characters for inf and minf in the preview, but the text entered in the "Submit Answer" textbox by the student will be what is submitted by the web form.
(See: the enode.js file in loncom/html/adm/LC_math_editor/src/enode.js in the LON-CAPA source repository -- source.loncapaorg/cgi-bin/cvsweb.cgi/ for the mapping to Unicode. Maxima itself supports: inf, minf, and -inf formularesponse with a preprocessor routine to convert INF or Inf to all inf in a student's submission before sending to Maxima for evaluation is what I would do in the current LON-CAPA. > > I was just wondering about whether there is (or should be) a "standardized" > way to do it. > Internally in LON-CAPA, a routine: maxima_cas_formula_fix() in lonmaxima.pm is used to (a) take care of implicit multiplication, and (b) convert pi to %pi, if pi is present, unless pi happens to be within a variable name (e.g., pie). If conversion of INF and Inf were to be made "standard" (i.e., without use of an author-defined preprocessor routine) then the likely approach would be to include an appropriate regular expression in maxima_cas_formula_fix(). Stuart Raeburn LON-CAPA Academic Consortium ________________________________________ From: LON-CAPA-users <lon-capa-users-boun...@mail.lon-capa.org> on behalf of Rex Abert <abe...@tcc.fl.edu> Sent: Wednesday, May 27, 2020 8:24 AM To: lon-capa-users@mail.lon-capa.org Subject: Re: [LON-CAPA-users] Using symbols for "infinity" in responses 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. Rex On 5/26/20 6:13 PM, Justin Gray wrote: CAUTION: 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. Hi Rex, I see that Purdue has a guide on Entering Math Expressions in LON-CAPA at https://www.math.purdue.edu/academic/files/courses/2016summer/MA16010/EnteringMathExpressionsinLON-CAPA.pdf<https://urldefense.com/v3/__https://www.math.purdue.edu/academic/files/courses/2016summer/MA16010/EnteringMathExpressionsinLON-CAPA.pdf__;!!HXCxUKc!lYy8XPbj8zY_tsKaNb2xijqlp21RW7Kz2eD4WPcy7I2taPcH9ReQgDnUlHB9kA$> While it is possible to author questions in LON-CAPA that accept this syntax, I do not believe that this is strict Maxima syntax: Infinity is written as inf Negative infinity is written as minf (though I think -inf will still work) The constant pi is written %pi The exponential function is written as %e^(x) or exp(x) 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. ln(x) is otherwise interpreted as l*n*x which makes accepting equivalent answers difficult. Best, Justin -- Justin Gray Senior Lecturer | Department of Mathematics Simon Fraser University | SCK 10531 8888 University Dr., Burnaby, B.C. V5A 1S6 Canada T: 778.782.4237 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 On Tue, May 26, 2020 at 5:34 AM Rex Abert <abe...@tcc.fl.edu<mailto:abe...@tcc.fl.edu>> wrote: I am developing some <formularesponse> questions for Calculus I limits at infinity. Sometimes the answer is +infinity or -infinity, sometimes a constant (horizontal asymptote). If I set the correct response as "inf" (lowercase), the previewer correctly interprets the symbol as expected. A guide published by Purdue suggests that all caps should be used, "INF." I had the answer in a question set as "-inf" and a student entered "-INF" and it was marked incorrect, as Maxima should, because uppercase and lowercase symbols are different to Maxima. I guess I am just looking for clarification on a standard way to do this in LC, given the behavior of the javascript previewer. -- Rex Abert Professor of Mathematics Tallahassee Community College ***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.*** _______________________________________________ LON-CAPA-users mailing list LON-CAPA-users@mail.lon-capa.org<mailto:LON-CAPA-users@mail.lon-capa.org> http://mail.lon-capa.org/mailman/listinfo/lon-capa-users _______________________________________________ LON-CAPA-users mailing list LON-CAPA-users@mail.lon-capa.org<mailto:LON-CAPA-users@mail.lon-capa.org> http://mail.lon-capa.org/mailman/listinfo/lon-capa-users -- Rex Abert Professor of Mathematics Tallahassee Community College _______________________________________________ LON-CAPA-users mailing list LON-CAPA-users@mail.lon-capa.org http://mail.lon-capa.org/mailman/listinfo/lon-capa-users