|
From: | Arun Giridhar |
Subject: | [Octave-bug-tracker] [bug #61565] nchoosek broken for integer inputs |
Date: | Thu, 2 Dec 2021 04:59:32 -0500 (EST) |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:94.0) Gecko/20100101 Firefox/94.0 |
Follow-up Comment #16, bug #61565 (project octave): Sounds fair. This warning code works for me. Please edit as needed: C = prod (numer, "native"); if (isinteger (v) && C >= intmax (class (v))) warning ("nchoosek: result is saturated at intmax. Cast inputs to double if you need more range."); elseif (isfloat (v) && C >= flintmax (class (v))) warning ("nchoosek: result exceeds flintmax and may not be exact.") end _______________________________________________________ Reply to this item at: <https://savannah.gnu.org/bugs/?61565> _______________________________________________ Message sent via Savannah https://savannah.gnu.org/
[Prev in Thread] | Current Thread | [Next in Thread] |