PRODUCTS
Products Overview
Mathematica
Mathematica Student Edition
Mathematica Home Edition
Wolfram
CDF Player
(free download)
Computable Document Format (CDF)
web
Mathematica
grid
Mathematica
Wolfram
Workbench
Wolfram
SystemModeler
Wolfram
Finance Platform
Mathematica
Add-Ons
Wolfram|Alpha Products
SOLUTIONS
Solutions Overview
Engineering
Aerospace Engineering & Defense
Chemical Engineering
Control Systems
Electrical Engineering
Image Processing
Industrial Engineering
Materials Science
Mechanical Engineering
Operations Research
Optics
Petroleum Engineering
Biotechnology & Medicine
Bioinformatics
Medical Imaging
Finance, Statistics & Business Analysis
Actuarial Sciences
Data Analysis & Mining
Econometrics
Economics
Financial Engineering & Mathematics
Financial Risk Management
Statistics
Software Engineering & Content Delivery
Authoring & Publishing
Interface Development
Software Engineering
Web Development
Science
Astronomy
Biological Sciences
Chemistry
Environmental Sciences
Geosciences
Social & Behavioral Sciences
Design, Arts & Entertainment
Game Design, Special Effects & Generative Art
Education
STEM Education Initiative
Higher Education
Community & Technical College Education
Primary & Secondary Education
Students
Technology
Computable Document Format (CDF)
High-Performance & Parallel Computing (HPC)
See Also: Technology Guide
PURCHASE
Online Store
Other Ways to Buy
Volume & Site Licensing
Contact Sales
Software
Service
Upgrades
Training
Books
Merchandise
SUPPORT
Support Overview
Mathematica
Documentation
Knowledge Base
Learning Center
Technical Services
Community & Forums
Training
Does My Site Have a License?
Wolfram User Portal
COMPANY
About Wolfram Research
News
Events
Wolfram Blog
Partnerships
Employment Opportunities
History of
Mathematica
Stephen Wolfram's Home Page
Contact Us
OUR SITES
All Sites
Wolfram|Alpha
Demonstrations Project
MathWorld
Integrator
Wolfram Functions Site
Mathematica Journal
Wolfram Media
Wolfram
Tones
Wolfram Science
Stephen Wolfram
SEARCH MATHEMATICA 8 DOCUMENTATION
THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
SEE THE
DOCUMENTATION CENTER
FOR THE LATEST INFORMATION.
Mathematica
>
Mathematics and Algorithms
>
Numerical Evaluation & Precision
>
Display of Numbers
>
Built-in
Mathematica
Symbol
Output Formats for Numbers
Tables and Matrices
Tutorials »
|
TableForm
AccountingForm
NumberForm
ScientificForm
See Also »
|
Display of Numbers
Mathematical Typesetting
Number Digits
More About »
PaddedForm
PaddedForm
[
expr
,
n
]
prints with all numbers in
expr
padded to leave room for a total of
n
digits.
PaddedForm
[
expr
, {
n
,
f
}]
prints with approximate real numbers having exactly
f
digits to the right of the decimal point.
MORE INFORMATION
By default,
PaddedForm
pads with spaces on the left to leave room for
n
digits.
PaddedForm
pads with zeros on the right in approximate real numbers.
The length
n
specified in
PaddedForm
counts only digits, and not signs, breaks between digits, and so on.
PaddedForm
takes the same options as
NumberForm
, but with some defaults different.
You can use
PaddedForm
to align columns of numbers.
PaddedForm
acts as a "wrapper", which affects printing, but not evaluation.
EXAMPLES
CLOSE ALL
Basic Examples
(2)
Display the first 10 digits of a numeric approximation to
:
Display a number with 3 precise digits and 4 digits to the right of the decimal:
Display the first 10 digits of a numeric approximation to
:
In[1]:=
Out[1]//PaddedForm=
Display a number with 3 precise digits and 4 digits to the right of the decimal:
In[1]:=
Out[1]//PaddedForm=
Scope
(5)
The default display for a machine number:
Display more digits than the default:
Display fewer digits:
Format a complex number:
Format a high-precision number:
Change the display of numbers in a vector:
A matrix:
Change the display of inexact numbers in a mixed expression:
Options
(11)
A default integer:
Digits separated in blocks of length 3:
Use five-digit blocks with spaces as separators:
Compute approximate powers of
:
Restrict exponents to multiples of 3:
Include exponents only for powers greater than 10:
Default formatting to 10 digits:
Restrict exponent to multiples of 6:
Display numbers in a Fortran-like form:
Display only the mantissas:
Display the exponents after converting to scientific form:
Use the default multiplier
:
Use an asterisk (*) instead:
The default pads on the left:
Pad with spaces on the right:
Pad with 0s on the right:
The default is a period:
Display with a comma (,) instead:
The default separator is a comma (,):
Use spaces instead:
The default includes negative signs but not positive signs:
Include positive sign as well:
Use words instead of symbols:
The default pads before signs:
Pad between signs and numbers instead:
Applications
(1)
Display approximations of
with increasing precision and number of decimal digits:
Align numbers on the decimal:
Display in a tabular form:
Properties & Relations
(3)
PaddedForm
and
NumberForm
use the same mantissas and exponents by default:
ScientificForm
has a single digit to the left of the decimal:
EngineeringForm
uses exponents that are multiples of 3:
AccountingForm
does not have exponents:
Convert a number to base 2:
Represent the number precise to 3 decimal digits in base 2:
Reconstruct the base-10 number precise to 3 digits:
Change the display of numbers in
MatrixForm
or
TableForm
:
Possible Issues
(2)
Placeholder zeros may be needed if the requested precision is small:
By default, room is set aside for the larger of the two number signs:
SEE ALSO
TableForm
AccountingForm
NumberForm
ScientificForm
TUTORIALS
Output Formats for Numbers
Tables and Matrices
MORE ABOUT
Display of Numbers
Mathematical Typesetting
Number Digits
New in 2