\ dblmath-ext 05.3.27 NAB
\ Original by Ron Doerfler 02.6.27
\ Extract-signs tweaked by Bob Ryan
\ Addition of UD* by Kristopher Johnson

needs dblmath
needs udmultiply

: EXTRACT-SIGNS
( N. N. -- +N. +N. NEGFLG )
   2DUP D0< >R DABS 2SWAP
   2DUP D0< >R DABS 2SWAP
   R> R> XOR ;
  
: D* ( D1. D2. -- D1.*D2. )
   EXTRACT-SIGNS >R
   UD*
   R> IF DNEGATE THEN ;

: D/   ( D1. D2. -- D1./D2. )
   EXTRACT-SIGNS >R
   UD/MOD 2SWAP 2DROP
   R> IF DNEGATE THEN ;
