Re: Forth PARANOIA



Andrew Haley <andrew29@xxxxxxxxxxxxxxxxxxxxxxx> writes Re: Forth PARANOIA

Ed <nospam@xxxxxxxxxxx> wrote:
[..]
For example most F** do not permit x<0 and some do not
even allow any x=0 cases.

This is because few chips have a power function so it has to be
synthesized with log/exp. The basic form is:

: F** ( x y -- r ) FSWAP FLN F* FEXP ;

Because the first step is log(x) it automatically excludes all
x <= 0.

SwiftForth's F** stops at this point and I'm not sure it's a bad
thing. It's clean and fast.

It's ok because 80-bit intermediate precision is used. If not, it
produces fairly large errors for bases with large magnitudes. This is
an important quality of implementation issue, IMO.

Surely F** should support x^y where y is allowed to be negative.

SwiftForth i386-Win32 3.1.3 29-Feb-2008
CHOOSE-OPTIONS ok
INCLUDING-OPTION C:\ForthInc\SWIFTFORTH\LIB\OPTIONS\` fpmath.f ok
2e -8e F** f. 0.0039062 ok

But unfortunately

0e 8e F** f. FLOAT_INVALID_OPERATION
0e -8e F** f. FLOAT_INVALID_OPERATION

-marcel

.



Relevant Pages

  • Re: How effective is any antivirus program?
    ... Paranoia is a good defense. ... The others then report a clean machine. ... About 8 months ago I had a _severe_ infection on this machine. ... I didn't have a drive image, ...
    (alt.comp.anti-virus)
  • Re: Gamma Function
    ... >> Roberts' paranoia is scarcely justified when there is a tracable source. ... >> I put the code through a debugger and it's clean. ...
    (sci.physics.relativity)
  • Re: Optimising
    ... >Can anyone give me some ideas on how to clean up m ... >computer thoroughly and make it run at optimum ... Other security and efficiency tests: ... Paranoia comes from experience - and is not necessarily a bad thing. ...
    (microsoft.public.windowsxp.general)

Loading