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

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

[Octave-bug-tracker] [bug #64726] Current betainc function has a minor (


From: Michele Ginesi
Subject: [Octave-bug-tracker] [bug #64726] Current betainc function has a minor (more cosmetic) bug
Date: Fri, 29 Sep 2023 03:55:47 -0400 (EDT)

Follow-up Comment #1, bug #64726 (project octave):

I think that the line

I = double (x);

was a typo for

x = double (x);


I'm not convinced by initializing I before the conversion. For instance, if x
is an integer (let's say int8), I is initialized as an int8 while it should be
a double.

I would keep the order as before and only fix the conversion of x

## Convert to floating point if necessary
  if (isinteger (x))
    x = double (x);
  endif
  if (isinteger (a))
    a = double (a);
  endif
  if (isinteger (b))
    b = double (b);
  endif

  ## Initialize output array
  I = zeros (size (x), class (x));




    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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