octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #61199] Allow 'char' input sets to nchoosek fo


From: anonymous
Subject: [Octave-bug-tracker] [bug #61199] Allow 'char' input sets to nchoosek for Matlab compatibility
Date: Fri, 24 Sep 2021 17:42:05 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:92.0) Gecko/20100101 Firefox/92.0

Follow-up Comment #23, bug #61199 (project octave):

Could someone please check if Matlab gives integers beyond flintmax, like
nchoosek (64,32)? Where does Matlab start issuing warnings about accuracy?

Test for comment #21:


>> format long g

>> nchoosek (100,13)  ## NO PATCH, GETS WARNING, RESULT SLIGHTLY OFF
warning: nchoosek: possible loss of precision
warning: called from
    nchoosek at line 118 column 7

ans = 7110542499799197


>> nchoosek (100,13) ## PATCH, NO WARNING, RESULT EXACT
ans = 7110542499799200


Please compare with Matlab for presence of warnings and exactness.


    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?61199>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]