1function C = erfc (G)
2%ERFC complementary error function.
3% C = erfc (G) is the complementary error function of each entry of G.
4% Since erfc (0) = 1, the result is a full matrix.  G must be real.
5%
6% See also GrB/erf, erfcx, erfinv, erfcinv.
7
8% SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
9% SPDX-License-Identifier: GPL-3.0-or-later
10
11G = G.opaque ;
12type = gbtype (G) ;
13if (contains (type, 'complex'))
14    error ('input must be real') ;
15end
16if (~gb_isfloat (type))
17    type = 'double' ;
18end
19
20C = GrB (gbapply ('erfc', gbfull (G, type))) ;
21
22