8.6.1.1080 D0= d-zero-equals DOUBLE

( xd -- flag )

flag is true if and only if xd is equal to zero.

Testing:

T{               1. D0= -> <FALSE> }T
T{ MIN-INT        0 D0= -> <FALSE> }T
T{         MAX-2INT D0= -> <FALSE> }T
T{      -1  MAX-INT D0= -> <FALSE> }T
T{               0. D0= -> <TRUE>  }T
T{              -1. D0= -> <FALSE> }T
T{       0  MIN-INT D0= -> <FALSE> }T

ContributeContributions

flaagelavatar of flaagel [225] Using a . suffix to specify a doubleComment2022-03-05 19:45:14

Test cases for D0= seem to conflict with the specification for legal literals as defined in "3.4.1.3 Text interpreter input number conversion" If . as a suffix should be recognized as such, then it should be specified so.

AntonErtlavatar of AntonErtl

The . suffix is specified in Section 8.3.1.

Closed
Reply New Version

JimPetersonavatar of JimPeterson [290] Possible Reference ImplementationSuggested reference implementation2023-02-24 14:39:44

For two's complement representations:

: D0= 0= SWAP 0= AND ;

flaagelavatar of flaagel

or, more simply:

: D0= OR 0= ;

JimPetersonavatar of JimPeterson

... oh, yes. What was I thinking?

Reply New Version