High level F** (and/or FEXP)
  Home FAQ Contact Sign in
comp.lang.forth only
 
Advanced search
POPULAR GROUPS

more...

comp.lang.forth Profile…
 Up
High level F** (and/or FEXP)         


Author: The Beez'
Date: May 15, 2008 13:31

I'm still building on top of Brad's FP emulation library and I'm
coming along quite nicely, doing FSIN, FCOS, FTAN, FLN, FLOG, FASIN,
FACOS, FATAN, FATAN2.

But I'm still lacking a reasonably reliable F** or FEXP. I found this
one, but it lacks several definitions:

: F** FOVER F0= IF FDROP EXIT ENDIF \ F: ---

FOVER F0< IF FDUP F>S DUP 1 AND ( -- odd? )
SWAP S>F FOVER F= IF FSWAP FABS FLOG2(X) F*
F2^X
( odd? -- ) IF FNEGATE
ENDIF EXIT
ELSE F2DROP DROP -NAN EXIT
ENDIF
ENDIF
FSWAP FLOG2(X) F* F2^X ;

(a) Anybody care to tell me what:

FLOG2(X)
F2^X
Show full article (0.90Kb)
3 Comments
Re: High level F** (and/or FEXP)         


Author: Krishna Myneni
Date: May 15, 2008 20:55

The Beez' wrote:
> I'm still building on top of Brad's FP emulation library and I'm
> coming along quite nicely, doing FSIN, FCOS, FTAN, FLN, FLOG, FASIN,
> FACOS, FATAN, FATAN2.
>
> But I'm still lacking a reasonably reliable F** or FEXP. I found this
> one, but it lacks several definitions:
>
>
> : F** FOVER F0= IF FDROP EXIT ENDIF \ F: ---
>
> FOVER F0< IF FDUP F>S DUP 1 AND ( -- odd? )
> SWAP S>F FOVER F= IF FSWAP FABS FLOG2(X) F*
> F2^X
> ( odd? -- ) IF FNEGATE
> ENDIF EXIT
> ELSE F2DROP DROP -NAN EXIT
> ENDIF
> ENDIF
> FSWAP FLOG2(X) F* F2^X ; ...
Show full article (1.37Kb)
no comments
Re: High level F** (and/or FEXP)         


Author: Andrew Haley
Date: May 16, 2008 03:39

Krishna Myneni bellsouth.net> wrote:
> The Beez' wrote:
>> I'm still building on top of Brad's FP emulation library and I'm
>> coming along quite nicely, doing FSIN, FCOS, FTAN, FLN, FLOG, FASIN,
>> FACOS, FATAN, FATAN2.
>>
>> But I'm still lacking a reasonably reliable F** or FEXP. I found this
>> one, but it lacks several definitions:
>>
>>
>> : F** FOVER F0= IF FDROP EXIT ENDIF \ F: ---
>>
>> FOVER F0< IF FDUP F>S DUP 1 AND ( -- odd? )
>> SWAP S>F FOVER F= IF FSWAP FABS FLOG2(X) F*
>> F2^X
>> ( odd? -- ) IF FNEGATE
>> ENDIF EXIT
>> ELSE F2DROP DROP -NAN EXIT
>> ENDIF
>> ENDIF ...
Show full article (2.47Kb)
no comments
Re: High level F** (and/or FEXP)         


Author: Albert van der Horst
Date: May 16, 2008 14:44

In article bignews2.bellsouth.net>,
Krishna Myneni bellsouth.net> wrote:
>The Beez' wrote:
>> I'm still building on top of Brad's FP emulation library and I'm
>> coming along quite nicely, doing FSIN, FCOS, FTAN, FLN, FLOG, FASIN,
>> FACOS, FATAN, FATAN2.
>>
>> But I'm still lacking a reasonably reliable F** or FEXP. I found this
>> one, but it lacks several definitions:
>>
>>
>> : F** FOVER F0= IF FDROP EXIT ENDIF \ F: ---
>>
>> FOVER F0< IF FDUP F>S DUP 1 AND ( -- odd? )
>> SWAP S>F FOVER F= IF FSWAP FABS FLOG2(X) F*
>> F2^X
>> ( odd? -- ) IF FNEGATE
>> ENDIF EXIT
>> ELSE F2DROP DROP -NAN EXIT
>> ENDIF ...
Show full article (1.95Kb)
no comments