MathGroup Archive 2011

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

Search the Archive

Re: The derivative of 1

  • To: mathgroup at smc.vnet.net
  • Subject: [mg117422] Re: The derivative of 1
  • From: David Bailey <dave at removedbailey.co.uk>
  • Date: Fri, 18 Mar 2011 05:59:24 -0500 (EST)
  • References: <ilsrlo$t7e$1@smc.vnet.net>

On 17/03/2011 11:35, Themis Matsoukas wrote:
> How can I get rid of the inconsequential but bothersome "0." that appears at the beginning of the following result? We are really talking about the derivative of 1.
>
> D[(1 + (1 - Sqrt[x]) (1.574 \[Omega] - 0.176 \[Omega]^2)), x]
>
> 0.\[VeryThinSpace]- (1.574 \[Omega] - 0.176 \[Omega]^2)/(2 Sqrt[x])
>
> As an aside, why isn't 0.+whatever equal to whatever?
>
> Thanks
>

One answer is to apply //Chop to strip out the 0.

The best answer is to avoid doing algebra or calculus on expressions 
involving real (decimal) numbers, because quantities that should cancel 
out, don't if they are inexact.

0.+whatever means an inexact version of whatever to machine precision.

Use names for the two decimal constants, and then insert them into the 
final answer:

expr /. {c1->1.574,c2->0.176}

David Bailey
http://www.dbaileyconsultancy.co.uk



  • Prev by Date: Re: Wolfram, meet Stefan and Boltzmann
  • Next by Date: Re: The derivative of 1
  • Previous by thread: Re: The derivative of 1
  • Next by thread: Re: The derivative of 1