Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion very large reals?

Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!news.cis.ohio-state.edu!news.dfci.harvard.edu!news.harvard.edu!news.rice.edu!newsfeed.rice.edu!rice!not-for-mail
From: Rahul Jain <rj...@sid-1129.sid.rice.edu>
Newsgroups: comp.lang.lisp
Subject: Re: very large reals?
Date: 20 Feb 2002 13:10:47 -0600
Organization: Rice University, Houston TX
Lines: 33
Message-ID: <873czwezpk.fsf@photino.sid.rice.edu>
References: <ap3zo242g84.fsf@fosters.umd.edu>
NNTP-Posting-Host: sid-1129.sid.rice.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Trace: joe.rice.edu 1014232248 27107 128.42.162.129 (20 Feb 2002 19:10:48 GMT)
X-Complaints-To: abuse@rice.edu
NNTP-Posting-Date: 20 Feb 2002 19:10:48 GMT
User-Agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.4 (Common Lisp)

Deepak Goel <de...@glue.umd.edu> writes:

> While (Expt 100 100) is okay with CL, why deosn't (expt 100.0 100.0)
> return something useful?

Because your floating point representation can't, probably.

> why can't the exponent-parts of the reals be allowed to be as high as
> it gets?

> It's like: CL frees you from upper limits on numbers (as compared to,
> say C) when dealing with integers but not when dealing with reals..

They are, but you're using floats, which are a specific type of real.

> or did i miss something obvious?  or is there a package or some other
> way that allows the exponent-part to get as large as it wants to ?  

if you want arbitrary-precision exact fraction arithmetic, try
rationals, but I don't think expt will return a rational...

Floating point arithmetic is fixed-range-precision inexact fraction
arithmetic. The range and precision of floating point is a function of
the size of the type you're using. (expt 100.0d0 100.0d0) _might_ work
better.

-- 
-> -/-                       - Rahul Jain -                       -\- <-
-> -\- http://linux.rice.edu/~rahul -=-  mailto:rj...@techie.com  -/- <-
-> -/- "I never could get the hang of Thursdays." - HHGTTG by DNA -\- <-
|--|--------|--------------|----|-------------|------|---------|-----|-|
   Version 11.423.999.221020101.23.50110101.042
   (c)1996-2002, All rights reserved. Disclaimer available upon request.