Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2013

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: unser-interface problems using Mathematica as a calculator

  • To: mathgroup at smc.vnet.net
  • Subject: [mg131991] Re: unser-interface problems using Mathematica as a calculator
  • From: Bob Hanlon <hanlonr357 at gmail.com>
  • Date: Tue, 12 Nov 2013 00:15:30 -0500 (EST)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • Delivered-to: l-mathgroup@wolfram.com
  • Delivered-to: mathgroup-outx@smc.vnet.net
  • Delivered-to: mathgroup-newsendx@smc.vnet.net
  • References: <20131111050512.D010D6A1E@smc.vnet.net>

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 at 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
>
>


  • Prev by Date: Re: unser-interface problems using Mathematica as a calculator
  • Next by Date: Re: unser-interface problems using Mathematica as a calculator
  • Previous by thread: unser-interface problems using Mathematica as a calculator
  • Next by thread: Re: unser-interface problems using Mathematica as a calculator