Post Reply 
Mini-challenge - accurate factorials
07-11-2023, 08:39 AM
Post: #13
RE: Mini-challenge - accurate factorials
(07-09-2023 05:15 PM)Werner Wrote:  Free42 does not use guard digits, since the intel decimal library has no provisions for extended precision for the 34-digit format.
The factorial is likely calculated as 40*39*..*2, not as 2*3*4..*39*40. Doing it manually show the results you obtained.

Thanks Werner, I came to the same conclusion.
So not a problem as such, but we need to keep in mind that not all 34 digits are correct.

Most of the time, the error is just a few ULPs, but I found some worst cases:

 61! = 5.075802138772247988008568121766260e83  (correct: 5.07...252e83  : 8 ULPs)
101! = 9.425947759838359420851623124482910e159 (correct: 9.42...937e159 : 27 ULPs)
251! = 8.114469214881860408125244525581122e494 (correct: 8.11...165e494 : 43 ULPs)

J-F
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Mini-challenge - accurate factorials - J-F Garnier - 07-11-2023 08:39 AM



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