axiom-developer
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Axiom-developer] i-output and decimal width


From: Waldek Hebisch
Subject: Re: [Axiom-developer] i-output and decimal width
Date: Mon, 6 Aug 2007 21:56:26 +0200 (CEST)

Stephen Wilson wrote:
> Stephen Wilson <address@hidden> writes:
> > Could I suggest the following to replace these two cases:
> > 
> >     (+ 1 |negative| (round (log n 10)))
> 
> 
> This should _not_ be used to replace both cases, but only the first.
> I believe the second case might be OK unless the `over estimation'
> is not enough account for the width in the negative case.
> 
> However, these messages are now adrift a bit premature, so perhaps
> someone may know of a better solution?
> 

I looked at this code and I belive that I have written a better
version (commited to wh-sandbox).  Some remarks:

- Ansi says that for exact arguments results are either exact or
  single precision.  I feel that single precision give us no
  help so I use double precision arguments (as type gcl does not
  distingiush between single and double, but it stil gave only
  single precision result).
- for moderate lengths if numerical result is suspect I use
  extra verification.
- for large arguments I use over-estimate. 

-- 
                              Waldek Hebisch
address@hidden 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]