X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=csrc%2Fpfinnrfp.h;fp=csrc%2Fpfinnrfp.h;h=4a3095ba6bf5f3c888665636b4976bb826dc29b4;hb=83798fe4d7af4f01580535962f4e9956c7c6c49e;hp=21d34849b6d2a5a7e86d8d5de8a2d46a0695c826;hpb=268cc1113f8ce8045aebd3e30350c01f0b48714d;p=debian%2Fpforth diff --git a/csrc/pfinnrfp.h b/csrc/pfinnrfp.h index 21d3484..4a3095b 100644 --- a/csrc/pfinnrfp.h +++ b/csrc/pfinnrfp.h @@ -209,9 +209,11 @@ break; case ID_FP_FROUND: - PUSH_TOS; - TOS = (cell_t)fp_round(FP_TOS); - M_FP_DROP; + /* This was broken before and used to push its result to the + * integer data stack! Now it conforms to the ANSI standard. + * https://github.com/philburk/pforth/issues/69 + */ + FP_TOS = (PF_FLOAT)fp_round(FP_TOS); break; case ID_FP_FSWAP: /* ( -- ) ( F: r1 r2 -- r2 r1 ) */