Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.math.mathematica

Topic: unser-interface problems using Mathematica as a calculator
Replies: 2   Last Post: Nov 12, 2013 12:05 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Bob Hanlon

Posts: 906
Registered: 10/29/11
Re: unser-interface problems using Mathematica as a calculator
Posted: Nov 12, 2013 12:05 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply


If you want to see the "true" value rather than a rounded display value
then set preferences to display full machine precision (Mathematica |
Preferences ... | Appearance | Numbers | Formatting | Displayed precision |
Number of digits displayed in output) or use FullForm, InputForm,
Rationalize, or exact numbers.


Note the use of parentheses with either FullForm or InputForm to avoid
including the wrapper in the definion of tv.


(tv = TimeValue[1, 0.04, 3]) // FullForm

1.124864`


(tv = TimeValue[1, 0.04, 3]) // InputForm


1.124864


tv = TimeValue[1, 0.04, 3] // Rationalize


17576/15625


tv = TimeValue[1, 4/100, 3]


17576/15625



Bob Hanlon




On Mon, Nov 11, 2013 at 12:05 AM, Alan <alan.isaac@gmail.com> wrote:

> The example below illustrates why Mathematica's display rules for
> approximate numbers are very confusing for students. Should this be
> considered a user-interface bug? If not, why not? In any case, can the
> default display be changed to something more familiar from spreadsheets and
> other computing languages?
> Thanks,
> Alan Isaac
>
> In[217]:= tv = TimeValue[1, 0.04, 3]
> tv == 1.124864
> tv == 1.12486
>
> Out[217]= 1.12486
>
> Out[218]= True
>
> Out[219]= False
>
>




Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.