Mathematica has lots of Forms. Some of those appear in $PrintForms, like InputForm, OutputForm, CForm and so on, but some Forms do not, like ScientificForm, and StringForm or HornerForm.

What distinguishes when something goes into $PrintForms and what doesn't?

Edit: As noted in the comment, https://mathematica.stackexchange.com/a/73539/1871 mentions there is also $OutputForms which seems to include more things than $Printforms. In particular it contains ScientificForm, but not StringForm or HornerForm.

What is the difference between these $PrintForms and $OutputForms?

In https://reference.wolfram.com/language/tutorial/TextualInputAndOutput.html#12368 I read:

It is important to understand that in a typical Wolfram Language session In[n] and Out[n] record only the underlying expressions that are processed, not the textual representations that happen to be used for their input or output.

If you explicitly request a particular kind of output, say by using TraditionalForm[expr], then what you get will be labeled with Out[n]//TraditionalForm. This indicates that what you are seeing is expr//TraditionalForm, even though the value of Out[n] itself is just expr.

I note that StringForm and HornerForm do not work that way though. Is there guide to understanding what will be marked Out[n]//XXXForm and what won't?

More generally, are there natural classes of forms? Two kinds suggested above are: those that are in $PrintForms, $OutputForms, those that appear as //XXForm in output, and others.

However these might be quirky and there might be other more natural classifications of Form functions.



Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.