Talk About Network



Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Forth > Re: Fixed-point...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 5 of 8 Topic 3983 of 4053
Post > Topic >>

Re: Fixed-point math, ANS, DPL and Win32Forth

by m_l_g3 <m_l_g3@[EMAIL PROTECTED] > Apr 4, 2008 at 10:45 AM

On Apr 3, 3:16 am, George Hubert <georgeahub...@[EMAIL PROTECTED]
> wrote:
> On Apr 2, 10:44 pm, Alex McDonald <b...@[EMAIL PROTECTED]
> wrote:
>
>
>
> > On Apr 2, 8:17 am, m_l...@[EMAIL PROTECTED]
 wrote:
>
> > > Historically, there has been the variable DPL acquiring its value as
a
> > > side efect of number conversion.
>
> > > For example,
>
> > > 1000 \ single, dpl=-1
> > > 1000. \ double, dpl=0
> > > 10.00 \ double, dpl=2
>
> > > So,
> > > 1) Why DPL is not in the standard?
> > > 2) Why DPL is not in Win32Forth?
>
> > DP-LOCATION in Version 6 and prior, DPL in the STC version.
>
> > --
> > Regards
> > Alex McDonald
>
> In both cases they're VALUEs rather than a VARIABLE, so code
> that uses them would be different.
>
> George Hubert


So,

' dp-location >body constant DPL

and a bug fix (for myself, in case I will need the code later)


: x ( d -- xn ) dpl @[EMAIL PROTECTED]
 1+ if drop then  logscale dpl @[EMAIL PROTECTED]
 0 max - dup abs
10^ swap 0< if /
else * then ;

The only thing to remember is that constants like 0 and 1 DO NOT
modify DPL.




 8 Posts in Topic:
Fixed-point math, ANS, DPL and Win32Forth
m_l_g3@[EMAIL PROTECTED]   2008-04-02 00:17:49 
Re: Fixed-point math, ANS, DPL and Win32Forth
Brad Eckert <nospaambr  2008-04-02 06:00:36 
Re: Fixed-point math, ANS, DPL and Win32Forth
Alex McDonald <blog@[E  2008-04-02 14:44:25 
Re: Fixed-point math, ANS, DPL and Win32Forth
George Hubert <georgea  2008-04-02 16:16:22 
Re: Fixed-point math, ANS, DPL and Win32Forth
m_l_g3 <m_l_g3@[EMAIL   2008-04-04 10:45:33 
Re: Fixed-point math, ANS, DPL and Win32Forth
Coos Haak <chforth@[EM  2008-04-04 20:06:46 
Re: Fixed-point math, ANS, DPL and Win32Forth
"Ed" <nospam  2008-04-05 11:43:43 
Re: Fixed-point math, ANS, DPL and Win32Forth
Albert van der Horst <  2008-04-05 09:27:59 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Fri May 16 23:39:20 CDT 2008.