MathGroup Archive 2004

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

Search the Archive

Re: functions

  • To: mathgroup at
  • Subject: [mg45757] Re: functions
  • From: drbob at (Bobby R. Treat)
  • Date: Fri, 23 Jan 2004 03:15:50 -0500 (EST)
  • References: <> <btthrc$so2$>
  • Sender: owner-wri-mathgroup at

Unfortunately, a randomly chosen real number that ISN'T irrational
according to this test still has probability 1 of being irrational. 
(If the probability measure is anything reasonable, anyway -- if the
CDF has only countably many points of discontinuity, for instance.)

The probability that a user intended the number to be rational, on the
other hand, is completely imponderable.


Selwyn Hollis <sh2.7183 at> wrote in message news:<btthrc$so2$1 at>...
> On second thought, I think this is a better idea:
>    IrrationalQ[x_] := Denominator[Rationalize[x,.0001]] > 50
> With it, IrrationalQ[Random[]] returns True most of the time, as it 
> should (probability approx .85), but returns False often enough to be 
> interesting.
> -----
> Selwyn Hollis
> (edit reply-to to reply)

  • References:
  • Prev by Date: Re: modifying style of notebook
  • Next by Date: Re: "Rubbish" integration outputs
  • Previous by thread: Re: Re: functions
  • Next by thread: Re: functions