Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2005

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

Search the Archive

Re: managing order of magnitude instead of numbers

  • To: mathgroup at
  • Subject: [mg56819] Re: managing order of magnitude instead of numbers
  • From: Paul Abbott <paul at>
  • Date: Sat, 7 May 2005 04:16:31 -0400 (EDT)
  • Organization: The University of Western Australia
  • References: <d57gvv$p8a$>
  • Sender: owner-wri-mathgroup at

In article <d57gvv$p8a$1 at>,
 foice <foice@N0NSPAMMAR&> wrote:

> i need to make calculation without specifing the exact values of my
> parameters, i want only to specify their order of magnitude.
> obviously i need only order of magnitudes as result.
> now the problem is that 
> O(1) - O(1) = O(1)
> while
> 1-1 = 0
> so it's clear i cannot use numbers to make this "order of magintude
> calculation"

One comment here: Mathematica does know something about objects of this 
type. For example, enter

  O[x] - O[x]

and see what happens. 

Generally, I think you can use Series to do such calculations most 

> at the present stage i let mathematica do the calculation in a fully
> simbolic way and then, by hand calculation, i get my result by
> susbstitution of the order of magnitudes in place of the symobls used.
> making a very simple example:
> i ask to mathematica to do
> a - b
> and then i substitute 
> a=O(1)
> b=O(0.002)
> and calculate
> a - b = O(1)
> in this way i'm  making operation between magnitues not values, but i
> have to do it on my own, while doing calculation with mathematica will
> be much better.
> is there any way to make calculation betwwen order of magnitues
> instead of between numbers?

Perhaps you could use Interval arithmetic? For example, defining

  o[x_] := Interval[x {0.9,1.1}]

to be an order of magnitude interval, then

  o[1] - o[0.002]

returns an interval. We can use the following to check the magnitude:

  oCheck[int_,n_] := IntervalIntersection[int, o[n]] =!= Interval[]

For example,
  oCheck[o[1] - o[0.002], 1]

yields True, whereas

  oCheck[o[1] - o[0.002],0.1]


  oCheck[o[1] - o[0.002], 10]

do not.


Paul Abbott                                      Phone: +61 8 6488 2734
School of Physics, M013                            Fax: +61 8 6488 1014
The University of Western Australia         (CRICOS Provider No 00126G)    

  • Prev by Date: Re: letrec/named let
  • Next by Date: Re: letrec/named let
  • Previous by thread: Re: managing order of magnitude instead of numbers
  • Next by thread: Reading from a file.