From: burkphil Date: Tue, 13 Aug 2013 15:41:07 +0000 (+0000) Subject: Fix floating point conversion and printing. X-Git-Url: http://git.subgeniuskitty.com/pforth/.git/commitdiff_plain/419d914ec44e5355d7f9446c98730ee0454acb26 Fix floating point conversion and printing. D>F and F>D were broken for 64-bit versions of Forth. A fix was proposed by Denis Bernard. Thanks Denis. --- diff --git a/csrc/pfinnrfp.h b/csrc/pfinnrfp.h index 0428b25..e6c0104 100644 --- a/csrc/pfinnrfp.h +++ b/csrc/pfinnrfp.h @@ -22,8 +22,8 @@ ***************************************************************/ #ifdef PF_SUPPORT_FP - -#define FP_DHI1 (((PF_FLOAT)0x40000000)*4.0) + +#define FP_DHI1 (((PF_FLOAT)(1L<<(sizeof(cell_t)*8-2)))*4.0) case ID_FP_D_TO_F: /* ( dlo dhi -- ) ( F: -- r ) */ PUSH_FP_TOS;