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

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

[Octave-bug-tracker] [bug #47800] gammainc(x, a, "upper") rounds down to


From: Lachlan Andrew
Subject: [Octave-bug-tracker] [bug #47800] gammainc(x, a, "upper") rounds down to zero if output is below eps
Date: Thu, 19 May 2016 11:59:28 +0000 (UTC)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:43.0) Gecko/20100101 Firefox/43.0

Follow-up Comment #16, bug #47800 (project octave):

Thanks to you both for your great work.

I've tidied the formatting to comply with Octave's coding standards, but
haven't yet touched the docstring.  The code has no licence.  Are you both
happy for it to be GPL'd?

FYI, the changes I've made to comply with the standards are:
- endif/endwhile/endfunction instead of end
- double quotes instead of single quotes
- ## instead of % to introduce full-line comments
- space before function call parenthesis
- spacing around operators
- ; after the "assert" statements
- lines wrapped after 72~76 columns.

In addition
- strcmp -> strcmpi
- Use of +=, *= etc when possible, since they are actually faster than "n = n
+ 1" etc.
- Removed what seemed to be a duplicated "aj = a;" before the comment


## if 'lower' or 'upper', it should be 
##
## aj = a*exp(a*log(x)-x-gammaln(a+1))
##
## and no scaling at the end, but it suffers cancellation
## Better start with aj = a always.


since there was also one after that comment.

(file #37206)
    _______________________________________________________

Additional Item Attachment:

File name: ngammainc.m                    Size:5 KB


    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?47800>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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