13.07.2015 Views

Mathematica Tutorial: Notebooks And Documents - Wolfram Research

Mathematica Tutorial: Notebooks And Documents - Wolfram Research

Mathematica Tutorial: Notebooks And Documents - Wolfram Research

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

76 <strong>Notebooks</strong> and <strong>Documents</strong>Setting DigitBlock -> n breaks digits into blocks of length n.In[8]:=NumberForm@30!, DigitBlock -> 3DOut[8]//NumberForm= 265,252,859,812,191,058,636,308,480,000,000You can specify any string to use as a separator between blocks of digits.In[9]:= NumberForm@30!, DigitBlock -> 5, NumberSeparator -> " "DOut[9]//NumberForm= 265 25285 98121 91058 63630 84800 00000This gives an explicit plus sign for positive numbers, and uses » in place of a decimal point.In[10]:=NumberForm@84.5, -6.8 8"-", "+" "»"DOut[10]//NumberForm=8+4»5, -6»8 H3 Quotient@Ò, 3D &LDOut[13]//NumberForm=932.768 µ 10 3 , 19.4872 µ 10 6 , 10.6045 µ 10 9 =Having determined what the mantissa and exponent for a number should be, the final step is toassemble these into the object to print. The option NumberFormat allows you to give an arbitraryfunction which specifies the print form for the number. The function takes as argumentsthree strings: the mantissa, the base, and the exponent for the number. If there is no expo-

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!