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

MathGroup Archive 2007

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

Search the Archive

Re: Next representable number

  • To: mathgroup at smc.vnet.net
  • Subject: [mg73593] Re: [mg73542] Next representable number
  • From: Bob Hanlon <hanlonr at cox.net>
  • Date: Thu, 22 Feb 2007 04:42:20 -0500 (EST)
  • Reply-to: hanlonr at cox.net

myCeiling[x_, digits_]:=Module[{incr=10^-digits},incr*Ceiling[x/incr]];

Table[myCeiling[Pi,n],{n,0,6}]//N

{4.,3.2,3.15,3.142,3.1416,3.1416,3.14159}


Bob Hanlon

---- Andrew Moylan <andrew.j.moylan at gmail.com> wrote: 
> What's a neat way to determine the next (higher) representable number
> (at a given precision)? That is, I want f[x] to be the smallest
> representable number (at precision Precision[x]) that's larger than x.



  • Prev by Date: mouse wheel with Mathematica on Linux
  • Next by Date: Re: Next representable number
  • Previous by thread: Re: Next representable number
  • Next by thread: Re: Next representable number