Mercurial > octave
comparison scripts/specfun/gammainc.m @ 31548:c8ad083a5802 stable
maint: Clean up m-files before Octave 8.1 release.
* external.txi, oop.txi, Table.h, documentation.cc, gui-preferences-ed.h,
lo-specfun.cc, range.tst : Eliminate triple newlines.
* Map.m, MemoizedFunction.m, delaunayn.m, inputParser.m,
__publish_latex_output__.m, publish.m, unpack.m, fminbnd.m,
__add_default_menu__.m, gammainc.m, gallery.m, hadamard.m, weboptions.m:
Add newline after keyword "function" or before keyword "endfunction" for
readability.
* getaudiodata.m, pkg.m : Add semicolon to end of line for error() statement.
* movegui.m: Combine mutliple calls to set() into one for performance.
* __unimplemented__.m (missing_functions): Remove missing functions that have
been implemented.
* __vectorize__.m, check_default_input.m, betaincinv.m, gammaincinv.m:
Remove semicolon at end of line with "function" declaration.
* weboptions.m: Remove semicolon at end of line with "if" keyword.
* integrate_adaptive.m, factor.m: Use keyword "endif" rather than bare "end".
author | Rik <rik@octave.org> |
---|---|
date | Fri, 25 Nov 2022 21:23:54 -0800 |
parents | 5d3faba0342e |
children | 597f3ee61a48 |
comparison
equal
deleted
inserted
replaced
31541:fd8c0df759bb | 31548:c8ad083a5802 |
---|---|
244 | 244 |
245 ## Subfunctions to handle each case: | 245 ## Subfunctions to handle each case: |
246 | 246 |
247 ## x == 0, a == 0. | 247 ## x == 0, a == 0. |
248 function y = gammainc_00 (tail) | 248 function y = gammainc_00 (tail) |
249 | |
249 if (strcmp (tail, "upper") || strcmp (tail, "scaledupper")) | 250 if (strcmp (tail, "upper") || strcmp (tail, "scaledupper")) |
250 y = 0; | 251 y = 0; |
251 else | 252 else |
252 y = 1; | 253 y = 1; |
253 endif | 254 endif |
255 | |
254 endfunction | 256 endfunction |
255 | 257 |
256 ## x == 0. | 258 ## x == 0. |
257 function y = gammainc_x0 (tail) | 259 function y = gammainc_x0 (tail) |
260 | |
258 if (strcmp (tail, "lower")) | 261 if (strcmp (tail, "lower")) |
259 y = 0; | 262 y = 0; |
260 elseif (strcmp (tail, "upper") || strcmp (tail, "scaledlower")) | 263 elseif (strcmp (tail, "upper") || strcmp (tail, "scaledlower")) |
261 y = 1; | 264 y = 1; |
262 else | 265 else |
263 y = Inf; | 266 y = Inf; |
264 endif | 267 endif |
268 | |
265 endfunction | 269 endfunction |
266 | 270 |
267 ## x == Inf. | 271 ## x == Inf. |
268 function y = gammainc_x_inf (tail) | 272 function y = gammainc_x_inf (tail) |
273 | |
269 if (strcmp (tail, "lower")) | 274 if (strcmp (tail, "lower")) |
270 y = 1; | 275 y = 1; |
271 elseif (strcmp (tail, "upper") || strcmp (tail, "scaledupper")) | 276 elseif (strcmp (tail, "upper") || strcmp (tail, "scaledupper")) |
272 y = 0; | 277 y = 0; |
273 else | 278 else |
274 y = Inf; | 279 y = Inf; |
275 endif | 280 endif |
281 | |
276 endfunction | 282 endfunction |
277 | 283 |
278 ## a == Inf. | 284 ## a == Inf. |
279 function y = gammainc_a_inf (tail) | 285 function y = gammainc_a_inf (tail) |
286 | |
280 if (strcmp (tail, "lower")) | 287 if (strcmp (tail, "lower")) |
281 y = 0; | 288 y = 0; |
282 elseif (strcmp (tail, "upper") || strcmp (tail, "scaledlower")) | 289 elseif (strcmp (tail, "upper") || strcmp (tail, "scaledlower")) |
283 y = 1; | 290 y = 1; |
284 else | 291 else |
285 y = Inf; | 292 y = Inf; |
286 endif | 293 endif |
294 | |
287 endfunction | 295 endfunction |
288 | 296 |
289 ## a == 0. | 297 ## a == 0. |
290 function y = gammainc_a0 (x, tail) | 298 function y = gammainc_a0 (x, tail) |
299 | |
291 if (strcmp (tail, "lower")) | 300 if (strcmp (tail, "lower")) |
292 y = 1; | 301 y = 1; |
293 elseif (strcmp (tail, "scaledlower")) | 302 elseif (strcmp (tail, "scaledlower")) |
294 y = exp (x); | 303 y = exp (x); |
295 else | 304 else |
296 y = 0; | 305 y = 0; |
297 endif | 306 endif |
307 | |
298 endfunction | 308 endfunction |
299 | 309 |
300 ## a == 1. | 310 ## a == 1. |
301 function y = gammainc_a1 (x, tail) | 311 function y = gammainc_a1 (x, tail) |
302 | 312 |