Functions | |
if (isa(x,"single")) tol | |
y (abs(x) >=1) | |
y (x==-1) | |
if (any(i)) s | |
while (any(abs(erf(z)-x(i)) > tol *abs(x(i)))) z | |
Variables | |
function [y, iterations] | |
endif | maxit = 100 |
else | tol = eps |
endif | iterations = 0 |
sz = size (x) | |
nel = numel (x) | |
x = reshape (x, nel, 1) | |
y = zeros (nel, 1) | |
i = find ((x > -1) & (x < 1)) | |
z = sqrt (-log (1 - abs (x(i)))) .* sign (x(i)) |
if | ( | any(i) | ) |
if | ( | isa(x,"single") | ) |
while | ( | any(abs(erf(z)-x(i)) > tol *abs(x(i))) | ) |
y | ( | x | = =-1 |
) |
y | ( | abs(x) >= | 1 | ) |
function[y, iterations] |
Initial value:
erfinv (x) if (nargin != 1) print_usage ()
i = find ((x > -1) & (x < 1)) |
endif iterations = 0 |
nel = numel (x) |
sz = size (x) |
x = reshape (x, nel, 1) |
y = zeros (nel, 1) |
z = sqrt (-log (1 - abs (x(i)))) .* sign (x(i)) |