Message Boards Message Boards

0
|
3863 Views
|
2 Replies
|
0 Total Likes
View groups...
Share
Share this post:

Display of big real number without the default powers of base ten?

Posted 8 years ago

Hi,

I'm new to Mathematica. Is it possible define some settings in Mathematica so as big real number would be displayed automatically like

2380570.51

instead of

2.380570x10^6 

Thanks for help

POSTED BY: Francois Hurter
2 Replies
Posted 8 years ago

Perhaps this will get you part of the way to where you want to go

In[1]:= 2380570.51

Out[1]= 2.38057*10^6

In[2]:= $PrePrint = AccountingForm[#, NumberSigns->{"-",""}]&;

In[3]:= 2380570.51

Out[3]= 2380571.

In[4]:= 10^21

Out[4]= 1000000000000000000000

That removes the scientific notation on output, but does not deal with the issue of how many digits should be displayed when the number includes a decimal point because that is a much more involved subject.

You can turn this back off with this

In[5]:= $PrePrint =.

In[6]:= 2380570.51

Out[6]= 2.38057*10^6

Please be careful with this. Any time you get close to violating one of the fundamental principles of an organized body of knowledge you then run the risk of unexpected consequences.

POSTED BY: Bill Simpson
Posted 8 years ago

AccountingForm accepts Infinity as the second argument:

AccountingForm[2380570.51, Infinity, NumberSigns -> {"-", ""}]
2380570.51
POSTED BY: Alexey Popkov
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract