Post Reply 
%NFACT bug
01-08-2014, 03:14 AM
Post: #2
RE: %NFACT bug
(01-08-2014 03:01 AM)David Hayden Wrote:  It appears to me that the System RPL entry %NFACT on my 50g doesn't work properly. This computes the factorial of a real number. Note that it's different from %FACT which computes gamma(x+1) and works correctly.

%NFACT appears to return IP(ABS(x))! There are 2 bugs
  1. It doesn't honor system flag 22 when the result overflows. It returns 9.99999999999E499, even if the flag is clear
  2. If x is between -1 and 1 (exclusive of the endpoints), it return 9.99999999999E499 instead of 1.


Hoping that someone can confirm or explain to me why I'm wrong.

Thanks,
Dave

Sounds like this bug I reported a while back: http://bugs.hpcalc.org/show_bug.cgi?id=255

This bug affects pretty much ANY command that uses argument checking and auto-converts DOZINT types to DOREAL -- which is to say a lot of commands are affected by it. I found the bug while porting Jazz for the HP48 series to the HP50G.

Graph 3D | QPI | SolveSys
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
%NFACT bug - David Hayden - 01-08-2014, 03:01 AM
RE: %NFACT bug - Han - 01-08-2014 03:14 AM
RE: %NFACT bug - David Hayden - 01-08-2014, 01:32 PM
RE: %NFACT bug - Han - 01-08-2014, 06:12 PM
RE: %NFACT bug - David Hayden - 01-09-2014, 03:02 AM



User(s) browsing this thread: 1 Guest(s)