Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
1992
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 1992

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

Search the Archive

AllRoots, indented and functionalized .....

  • To: MATHGROUP at yoda.physics.unc.edu, PAUL at earwax.pd.uwa.edu.au
  • Subject: AllRoots, indented and functionalized .....
  • From: "Mathematical Institute, (0865) 2-73525" <AKYILDIZ at vax.ox.ac.uk>
  • Date: Sat, 10 Oct 92 16:42 BST

(*

WARNING.....

The built in function Real Interval is not (yet) bug-free.

For example, in Allan Hayes' code, f and (a-b) must be padded by N.

Programme below will also work with symbolic, i.e. Pi, interval
limits as well.

Thanks go to A.W. Wickstead of Queens Univ., Belfast and
Allan Hayes of Leicester Univ..

Yilmaz Akyildiz

*)

lefthalf[RealInterval[{x_, y_}]]    := RealInterval[{x,(x+y)/2.}];
righthalf[RealInterval[{x_, y_}]]   := RealInterval[{(x+y)/2.,y}];
containszero[RealInterval[{x_,y_}]] :=  (x <= 0 <= y);
bisect[int_RealInterval]            := {lefthalf[int],righthalf[int]};

intbisecF[f_Function, a_, b_, tol_] :=
   With[
      {step =	Select[(bisect/@#)//Flatten, containszero[N[f[#]]]&]& },
      Nest[step, {RealInterval[N[{a,b}]]}, Ceiling[Log[2,N[(b-a)]/tol]]]
	  ];







  • Prev by Date: Re: Memory management by Share[]?
  • Next by Date: RealInterval needing N
  • Previous by thread: Fortran Format
  • Next by thread: RealInterval needing N