1function C = erf (G)
2%ERF error function.
3% C = erf (G) computes the error function of each entry of G.
4% G must be real.
5%
6% See also GrB/erfc, 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    op = 'erf.double' ;
18else
19    op = 'erf' ;
20end
21
22C = GrB (gbapply (op, G)) ;
23
24