Forum archive 2000-2006

John E. Doner - number formats in matrices

John E. Doner - number formats in matrices

by Arnold Pizer -
Number of replies: 0
inactiveTopicnumber formats in matrices topic started 9/28/2005; 6:44:48 PM
last post 9/29/2005; 1:39:33 AM
userJohn E. Doner - number formats in matrices  blueArrow
9/28/2005; 6:44:48 PM (reads: 318, responses: 1)
It would be nice to have a way of setting the number formats for display_matrix. The default is % #-19.12E which can get pretty ugly for a sizeable matrix. Looking at PGmatrixmacros.pm, it appears that this capability was once present, but has been deleted (commented out). But why---it seems like a good idea.

John Doner

<| Post or View Comments |>


userJohn Jones - Re: number formats in matrices  blueArrow
9/29/2005; 1:39:33 AM (reads: 443, responses: 0)
Hi,

The rochester cvs contains the file's history along with the changes for it over the years. From that, it looks like the same person who started to implement something along these lines then took it out. The comment when it was taken out was that "It seems as though the way I tried to fix long decimals isn't working the way I wanted it too, so I've commented it out for now."

That was 2 years ago; I don't really know what was good/bad in the result. You could always uncomment the lines and try different matricies to see if it really does work the way you like.

I think the reason this hasn't drawn much attention in the mean time is that most matricies in webwork problems are set up to look nicely to start with, e.g., but using integer entries. Problems which display matricies with non-integer decimals are probably unusual, and they may format the numbers in the problem itself so that display_matrix gets strings for the entries rather than variables holding real numbers.

John

<| Post or View Comments |>