<< Home | About Forth | About TurboForth | Download | Language Reference | Resources | Tutorials | YouTube >>


D2/ Search:

In Math Words in 32-bit library

Word Name: D2/
Type: Standard word
Data Stack Signature: d:x – d:x/2
Return Stack Signature: --
Availability: V1.2
Description:

Arithmetically shifts the double value x one bit position to the right, hence dividing the value by 2.

Example:

 123456. D2/ D. (displays 61728)
-123456. D2/ D. (displays -61728)

Comment:

Since the shift is an arithmetic shift the sign of the value is maintained.

See Also: 2/ 

<< Home | About Forth | About TurboForth | Download | Language Reference | Resources | Tutorials | YouTube >>