comparison libinterp/corefcn/besselj.cc @ 20591:0650b8431037

eliminate more simple uses of error_state * besselj.cc, bitfcns.cc, utils.cc, chol.cc, ov-java.cc: Eliminate simple uses of error_state.
author John W. Eaton <jwe@octave.org>
date Mon, 05 Oct 2015 21:37:03 -0400
parents b2100e1659ac
children
comparison
equal deleted inserted replaced
20590:1a0a433c8263 20591:0650b8431037
614 } 614 }
615 else 615 else
616 error ("airy: K must be an integer value"); 616 error ("airy: K must be an integer value");
617 } 617 }
618 618
619 if (! error_state) 619 int idx = nargin == 1 ? 0 : 1;
620
621 if (args(idx).is_single_type ())
620 { 622 {
621 int idx = nargin == 1 ? 0 : 1; 623 FloatComplexNDArray z = args(idx).float_complex_array_value ();
622 624
623 if (args(idx).is_single_type ()) 625 if (! error_state)
624 { 626 {
625 FloatComplexNDArray z = args(idx).float_complex_array_value (); 627 Array<octave_idx_type> ierr;
626 628 octave_value result;
627 if (! error_state) 629
628 { 630 if (kind > 1)
629 Array<octave_idx_type> ierr; 631 result = biry (z, kind == 3, scale, ierr);
630 octave_value result;
631
632 if (kind > 1)
633 result = biry (z, kind == 3, scale, ierr);
634 else
635 result = airy (z, kind == 1, scale, ierr);
636
637 if (nargout > 1)
638 retval(1) = NDArray (ierr);
639
640 retval(0) = result;
641 }
642 else 632 else
643 error ("airy: Z must be a complex matrix"); 633 result = airy (z, kind == 1, scale, ierr);
634
635 if (nargout > 1)
636 retval(1) = NDArray (ierr);
637
638 retval(0) = result;
644 } 639 }
645 else 640 else
641 error ("airy: Z must be a complex matrix");
642 }
643 else
644 {
645 ComplexNDArray z = args(idx).complex_array_value ();
646
647 if (! error_state)
646 { 648 {
647 ComplexNDArray z = args(idx).complex_array_value (); 649 Array<octave_idx_type> ierr;
648 650 octave_value result;
649 if (! error_state) 651
650 { 652 if (kind > 1)
651 Array<octave_idx_type> ierr; 653 result = biry (z, kind == 3, scale, ierr);
652 octave_value result;
653
654 if (kind > 1)
655 result = biry (z, kind == 3, scale, ierr);
656 else
657 result = airy (z, kind == 1, scale, ierr);
658
659 if (nargout > 1)
660 retval(1) = NDArray (ierr);
661
662 retval(0) = result;
663 }
664 else 654 else
665 error ("airy: Z must be a complex matrix"); 655 result = airy (z, kind == 1, scale, ierr);
656
657 if (nargout > 1)
658 retval(1) = NDArray (ierr);
659
660 retval(0) = result;
666 } 661 }
662 else
663 error ("airy: Z must be a complex matrix");
667 } 664 }
668 } 665 }
669 else 666 else
670 print_usage (); 667 print_usage ();
671 668