You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is this the correct behavior? I expected the following behavior,
$ pforth -q
7.7e fround f. 8.000000
bye
$
I would like to think the fround word should push its result to floating point
stack. If this question was a known issue, I did very rudely, so I'm very sorry.
Finally, I modified csrc/pfinnrfp.h to get my expected behavior,
$ diff -C 2 pfinnrfp.h.orig pfinnrfp.h
*** pfinnrfp.h.orig Mon Oct 28 15:50:40 2019
--- pfinnrfp.h Mon Oct 28 15:30:43 2019
***************
*** 207,213 ****
case ID_FP_FROUND:
! PUSH_TOS;
! TOS = (cell_t)fp_round(FP_TOS);
! M_FP_DROP;
break;
--- 207,211 ----
case ID_FP_FROUND:
! FP_TOS = (PF_FLOAT) fp_round(FP_TOS);
break;
$
Sincerely,
Hajime Edakawa
The text was updated successfully, but these errors were encountered:
Since it returned a rounded "integer" value I assumed it would be on the integer stack. Not so.
Fixing this will break any pForth program currently using FROUND. So I will need to make sure users are warned.
If this question was a known issue, I did very rudely, so I'm very sorry.
No. Even if it was a known issue it would not be rude. I want to improve pForth. So every bug report is helpful. Even questions are helpful because then I know where to improve the documentation. You reported a bug and gave me the fix. I am grateful.
No. Even if it was a known issue it would not be rude. I want to improve pForth. So every bug report is helpful. Even questions are helpful because then I know where to improve the documentation. You reported a bug and gave me the fix.
I really got courage from your comments. Thank you for giving me good advice!
Dear Mr. Phil Burk,
I'm a user of pForth and very happy to use it. By the way, I have a question
about the following parts,
Is this the correct behavior? I expected the following behavior,
I would like to think the fround word should push its result to floating point
stack. If this question was a known issue, I did very rudely, so I'm very sorry.
Finally, I modified csrc/pfinnrfp.h to get my expected behavior,
Sincerely,
Hajime Edakawa
The text was updated successfully, but these errors were encountered: