I'm trying to substitute TableForm with TableView because TableView is more handy with big data .

But on my Mathematica 9.0.1 (ubuntu 14.04_64bit) there is a problem with negative numbers:

aa = {{5.10, 1.2}, {-5.10, -1.2}}

aa // TableForm 

the last is fine but if I type


the output of negative nuimbers is wrong (see attached immage) Negative numbers like -5.1 appears like -.51 !!!!

enter image description here

######## UPDATE 04.06.2014 @ 8.21 GMT

If you work with strings like that:

aa1 = {{"5.1", "1.2"}, {"-5.1", "-1.2"}}

TableView has no problem, look the picture:

enter image description here

  • 2
    $\begingroup$ The same thing happens here (Mma 9.0.1 on Win32) $\endgroup$ – Dr. belisarius Jun 3 '14 at 13:17
  • 10
    $\begingroup$ Do not forget that TableView is undocumented and unsupported. Bad things may happen if you use it. (In practice: it may crash your front end and you'll lose unsaved changes, as well as the current kernel state. It happened to me.) $\endgroup$ – Szabolcs Jun 3 '14 at 14:40
  • 4
    $\begingroup$ @belisarius I do not agree with the bugs tag you added. I feel that that should only be apllied to MMA features that are part of the official corpus. $\endgroup$ – Sjoerd C. de Vries Jun 3 '14 at 14:44
  • 4
    $\begingroup$ @SjoerdC.deVries I think it may serve others to be aware that the misbehavior has been repro'ed. Of course you can't report this to WRI, but as this isn't an official site, the tag works more as a help/warn for other users than as a request/demand to fix the behavior. $\endgroup$ – Dr. belisarius Jun 3 '14 at 15:05
  • 3
    $\begingroup$ @Öskå in V8 TableView was made of boxes such as GridBox. In V9 it was reinvented with its own TableViewBox. So the V8 and V9 versions are completely different beasts. $\endgroup$ – Mike Honeychurch Jun 3 '14 at 22:18

It's clearly a bug, of course. You may also check the following "reformatting" weird behavior: If after executing TableView you "reexecute" the output, the negative numbers get their correct formatting:

enter image description here

as mentioned in the comments above it looks like a ToBoxes bugged implementations for negative numbers. Any of the following work OK:

a1 = Map[ToBoxes, aa, {2}]
a2 = Map[ToString, aa, {2}]
a3 = Map[SetPrecision[#, 3] &, aa, {2}]
TableView /@ {aa, a1, a2, a3}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.