Perl 6 - the future is here, just unevenly distributed

IRC log for #webwork, 2012-04-27

| Channels | #webwork index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
12:01 aubreyja joined #webwork
12:21 mgage__ joined #webwork
12:29 nmichalo joined #webwork
13:54 aubreyja joined #webwork
13:54 aubreyja joined #webwork
14:16 aubreyja joined #webwork
15:21 JohnTravis joined #webwork
16:45 mgage joined #webwork
20:11 nmichalo I am going to ask a rather noobish question.  In terms of the correct solution show to the student, after the assignment is turned in, is there a way to prevent long decimals to appear in that in favor of fractions?
20:11 nmichalo Assuming I am authoring the problem myself that is.
20:26 mgage possbily nothing completely automatic (unless the entire problem has been in Fractions).  There are lowlevel macros in PGbasicmacros.pl that help you display decimals, so you can limit the decimal display to only a certain number of significant places.  I believe that you can also do this when defining a Context -- although I would have to check on that.  There are contexts that enforce fractions for answers and through out the problem.
20:28 mgage typing Fractions into the search blank on the wiki will give you a number of examples where the problem is to have the students enter fractions in a certain way.
20:29 mgage The other relevant fact is that if you use something like   Compute(" 4/5") then the correct answer will be displayed as 4/5 and not as 0.80  although the latter will be accepted as a correct answer.  This is why Compute("4/5") might be superior to
20:30 mgage Real(4/5) which would display the answer as 0.80
20:32 mgage The low level formatter in PGbasicmacros.pl is called   spf($number, $format) and is essentially front end for sprintf() in perl or C.
21:47 nmichalo good to know, thank you
21:47 52AAATXOV np
21:49 mgage_ joined #webwork
21:49 mgage_ aubreyja: hi

| Channels | #webwork index | Today | | Search | Google Search | Plain-Text | summary