version 1.16, 2009/09/25 18:52:29
|
version 1.18, 2011/08/10 13:55:03
|
Line 1
|
Line 1
|
\ test some gforth extension words |
\ test some gforth extension words |
|
|
\ Copyright (C) 2003,2004,2005,2006,2007 Free Software Foundation, Inc. |
\ Copyright (C) 2003,2004,2005,2006,2007,2009 Free Software Foundation, Inc. |
|
|
\ This file is part of Gforth. |
\ This file is part of Gforth. |
|
|
Line 95 t{ -5e 1e fcopysign -> 5e }t
|
Line 95 t{ -5e 1e fcopysign -> 5e }t
|
t{ 5e -1e fcopysign -> -5e }t |
t{ 5e -1e fcopysign -> -5e }t |
t{ -5e -1e fcopysign -> -5e }t |
t{ -5e -1e fcopysign -> -5e }t |
\ tests involving -0e? |
\ tests involving -0e? |
|
|
|
\ ?of |
|
|
|
: sgn ( n1 -- n2 ) |
|
case |
|
dup 0< ?of drop -1 endof |
|
dup 0> ?of drop 1 endof |
|
dup |
|
endcase ; |
|
|
|
t{ 5 sgn -> 1 } |
|
t{ -3 sgn -> -1 } |
|
t{ 0 sgn -> 0 } |