[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #65495] nchoosek error "gcd: all values must b
From: |
Markus Mützel |
Subject: |
[Octave-bug-tracker] [bug #65495] nchoosek error "gcd: all values must be integers" |
Date: |
Wed, 20 Mar 2024 13:20:03 -0400 (EDT) |
Follow-up Comment #11, bug #65495 (group octave):
I wonder if we should interrupt the for loop when C reaches Inf.
Maybe something along the lines of the following?
diff -r a79e07f980ff scripts/specfun/nchoosek.m
--- a/scripts/specfun/nchoosek.m Fri Mar 15 07:24:58 2024 -0400
+++ b/scripts/specfun/nchoosek.m Wed Mar 20 18:19:07 2024 +0100
@@ -149,6 +149,9 @@
C *= (v - k + i);
C /= i;
endif
+ if (isinf (C))
+ break;
+ endif
endfor
if (! is_int && C > imax)
warning ("Octave:nchoosek:large-output-float", ...
CC'ing Hendrik in case they have a better idea.
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?65495>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [Octave-bug-tracker] [bug #65495] nchoosek error "GCD should be an integer", (continued)
- [Octave-bug-tracker] [bug #65495] nchoosek error "GCD should be an integer", Nicholas Jankowski, 2024/03/20
- [Octave-bug-tracker] [bug #65495] nchoosek error "GCD should be an integer", Nicholas Jankowski, 2024/03/20
- [Octave-bug-tracker] [bug #65495] nchoosek error "GCD should be an integer", Nicholas Jankowski, 2024/03/20
- [Octave-bug-tracker] [bug #65495] nchoosek error "GCD should be an integer", anonymous, 2024/03/20
- [Octave-bug-tracker] [bug #65495] nchoosek error "GCD should be an integer", Dmitri A. Sergatskov, 2024/03/20
- [Octave-bug-tracker] [bug #65495] nchoosek error "GCD should be an integer", anonymous, 2024/03/20
- [Octave-bug-tracker] [bug #65495] nchoosek error "GCD should be an integer", Dmitri A. Sergatskov, 2024/03/20
- [Octave-bug-tracker] [bug #65495] nchoosek error "GCD should be an integer", anonymous, 2024/03/20
- [Octave-bug-tracker] [bug #65495] nchoosek error "GCD should be an integer", Dmitri A. Sergatskov, 2024/03/20
- [Octave-bug-tracker] [bug #65495] nchoosek error "gcd: all values must be integers", Markus Mützel, 2024/03/20
- [Octave-bug-tracker] [bug #65495] nchoosek error "gcd: all values must be integers",
Markus Mützel <=
- [Octave-bug-tracker] [bug #65495] nchoosek error "gcd: all values must be integers", Markus Mützel, 2024/03/20
- [Octave-bug-tracker] [bug #65495] nchoosek error "gcd: all values must be integers", anonymous, 2024/03/22
- [Octave-bug-tracker] [bug #65495] nchoosek error "gcd: all values must be integers", Hendrik K, 2024/03/22
- [Octave-bug-tracker] [bug #65495] nchoosek error "gcd: all values must be integers", John W. Eaton, 2024/03/22